Skip to content

Commit 6008784

Browse files
committed
Fix other warnings
1 parent 63e1fc5 commit 6008784

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

webauthn-server-core/src/test/scala/com/yubico/webauthn/TestAuthenticator.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,8 @@ object TestAuthenticator {
917917
(TpmAlgHash.SHA512, TpmAlgAsym.ECC)
918918
case COSEAlgorithmIdentifier.RS256 =>
919919
(TpmAlgHash.SHA256, TpmAlgAsym.RSA)
920-
case COSEAlgorithmIdentifier.RS1 => (TpmAlgHash.SHA1, TpmAlgAsym.RSA)
920+
case COSEAlgorithmIdentifier.RS1 => (TpmAlgHash.SHA1, TpmAlgAsym.RSA)
921+
case COSEAlgorithmIdentifier.EdDSA => ???
921922
}
922923
val hashFunc = hashId match {
923924
case TpmAlgHash.SHA256 => Crypto.sha256(_: ByteArray)
@@ -972,6 +973,10 @@ object TestAuthenticator {
972973
case COSEAlgorithmIdentifier.ES256 => 0x0003
973974
case COSEAlgorithmIdentifier.ES384 => 0x0004
974975
case COSEAlgorithmIdentifier.ES512 => 0x0005
976+
case COSEAlgorithmIdentifier.RS1 |
977+
COSEAlgorithmIdentifier.RS256 |
978+
COSEAlgorithmIdentifier.EdDSA =>
979+
???
975980
}))
976981
)
977982
.concat(

webauthn-server-core/src/test/scala/com/yubico/webauthn/WebAuthnTestCodecs.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ object WebAuthnTestCodecs {
4040
alg: COSEAlgorithmIdentifier,
4141
): PrivateKey =
4242
alg match {
43-
case COSEAlgorithmIdentifier.ES256 =>
43+
case COSEAlgorithmIdentifier.ES256 | COSEAlgorithmIdentifier.ES384 |
44+
COSEAlgorithmIdentifier.ES512 =>
4445
val keyFactory: KeyFactory = KeyFactory.getInstance("EC")
4546
val spec = new PKCS8EncodedKeySpec(encodedKey.getBytes)
4647
keyFactory.generatePrivate(spec)

0 commit comments

Comments
 (0)