Class: R509::Cert::Extensions::SubjectKeyIdentifier

Inherits:
OpenSSL::X509::Extension
  • Object
show all
Defined in:
lib/r509/cert/extensions/subject_key_identifier.rb

Overview

RFC 5280 Description (see: www.ietf.org/rfc/rfc5280.txt)

The subject key identifier extension provides a means of identifying certificates that contain a particular public key.

You can use this extension to parse an existing extension for easy access to the contents or create a new one.

Constant Summary

OID =

friendly name for Subject Key Identifier OID

"subjectKeyIdentifier"
SKI_EXTENSION_DEFAULT =

default extension behavior when generating

"hash"

Instance Method Summary collapse

Constructor Details

#initialize(arg) ⇒ SubjectKeyIdentifier

This method takes a hash or an existing Extension object to parse

Parameters:

  • arg (Hash)

    a customizable set of options

Options Hash (arg):

  • :public_key (OpenSSL::PKey) — default: Cert/CSR/PrivateKey return this type from #public_key
  • :critical (Boolean) — default: false


23
24
25
26
27
28
# File 'lib/r509/cert/extensions/subject_key_identifier.rb', line 23

def initialize(arg)
  unless R509::Cert::Extensions.is_extension?(arg)
    arg = build_extension(arg)
  end
  super(arg)
end

Instance Method Details

#keyObject

Returns value of key

Returns:

  • value of key



31
32
33
# File 'lib/r509/cert/extensions/subject_key_identifier.rb', line 31

def key
  self.value
end