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

- (SubjectKeyIdentifier) initialize(arg)

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


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

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

Instance Method Details

- (Object) key

Value of key

Returns:

  • value of key



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

def key
  return self.value
end