Sha256: 8549c24e810ea3cfce2a0a1a818f36cd4f99ace36b5d6123a7efdfb5b371455c
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
require 'sslyze/certificate/public_key' module SSLyze class Certificate # # Represents the `<subjectPublicKeyInfo>` XML element. # class SubjectPublicKeyInfo # # Initializes the subject public key info. # # @param [Nokogiri::XML::Node] node # The `<subjectPublicKeyInfo>` XML element. # def initialize(node) @node = node end # # Public key info. # # @return [PublicKey] # def public_key @public_key ||= PublicKey.new( @node.at('publicKey/modulus').inner_text, @node.at('publicKey/exponent').inner_text.to_i ) end # # Public key algorithm. # # @return [String] # def public_key_algorithm @public_key_algorithm ||= @node.at('publicKeyAlgorithm').inner_text end # # Public key size. # # @return [Integer] # The key size in bits. # def public_key_size @public_key_size ||= @node.at('publicKeySize').inner_text.chomp(' bits').to_i end end end end
Version data entries
4 entries across 4 versions & 1 rubygems