Skip to content

Commit 3565df7

Browse files
committed
misc: throw NotSupportedException for unsupported algorithms in GetOidByAlgorithm
1 parent 1e5923a commit 3565df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Yubico.YubiKey/src/Yubico/YubiKey/Cryptography/EcdsaVerify.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ private static string GetOidByAlgorithm(CoseAlgorithmIdentifier algorithm)
462462
CoseAlgorithmIdentifier.ECDHwHKDF256 => KeyDefinitions.KeyOids.P256,
463463
CoseAlgorithmIdentifier.ES384 => KeyDefinitions.KeyOids.P384,
464464
CoseAlgorithmIdentifier.ES512 => KeyDefinitions.KeyOids.P521,
465-
_ => "",
465+
_ => throw new NotSupportedException(ExceptionMessages.UnsupportedAlgorithm)
466466
};
467467
}
468468

0 commit comments

Comments
 (0)