Class: WebAuthn::AttestationStatement::Packed

Inherits:
Base
  • Object
show all
Defined in:
lib/webauthn/attestation_statement/packed.rb

Constant Summary

Constants inherited from Base

Base::AAGUID_EXTENSION_OID

Instance Method Summary collapse

Methods inherited from Base

#attestation_certificate, #attestation_certificate_key_id, #format, #initialize

Constructor Details

This class inherits a constructor from WebAuthn::AttestationStatement::Base

Instance Method Details

#valid?(authenticator_data, client_data_hash) ⇒ Boolean

Follows “Verification procedure”

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
19
20
# File 'lib/webauthn/attestation_statement/packed.rb', line 11

def valid?(authenticator_data, client_data_hash)
  valid_format? &&
    valid_algorithm?(authenticator_data.credential) &&
    valid_ec_public_keys?(authenticator_data.credential) &&
    meet_certificate_requirement? &&
    matching_aaguid?(authenticator_data.attested_credential_data.raw_aaguid) &&
    valid_signature?(authenticator_data, client_data_hash) &&
    trustworthy?(aaguid: authenticator_data.aaguid) &&
    [attestation_type, attestation_trust_path]
end