localhost 1.1.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/localhost/authority.rb +11 -22
- data/lib/localhost/version.rb +5 -20
- data/lib/localhost.rb +4 -19
- data/license.md +29 -0
- data/readme.md +38 -0
- data.tar.gz.sig +0 -0
- metadata +41 -72
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647476f190a1dbfe917956c6cb23717528e94b905ff47906bee0a287fa83639e
|
4
|
+
data.tar.gz: 035e92adad13af22294589079c5d8a8780497a1f6f392a03d382a166f85323ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc47079bea9080adf043cb4cbef2e4e352797557ad2da46be3026e27971216479904afb4d9bbc8ad8183ae409575be74bd0d5c47f9006335bfa7f4d7472d5c26
|
7
|
+
data.tar.gz: 5b27695d5ca8290ce1d7a10afef2e73587c5db2395b05170463a54d52a80f13617b6145b3d1c157d7627cdcc07660d053aa7183f3615871ad69a017547328219
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/localhost/authority.rb
CHANGED
@@ -1,24 +1,13 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
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 =
|
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
|
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
|
data/lib/localhost/version.rb
CHANGED
@@ -1,23 +1,8 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
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.
|
7
|
+
VERSION = "1.2.0"
|
23
8
|
end
|
data/lib/localhost.rb
CHANGED
@@ -1,22 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
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
|
+
[](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.
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
21
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
22
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
23
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/I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aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
39
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
40
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
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:
|
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.
|
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
|