use of com.webauthn4j.data.attestation.statement.PackedAttestationStatement in project webauthn4j by webauthn4j.
the class NullCertPathTrustworthinessValidatorTest method validate.
@Test
void validate() {
PackedAttestationStatement attestationStatement = TestAttestationStatementUtil.createBasicPackedAttestationStatement();
validator.validate(new AAGUID("c4781c71-69d5-48ca-b228-c0ecaa41c75a"), attestationStatement);
}
use of com.webauthn4j.data.attestation.statement.PackedAttestationStatement in project webauthn4j by webauthn4j.
the class DefaultSelfAttestationTrustworthinessValidatorTest method validate_test.
@Test
void validate_test() {
DefaultSelfAttestationTrustworthinessValidator validator = new DefaultSelfAttestationTrustworthinessValidator();
PackedAttestationStatement attestationStatement = TestAttestationStatementUtil.createSelfPackedAttestationStatement(COSEAlgorithmIdentifier.ES256, new byte[32]);
validator.validate(attestationStatement);
}
use of com.webauthn4j.data.attestation.statement.PackedAttestationStatement in project webauthn4j by webauthn4j.
the class DefaultSelfAttestationTrustworthinessValidatorTest method validate_test_with_self_attestation_allowed_false.
@Test
void validate_test_with_self_attestation_allowed_false() {
DefaultSelfAttestationTrustworthinessValidator validator = new DefaultSelfAttestationTrustworthinessValidator();
validator.setSelfAttestationAllowed(false);
PackedAttestationStatement attestationStatement = TestAttestationStatementUtil.createSelfPackedAttestationStatement(COSEAlgorithmIdentifier.ES256, new byte[32]);
assertThrows(SelfAttestationProhibitedException.class, () -> validator.validate(attestationStatement));
}
use of com.webauthn4j.data.attestation.statement.PackedAttestationStatement in project webauthn4j by webauthn4j.
the class NullSelfAttestationTrustworthinessValidatorTest method validate_test.
@Test
void validate_test() {
PackedAttestationStatement attestationStatement = TestAttestationStatementUtil.createSelfPackedAttestationStatement(COSEAlgorithmIdentifier.ES256, new byte[32]);
validator.validate(attestationStatement);
}
use of com.webauthn4j.data.attestation.statement.PackedAttestationStatement in project webauthn4j by webauthn4j.
the class PackedAttestationStatementValidatorTest method validateAttestationStatementNotNull_test.
@Test
void validateAttestationStatementNotNull_test() {
PackedAttestationStatement attestationStatement = new PackedAttestationStatement(COSEAlgorithmIdentifier.ES256, new byte[32], new AttestationCertificatePath());
target.validateAttestationStatementNotNull(attestationStatement);
}
Aggregations