Class: Saml::Elements::KeyInfo

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/saml/elements/key_info.rb,
lib/saml/elements/key_info/x509_data.rb

Defined Under Namespace

Classes: X509Data

Instance Method Summary collapse

Constructor Details

#initialize(cert = nil) ⇒ KeyInfo

Returns a new instance of KeyInfo.



18
19
20
21
22
23
24
25
# File 'lib/saml/elements/key_info.rb', line 18

def initialize(cert = nil)
  if cert
    self.x509Data = X509Data.new(cert)
  end
  if self.x509Data && self.x509Data.x509certificate
    self.key_name = Digest::SHA1.hexdigest(self.x509Data.x509certificate.to_der)
  end
end