Class: TPM::AIKCertificate

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/tpm/aik_certificate.rb

Overview

Constant Summary collapse

ASN_V3 =
2
EMPTY_NAME =
OpenSSL::X509::Name.new([]).freeze
SAN_DIRECTORY_NAME =
4
OID_TCG =
"2.23.133"
OID_TCG_AT_TPM_MANUFACTURER =
"#{OID_TCG}.2.1"
OID_TCG_AT_TPM_MODEL =
"#{OID_TCG}.2.2"
OID_TCG_AT_TPM_VERSION =
"#{OID_TCG}.2.3"
OID_TCG_KP_AIK_CERTIFICATE =
"#{OID_TCG}.8.3"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_der(certificate_der) ⇒ Object



19
20
21
# File 'lib/tpm/aik_certificate.rb', line 19

def self.from_der(certificate_der)
  new(OpenSSL::X509::Certificate.new(certificate_der))
end

Instance Method Details

#conformant?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
28
29
30
# File 'lib/tpm/aik_certificate.rb', line 23

def conformant?
  in_use? &&
    valid_version? &&
    valid_extended_key_usage? &&
    valid_basic_constraints? &&
    empty_subject? &&
    valid_subject_alternative_name?
end