ssltool 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ssltool/chain_resolution.rb +7 -3
  2. metadata +1 -1
@@ -16,6 +16,10 @@ module SSLTool
16
16
  end
17
17
  end
18
18
 
19
+ class CertificateBundle < Array
20
+ alias_method :to_pem, :join
21
+ end
22
+
19
23
  def initialize(original_chain, certificate_store)
20
24
  @original_chain = original_chain.uniq.freeze
21
25
  @certificate_store = certificate_store
@@ -27,9 +31,9 @@ module SSLTool
27
31
  else ; raise TooManyHeadsChainResolutionError.new(@domain_certs)
28
32
  end
29
33
  @base_cert = @domain_certs.first
30
- @ordered_chain = @base_cert.chain_from(@other_certs).freeze
31
- @resolved_chain = @base_cert.chain_from(@certificate_store.combined_trusted_pool).freeze
32
- @unused_certs = (@other_certs - @resolved_chain).freeze
34
+ @ordered_chain = CertificateBundle.new(@base_cert.chain_from(@other_certs)).freeze
35
+ @resolved_chain = CertificateBundle.new(@base_cert.chain_from(@certificate_store.combined_trusted_pool)).freeze
36
+ @unused_certs = CertificateBundle.new(@other_certs - @resolved_chain).freeze
33
37
  @domain_names = @base_cert.domain_names.freeze
34
38
  @originally_ordered = @original_chain == @ordered_chain
35
39
  @originally_trusted = @certificate_store.trust? @ordered_chain
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssltool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: