openssl-win-root 0.9.0 → 0.9.1
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
- data/.gitignore +18 -18
- data/LICENSE.txt +22 -22
- data/Rakefile +1 -1
- data/lib/openssl/win/root.rb +15 -30
- data/lib/openssl/win/root/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a7e7e1be011cd47bf70896dd72eb6f0d3f3205e
|
|
4
|
+
data.tar.gz: cf9a267ae00171c9001d86964a7722296744a4b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e19aa64eb41e00f650f5409f58d49f57ec3b61d9b66d151dc3ddc3d7252e17dd3f141ee9e31eadb047a5f8adaf890126d78cafa15592349c315358800759299
|
|
7
|
+
data.tar.gz: 3daf791a92804879df3b0d0b85b07827319de88e1da36d7ca96e1a8a79d141757509fbd2e2579861af8ac9bdaf72a183b04b815427a36544756a05518528e9d0
|
data/.gitignore
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
*.gem
|
|
2
|
-
*.rbc
|
|
3
|
-
.bundle
|
|
4
|
-
.config
|
|
5
|
-
.yardoc
|
|
6
|
-
Gemfile.lock
|
|
7
|
-
InstalledFiles
|
|
8
|
-
_yardoc
|
|
9
|
-
coverage
|
|
10
|
-
doc/
|
|
11
|
-
lib/bundler/man
|
|
12
|
-
pkg
|
|
13
|
-
rdoc
|
|
14
|
-
spec/reports
|
|
15
|
-
test/tmp
|
|
16
|
-
test/version_tmp
|
|
17
|
-
tmp
|
|
18
|
-
pem
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
.bundle
|
|
4
|
+
.config
|
|
5
|
+
.yardoc
|
|
6
|
+
Gemfile.lock
|
|
7
|
+
InstalledFiles
|
|
8
|
+
_yardoc
|
|
9
|
+
coverage
|
|
10
|
+
doc/
|
|
11
|
+
lib/bundler/man
|
|
12
|
+
pkg
|
|
13
|
+
rdoc
|
|
14
|
+
spec/reports
|
|
15
|
+
test/tmp
|
|
16
|
+
test/version_tmp
|
|
17
|
+
tmp
|
|
18
|
+
pem
|
data/LICENSE.txt
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
Copyright (c) 2015 Stas Ukolov
|
|
2
|
-
|
|
3
|
-
MIT License
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
Copyright (c) 2015 Stas Ukolov
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/openssl/win/root.rb
CHANGED
|
@@ -41,19 +41,22 @@ module OpenSSL::Win::Root
|
|
|
41
41
|
end
|
|
42
42
|
end if On
|
|
43
43
|
|
|
44
|
-
def self.save(
|
|
45
|
-
|
|
46
|
-
#
|
|
47
|
-
# Generated by #{self} v#{VERSION} @#{Time.now}
|
|
48
|
-
#
|
|
49
|
-
|
|
50
|
-
EOT
|
|
44
|
+
def self.save(path=path)
|
|
45
|
+
my={}
|
|
51
46
|
Crypt.each do |crt|
|
|
52
|
-
|
|
47
|
+
File.open File.join(path, name='%08x.0'%crt.subject.hash), 'w' do |f|
|
|
48
|
+
my[name]=1
|
|
49
|
+
f.puts <<-EOT
|
|
53
50
|
Subject: #{crt.subject}
|
|
54
51
|
Valid: #{crt.not_before} - #{crt.not_after}
|
|
52
|
+
Saved: #{self} v#{VERSION} @#{Time.now}
|
|
55
53
|
#{crt.to_pem}
|
|
56
|
-
|
|
54
|
+
#{crt.to_text}
|
|
55
|
+
EOT
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
Dir.glob File.join path, '*' do |f|
|
|
59
|
+
File.unlink f unless my[File.basename f]
|
|
57
60
|
end
|
|
58
61
|
end
|
|
59
62
|
|
|
@@ -63,34 +66,16 @@ Valid: #{crt.not_before} - #{crt.not_after}
|
|
|
63
66
|
x = File.dirname x until File.exists? File.join x, 'Gemfile'
|
|
64
67
|
x = File.join x, 'pem'
|
|
65
68
|
FileUtils.mkdir_p x
|
|
66
|
-
@path =
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def self.tmpnam
|
|
70
|
-
File.join File.dirname(path), "#{rand.to_s.gsub /\D+/, ''}.pem"
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def self.update
|
|
74
|
-
tmp = tmpnam
|
|
75
|
-
begin
|
|
76
|
-
File.open(tmp, 'w'){|f| save f}
|
|
77
|
-
FileUtils.mv tmp, path, force: true
|
|
78
|
-
inject
|
|
79
|
-
ensure
|
|
80
|
-
File.unlink tmp rescue nil
|
|
81
|
-
end
|
|
69
|
+
@path = x
|
|
82
70
|
end
|
|
83
71
|
|
|
84
72
|
def self.inject
|
|
85
|
-
|
|
86
|
-
return if @inject
|
|
87
|
-
OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE.add_file path
|
|
88
|
-
@inject = true
|
|
73
|
+
OpenSSL::SSL::SSLContext::DEFAULT_CERT_STORE.add_path path
|
|
89
74
|
path
|
|
90
75
|
end
|
|
91
76
|
|
|
92
77
|
def self.go!
|
|
93
|
-
t = Thread.new{
|
|
78
|
+
t = Thread.new{ save }
|
|
94
79
|
at_exit{t.join}
|
|
95
80
|
inject
|
|
96
81
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openssl-win-root
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stas Ukolov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
93
|
rubyforge_project:
|
|
94
|
-
rubygems_version: 2.
|
|
94
|
+
rubygems_version: 2.0.14
|
|
95
95
|
signing_key:
|
|
96
96
|
specification_version: 4
|
|
97
97
|
summary: ''
|