Commit 5aa95ed

mokha <mokha@cisco.com>
2018-02-08 21:41:24
return x509 if that is what it is.
1 parent fda1bd8
Changed files (2)
lib/xml/kit/certificate.rb
@@ -92,6 +92,7 @@ module Xml
 
       def self.to_x509(value)
         value = Base64.decode64(strip(value)) if base64?(value)
+        return value if value.is_a?(OpenSSL::X509::Certificate)
         OpenSSL::X509::Certificate.new(value)
       end
 
lib/xml/kit/templatable.rb
@@ -46,6 +46,7 @@ module Xml
       #
       # @param key_pair [Xml::Kit::KeyPair] the key pair to use for signing.
       def sign_with(key_pair)
+        self.signing_key_pair = key_pair
         signatures.sign_with(key_pair)
       end