openssl-win-root 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openssl/win/root.rb +20 -21
- data/lib/openssl/win/root/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebed7ff514374969535e034a2360f8e953de49b3
|
4
|
+
data.tar.gz: 20dab383ad84c77b9bf2da2e8e7b1efab21f3289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47756db99b64c8c85fd22e59af5d8c783c393bcac3391c0d0ba7ce58238bd0ceab50122cb8ae0a56d5dbea1cf0b6b72738a8fbb957b5b05818b7394290b09afb
|
7
|
+
data.tar.gz: feed5fe246c0e79df000c24abc2bca559a213ef6d954d5a5c37a45bc412345ddb064055ee4d0e671fcd2b481a309aa280bfb30ced761e0c62d2d053441a77fe4
|
data/lib/openssl/win/root.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'ffi'
|
2
1
|
require 'openssl'
|
3
2
|
require 'fileutils'
|
3
|
+
require 'fiddle/import'
|
4
4
|
|
5
5
|
require_relative "root/version"
|
6
6
|
|
@@ -10,34 +10,33 @@ module OpenSSL::Win::Root
|
|
10
10
|
|
11
11
|
# Based on Puppet::Util::Windows::RootCerts
|
12
12
|
module Crypt
|
13
|
-
extend
|
14
|
-
|
15
|
-
ffi_convention :stdcall
|
13
|
+
extend Fiddle::Importer
|
14
|
+
dlload 'crypt32'
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
extern 'uintptr_t CertOpenSystemStoreA(uintptr_t, char*)', :stdcall
|
17
|
+
extern 'int CertCloseStore(uintptr_t, unsigned long)', :stdcall
|
18
|
+
extern 'void* CertEnumCertificatesInStore(uintptr_t, void*)', :stdcall
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
Ctx = struct [
|
21
|
+
'unsigned long dwCertEncodingType',
|
22
|
+
'unsigned char* pbCertEncoded',
|
23
|
+
'unsigned long cbCertEncoded',
|
24
|
+
'void* pCertInfo',
|
25
|
+
'uintptr_t hCertStore',
|
26
|
+
]
|
27
27
|
|
28
|
+
class Ctx
|
28
29
|
def crt
|
29
|
-
OpenSSL::X509::Certificate.new
|
30
|
+
OpenSSL::X509::Certificate.new pbCertEncoded[0, cbCertEncoded]
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
33
34
|
def self.each
|
34
|
-
store =
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
close store, 0
|
40
|
-
end
|
35
|
+
store = CertOpenSystemStoreA 0, 'ROOT'
|
36
|
+
ctx = nil
|
37
|
+
yield Ctx.new(ctx).crt until (ctx = CertEnumCertificatesInStore store, ctx).null?
|
38
|
+
ensure
|
39
|
+
CertCloseStore store, 0
|
41
40
|
end
|
42
41
|
end if On
|
43
42
|
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openssl-win-root
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stas Ukolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: ffi
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
99
|
version: '0'
|
114
100
|
requirements: []
|
115
101
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.2.3
|
117
103
|
signing_key:
|
118
104
|
specification_version: 4
|
119
105
|
summary: ''
|