localhost 1.1.9 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c6fcac1295924f18159bdfbf56da57dc568c01dfe16fe030ca4efa03a51f77d
4
- data.tar.gz: e781042e92c7456d0e99ca8373c22433e193e4ac2dbea36829484a0fa121f77a
3
+ metadata.gz: 647476f190a1dbfe917956c6cb23717528e94b905ff47906bee0a287fa83639e
4
+ data.tar.gz: 035e92adad13af22294589079c5d8a8780497a1f6f392a03d382a166f85323ea
5
5
  SHA512:
6
- metadata.gz: 03f3a2b111cfdc84199224ac5ab66c842d03f79d7514354ba06086d057769d3b31fc7606333696f342d2e9d0d438c89a19a470f2e38f0f64a77c200d9897a724
7
- data.tar.gz: b696353ce1f45d8dbd863cf33b677a5d25ff83b2703585eb1a9b42faf7efe83a0b6bc5105f7c558e36c8542c01da8649eb21804dba415c52a7772e9db292ff85
6
+ metadata.gz: cc47079bea9080adf043cb4cbef2e4e352797557ad2da46be3026e27971216479904afb4d9bbc8ad8183ae409575be74bd0d5c47f9006335bfa7f4d7472d5c26
7
+ data.tar.gz: 5b27695d5ca8290ce1d7a10afef2e73587c5db2395b05170463a54d52a80f13617b6145b3d1c157d7627cdcc07660d053aa7183f3615871ad69a017547328219
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,24 +1,13 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2023, by Samuel Williams.
5
+ # Copyright, 2019, by Richard S. Leung.
6
+ # Copyright, 2021, by Akshay Birajdar.
7
+ # Copyright, 2021, by Ye Lin Aung.
8
+ # Copyright, 2023, by Antonio Terceiro.
9
+ # Copyright, 2023, by Yuuji Yaginuma.
20
10
 
21
- require 'yaml'
22
11
  require 'openssl'
23
12
 
24
13
  module Localhost
@@ -119,11 +108,11 @@ module Localhost
119
108
 
120
109
  certificate.public_key = self.key.public_key
121
110
 
122
- certificate.serial = 1
111
+ certificate.serial = Time.now.to_i
123
112
  certificate.version = 2
124
113
 
125
114
  certificate.not_before = Time.now
126
- certificate.not_after = Time.now + (3600 * 24 * 365 * 10)
115
+ certificate.not_after = Time.now + (3600 * 24 * 365)
127
116
 
128
117
  extension_factory = OpenSSL::X509::ExtensionFactory.new
129
118
  extension_factory.subject_certificate = certificate
@@ -1,23 +1,8 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2023, by Samuel Williams.
20
5
 
21
6
  module Localhost
22
- VERSION = "1.1.9"
7
+ VERSION = "1.2.0"
23
8
  end
data/lib/localhost.rb CHANGED
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2018-2023, by Samuel Williams.
20
5
 
21
6
  require_relative 'localhost/version'
22
7
  require_relative 'localhost/authority'
data/license.md ADDED
@@ -0,0 +1,29 @@
1
+ # MIT License
2
+
3
+ Copyright, 2018-2024, by Samuel Williams.
4
+ Copyright, 2018, by Gabriel Sobrinho.
5
+ Copyright, 2019, by Richard S. Leung.
6
+ Copyright, 2020-2021, by Olle Jonsson.
7
+ Copyright, 2021, by Akshay Birajdar.
8
+ Copyright, 2021, by Ye Lin Aung.
9
+ Copyright, 2022, by Juri Hahn.
10
+ Copyright, 2023, by Antonio Terceiro.
11
+ Copyright, 2023, by Yuuji Yaginuma.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,38 @@
1
+ # Localhost
2
+
3
+ This gem provides a convenient API for generating per-user self-signed root certificates.
4
+
5
+ [![Development Status](https://github.com/socketry/localhost/workflows/Test/badge.svg)](https://github.com/socketry/localhost/actions?workflow=Test)
6
+
7
+ ## Motivation
8
+
9
+ HTTP/2 requires SSL in web browsers. If you want to use HTTP/2 for development (and you should), you need to start using URLs like `https://localhost:8080`. In most cases, this requires adding a self-signed certificate to your certificate store (e.g. Keychain on macOS), and storing the private key for the web-server to use.
10
+
11
+ I wanted to provide a server-agnostic way of doing this, primarily because I think it makes sense to minimise the amount of junky self-signed keys you add to your certificate store for `localhost`.
12
+
13
+ ## Usage
14
+
15
+ Please see the [project documentation](https://socketry.github.io/localhost/).
16
+
17
+ ## Contributing
18
+
19
+ We welcome contributions to this project.
20
+
21
+ 1. Fork it.
22
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
23
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
24
+ 4. Push to the branch (`git push origin my-new-feature`).
25
+ 5. Create new Pull Request.
26
+
27
+ ### Developer Certificate of Origin
28
+
29
+ This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
30
+
31
+ ### Contributor Covenant
32
+
33
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
34
+
35
+ ## See Also
36
+
37
+ - [Falcon](https://github.com/socketry/falcon) — Uses `Localhost::Authority` to provide HTTP/2 with minimal configuration.
38
+ - [Puma](https://github.com/puma/puma) — Supports `Localhost::Authority` to provide self-signed HTTP for local development.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,85 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localhost
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Olle Jonsson
9
+ - Ye Lin Aung
10
+ - Akshay Birajdar
11
+ - Antonio Terceiro
12
+ - Gabriel Sobrinho
13
+ - Juri Hahn
14
+ - Richard S. Leung
15
+ - Yuuji Yaginuma
8
16
  autorequire:
9
17
  bindir: bin
10
18
  cert_chain:
11
19
  - |
12
20
  -----BEGIN CERTIFICATE-----
13
- MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
14
- ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
15
- MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
16
- aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
17
- AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
18
- xvtqbTTL8gbLHz5LW3QD2nfwCv3qTlw0qI3Ie7a9VMJMbSvgVEGEfQirqIgJXWMj
19
- eNMDgKsMJtC7u/43abRKx7TCURW3iWyR19NRngsJJmaR51yGGGm2Kfsr+JtKKLtL
20
- L188Wm3f13KAx7QJU8qyuBnj1/gWem076hzdA7xi1DbrZrch9GCRz62xymJlrJHn
21
- 9iZEZ7AxrS7vokhMlzSr/XMUihx/8aFKtk+tMLClqxZSmBWIErWdicCGTULXCBNb
22
- E/mljo4zEVKhlTWpJklMIhr55ZRrSarKFuW7en0+tpJrfsYiAmXMJNi4XAYJH7uL
23
- rgJuJwSaa/dMz+VmUoo7VKtSfCoOI+6v5/z0sK3oT6sG6ZwyI47DBq2XqNC6tnAj
24
- w+XmCywiTQrFzMMAvcA7rPI4F0nU1rZId51rOvvfxaONp+wgTi4P8owZLw0/j0m4
25
- 8C20DYi6EYx4AHDXiLpElWh3AgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8E
26
- BAMCBLAwHQYDVR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41
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
42
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
43
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
44
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
45
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
46
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
38
47
  -----END CERTIFICATE-----
39
- date: 2021-09-19 00:00:00.000000000 Z
40
- dependencies:
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: covered
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
48
+ date: 2024-02-01 00:00:00.000000000 Z
49
+ dependencies: []
83
50
  description:
84
51
  email:
85
52
  executables: []
@@ -89,6 +56,8 @@ files:
89
56
  - lib/localhost.rb
90
57
  - lib/localhost/authority.rb
91
58
  - lib/localhost/version.rb
59
+ - license.md
60
+ - readme.md
92
61
  homepage: https://github.com/socketry/localhost
93
62
  licenses:
94
63
  - MIT
@@ -101,14 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
70
  requirements:
102
71
  - - ">="
103
72
  - !ruby/object:Gem::Version
104
- version: '0'
73
+ version: '3.0'
105
74
  required_rubygems_version: !ruby/object:Gem::Requirement
106
75
  requirements:
107
76
  - - ">="
108
77
  - !ruby/object:Gem::Version
109
78
  version: '0'
110
79
  requirements: []
111
- rubygems_version: 3.1.6
80
+ rubygems_version: 3.5.3
112
81
  signing_key:
113
82
  specification_version: 4
114
83
  summary: Manage a local certificate authority for self-signed localhost development
metadata.gz.sig CHANGED
Binary file