openssl-win-root 0.9.1 → 0.9.2

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
  SHA1:
3
- metadata.gz: 3a7e7e1be011cd47bf70896dd72eb6f0d3f3205e
4
- data.tar.gz: cf9a267ae00171c9001d86964a7722296744a4b0
3
+ metadata.gz: a9dce0464f5e87e087cbb19735ec63627847c5b4
4
+ data.tar.gz: b8ea6e6cdc1917d355e5798134d6da552dd9f441
5
5
  SHA512:
6
- metadata.gz: 9e19aa64eb41e00f650f5409f58d49f57ec3b61d9b66d151dc3ddc3d7252e17dd3f141ee9e31eadb047a5f8adaf890126d78cafa15592349c315358800759299
7
- data.tar.gz: 3daf791a92804879df3b0d0b85b07827319de88e1da36d7ca96e1a8a79d141757509fbd2e2579861af8ac9bdaf72a183b04b815427a36544756a05518528e9d0
6
+ metadata.gz: b77749d09eccb1fe0e6beac76620301805a46186d75262964d268e6ed08b03a85d9276e765ff72663473628d6019857ef27d089dac4e48c1e3fb416fde1c3242
7
+ data.tar.gz: 07f4f007c27bcf100a4cdfb488a8080b1eb12701a2203af73a0727644ac4555d1a26b8903af316d9923ba933a78e0fe0f2342247448abd39b0a2dca72bd0790c
@@ -42,21 +42,23 @@ module OpenSSL::Win::Root
42
42
  end if On
43
43
 
44
44
  def self.save(path=path)
45
- my={}
45
+ names={}
46
+ hashes={}
46
47
  Crypt.each do |crt|
47
- File.open File.join(path, name='%08x.0'%crt.subject.hash), 'w' do |f|
48
- my[name]=1
48
+ hash=crt.subject.hash
49
+ names[name='%08x.%i' % [hash, hashes[hash]||=0]]=1
50
+ hashes[hash]+=1
51
+ File.open File.join(path, name), 'w' do |f|
49
52
  f.puts <<-EOT
50
53
  Subject: #{crt.subject}
51
54
  Valid: #{crt.not_before} - #{crt.not_after}
52
55
  Saved: #{self} v#{VERSION} @#{Time.now}
53
56
  #{crt.to_pem}
54
- #{crt.to_text}
55
57
  EOT
56
58
  end
57
59
  end
58
60
  Dir.glob File.join path, '*' do |f|
59
- File.unlink f unless my[File.basename f]
61
+ File.unlink f unless names[File.basename f]
60
62
  end
61
63
  end
62
64
 
@@ -1,7 +1,7 @@
1
1
  module OpenSSL
2
2
  module Win
3
3
  module Root
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl-win-root
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Ukolov