FIDO::Raw::Cred
version 0.06
FIDO2 Credential
Create a new instance.
Get/set the format, where $format must either be "packed" or "fido-u2f".
$format
"packed"
"fido-u2f"
Get/set the protection. At the moment only CRED_PROT_UV_OPTIONAL, CRED_PROT_UV_OPTIONAL_WITH_ID and FIDO_CRED_PROT_UV_REQUIRED protections are supported.
CRED_PROT_UV_OPTIONAL
CRED_PROT_UV_OPTIONAL_WITH_ID
FIDO_CRED_PROT_UV_REQUIRED
Set the extensions to the bitmask of $flags. At the moment, only EXT_HMAC_SECRET and EXT_CRED_PROTECT are supported.
$flags
EXT_HMAC_SECRET
EXT_CRED_PROTECT
Get/set the the relying party information. $id may be set to undef if required. Returns a hash reference.
$id
undef
Get/set the algorithm, where $cose_alg may be COSE_ES256, COSE_RS256 or COSE_EDDSA. The type of a credential may only be set once. Not all authenticators support COSE_RS256 or COSE_EDDSA.
$cose_alg
COSE_ES256
COSE_RS256
COSE_EDDSA
Get/set the user attributes. Returns a hash reference.
Get/set the resident key attribute.
Get/set the user verification attribute.
Append the credential ID $cred to the list of excluded credentials.
$cred
Get/set the authenticator data. $data must be a CBOR-encoded byte string. Alternatively, authdata_raw may be used to set raw binary blob.
$data
authdata_raw
Set the authenticator data as a raw binary blob.
Get/set the clientdata hash.
Get/set the signature.
Get/set the attestation certification.
Get the authenticator data flags.
Get the credential ID.
Get the authenticator attestation GUID.
Get the public key.
Verifies whether the signature matches the attributes of the credential. This method verifies that the client data hash, relying party ID, credential ID, type, resident key and user verification attributes have been attested by the holder of the private key counterpart of the public key contained in the X509 certificate. The certificate itself is not verified.
The attestation statement formats supported are "packed" and "fido-u2f". The attestation type implemented is Basic Attestation. The attestation key pair is assumed to be of the type ES256. Other attestation formats and types are not supported.
ES256
This method returns a result code of FIDO::Raw::FIDO_OK on success or an error result code otherwise.
FIDO::Raw::FIDO_OK
Jacques Germishuys <jacquesg@striata.com>
Copyright 2020 Jacques Germishuys.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install FIDO::Raw, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FIDO::Raw
CPAN shell
perl -MCPAN -e shell install FIDO::Raw
For more information on module installation, please visit the detailed CPAN module installation guide.