File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
webauthn-server-attestation/src/test/scala/com/yubico/webauthn/attestation Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class CertificateUtilSpec extends AnyFunSpec with Matchers {
19
19
describe(" parseFidoSerNumExtension" ) {
20
20
val idFidoGenCeSernum = " 1.3.6.1.4.1.45724.1.1.2"
21
21
it(" should correctly parse the serial number from a valid certificate with the id-fido-gen-ce-sernum extension." ) {
22
- val goodCert : X509Certificate = TestAuthenticator
22
+ val (cert, _) : ( X509Certificate , _) = TestAuthenticator
23
23
.generateAttestationCertificate(
24
24
name = new X500Name (
25
25
" O=Yubico, C=SE, OU=Authenticator Attestation"
@@ -32,14 +32,13 @@ class CertificateUtilSpec extends AnyFunSpec with Matchers {
32
32
)
33
33
),
34
34
)
35
- ._1
36
35
37
- val result = new ByteArray (
36
+ val result =
38
37
CertificateUtil
39
- .parseFidoSerNumExtension(goodCert )
40
- .get
41
- )
42
- result should equal(ByteArray .fromHex(" 00010203" ))
38
+ .parseFidoSerNumExtension(cert )
39
+ .toScala
40
+ .map( new ByteArray (_) )
41
+ result should equal(Some ( ByteArray .fromHex(" 00010203" ) ))
43
42
}
44
43
45
44
it(" correctly parses the serial number from a real YubiKey enterprise attestation certificate." ) {
You can’t perform that action at this time.
0 commit comments