summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/server/src/helpers/verifySignature.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/server/src/helpers/verifySignature.ts b/packages/server/src/helpers/verifySignature.ts
index f9eb747..a2a54dc 100644
--- a/packages/server/src/helpers/verifySignature.ts
+++ b/packages/server/src/helpers/verifySignature.ts
@@ -3,7 +3,6 @@ import { verify as ed25519Verify } from '@noble/ed25519';
import { COSEKEYS, COSEKTY, COSEPublicKey } from './convertCOSEtoPKCS';
import { convertCertBufferToPEM } from './convertCertBufferToPEM';
-import { convertPublicKeyToPEM } from './convertPublicKeyToPEM';
import { isoCBOR, isoCrypto } from './iso';
type VerifySignatureOptsLeafCert = {
@@ -73,11 +72,8 @@ export async function verifySignature(
}
return ed25519Verify(signature, signatureBase, (x as Uint8Array));
- } else if (kty === COSEKTY.EC2) {
- return isoCrypto.verify(cosePublicKey, signature, signatureBase);
} else {
- // Convert pubKey to PEM for ECC and RSA
- publicKeyPEM = convertPublicKeyToPEM(credentialPublicKey);
+ return isoCrypto.verify(cosePublicKey, signature, signatureBase);
}
}