ssltool 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssltool/chain_resolution.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 610613b7103acc41eb99b6906c13abd33fab9462
|
4
|
+
data.tar.gz: f8266de4babff6a3a3977e89ec2ad1afaa7f85ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59097c73aeaa0fbdafa955999332548025bd5f065c14a66f4ab3ed067cd35a1c036675d570616503e7b3c987c0653fc8150e57ead319ae270fe8e5bdee187c4c
|
7
|
+
data.tar.gz: 9e3749aa4be99f2ad8649d40e96c85f86eeb97a8d6286453bc362fa1afa69299bc0c9f679694f29ab5f926a2195194c287d61d6a11e4327f809b13c4861b8da7
|
@@ -27,7 +27,7 @@ module SSLTool
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def initialize(original_chain, certificate_store)
|
30
|
-
@original_chain = original_chain.uniq.freeze
|
30
|
+
@original_chain = CertificateBundle.new(original_chain.uniq).freeze
|
31
31
|
@certificate_store = certificate_store
|
32
32
|
@domain_certs, @other_certs = @original_chain.partition(&:for_domain_name?)
|
33
33
|
@original_chain.empty? and raise ZeroCertsChainResolutionError
|
@@ -48,9 +48,14 @@ module SSLTool
|
|
48
48
|
@ordered = true
|
49
49
|
@trusted = @certificate_store.trust? @resolved_chain
|
50
50
|
@self_signed_untrusted = @resolved_chain.last.self_signed? && !@trusted
|
51
|
+
@recommended_chain = case \
|
52
|
+
when @originally_ordered && @originally_trusted ; @original_chain
|
53
|
+
when @originally_trusted ; @ordered_chain
|
54
|
+
else ; self
|
55
|
+
end
|
51
56
|
end
|
52
57
|
|
53
|
-
attrs = %w[ base_cert domain_names original_chain ordered_chain resolved_chain unused_certs ]
|
58
|
+
attrs = %w[ base_cert domain_names original_chain ordered_chain resolved_chain recommended_chain unused_certs ]
|
54
59
|
bools = %w[ originally_ordered originally_trusted ordered trusted self_signed_untrusted ]
|
55
60
|
attr_reader *attrs, *bools
|
56
61
|
bools.each { |m| alias_method "#{m}?", m; private m }
|