win32-certstore 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/win32/certstore/store_base.rb +5 -4
- data/lib/win32/certstore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b07544eeb10d6d5d218064ac922283b7654a4e6a683999f645792ff27fa45d5
|
4
|
+
data.tar.gz: c7be876bba7975484a85507e241d9d8f6c590194ea32290edc5189540e647f69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 772ca2195c9e4aa5b522d2e1196730cfc3cb777a05779c99d17a770eae954280e5a555986ee8718fbf785a94d9490b55b419515548c0740ed7f08f20839cf43b
|
7
|
+
data.tar.gz: 167436e45e6ae7b64cd4de5ce95eced68d7b16ed759585b3bd5a682a6f63b6c8b26c31c13c59e448006a6bb298ce89986bb33d987efcbbaee3959f6542ff733f
|
@@ -68,7 +68,6 @@ module Win32
|
|
68
68
|
raise if pfx_cert_store.null?
|
69
69
|
# Find the certificate context in certificate store
|
70
70
|
cert_context = CertFindCertificateInStore(pfx_cert_store, ENCODING_TYPE, 0, CERT_FIND_ANY, nil, nil)
|
71
|
-
close_cert_store(pfx_cert_store)
|
72
71
|
raise if cert_context.null?
|
73
72
|
# Add certificate context to the certificate store
|
74
73
|
args = add_certcontxt_args(certstore_handler, cert_context)
|
@@ -77,6 +76,10 @@ module Win32
|
|
77
76
|
cert_added
|
78
77
|
rescue
|
79
78
|
lookup_error("Add a PFX")
|
79
|
+
ensure
|
80
|
+
if pfx_cert_store && !pfx_cert_store.null?
|
81
|
+
close_cert_store(pfx_cert_store)
|
82
|
+
end
|
80
83
|
end
|
81
84
|
|
82
85
|
# Get certificate from open certificate store and return certificate object
|
@@ -163,9 +166,7 @@ module Win32
|
|
163
166
|
# To close and destroy pointer of open certificate store handler
|
164
167
|
def close_cert_store(certstore_handler = @certstore_handler)
|
165
168
|
closed = CertCloseStore(certstore_handler, CERT_CLOSE_STORE_FORCE_FLAG)
|
166
|
-
|
167
|
-
rescue
|
168
|
-
lookup_error("close")
|
169
|
+
lookup_error("close") unless closed
|
169
170
|
end
|
170
171
|
|
171
172
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-certstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|