Skip to content

Commit c186ad8

Browse files
committed
Delete unnecessary attributes from notRetired filter test
1 parent 3825292 commit c186ad8

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

webauthn-server-attestation/src/test/scala/com/yubico/fido/metadata/FidoMds3Spec.scala

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,18 +1038,6 @@ class FidoMds3Spec extends AnyFunSpec with Matchers {
10381038
}
10391039

10401040
describe("The notRetired filter") {
1041-
val attestationRoot = TestAuthenticator.generateAttestationCaCertificate()
1042-
val rootCertBase64 = new ByteArray(attestationRoot._1.getEncoded).getBase64
1043-
1044-
val (goodCert, _) = TestAuthenticator.generateAttestationCertificate(
1045-
name = new X500Name("CN=Good cert"),
1046-
caCertAndKey = Some(attestationRoot),
1047-
)
1048-
1049-
val goodCertKeyIdentifier = new ByteArray(
1050-
CertificateParser.computeSubjectKeyIdentifier(goodCert)
1051-
).getHex
1052-
10531041
val aaguidRetired =
10541042
new AAGUID(ByteArray.fromHex("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
10551043

@@ -1062,16 +1050,13 @@ class FidoMds3Spec extends AnyFunSpec with Matchers {
10621050
"entries": [
10631051
{
10641052
"aaguid": "${aaguidRetired.asGuidString()}",
1065-
"attestationCertificateKeyIdentifiers": ["${goodCertKeyIdentifier}"],
1053+
"attestationCertificateKeyIdentifiers": [],
10661054
"metadataStatement": {
10671055
"aaguid": "${aaguidRetired.asGuidString()}",
1068-
"attestationCertificateKeyIdentifiers": ["${goodCertKeyIdentifier}"],
10691056
"authenticatorVersion": 1,
1070-
"attachmentHint" : ["internal"],
1071-
"attestationRootCertificates": ["${rootCertBase64}"],
1057+
"attestationRootCertificates": [],
10721058
"attestationTypes" : ["basic_full"],
10731059
"authenticationAlgorithms" : ["secp256r1_ecdsa_sha256_raw"],
1074-
"description" : "Test authenticator",
10751060
"keyProtection" : ["software"],
10761061
"matcherProtection" : ["software"],
10771062
"protocolFamily" : "u2f",
@@ -1095,11 +1080,7 @@ class FidoMds3Spec extends AnyFunSpec with Matchers {
10951080
val mds = FidoMetadataService.builder().useBlob(blob).build()
10961081

10971082
mds
1098-
.findTrustRoots(
1099-
List(goodCert).asJava,
1100-
Some(aaguidRetired.asBytes).toJava,
1101-
)
1102-
.getTrustRoots
1083+
.findEntries(aaguidRetired)
11031084
.asScala should not be empty
11041085
}
11051086

@@ -1111,11 +1092,7 @@ class FidoMds3Spec extends AnyFunSpec with Matchers {
11111092
.build()
11121093

11131094
mds
1114-
.findTrustRoots(
1115-
List(goodCert).asJava,
1116-
Some(aaguidRetired.asBytes).toJava,
1117-
)
1118-
.getTrustRoots
1095+
.findEntries(aaguidRetired)
11191096
.asScala shouldBe empty
11201097
}
11211098

0 commit comments

Comments
 (0)