[INJIMOB-3546] fix es256 based kb-jwt signing for ios ovp (#2085)

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
This commit is contained in:
abhip2565
2025-09-19 13:29:08 +05:30
committed by GitHub
parent 0713bbb5c4
commit df4dc7b383

View File

@@ -182,8 +182,17 @@ export const openID4VPServices = () => {
const header = JSON.parse(atob(unsignedKBJWT.split('.')[0]));
const alg = header.alg;
const keyType = JWT_ALG_TO_KEY_TYPE[alg];
let privateKey: string;
if (keyType === KeyTypes.ED25519) {
privateKey = context.privateKey;
} else {
const keypair = await fetchKeyPair(keyType);
privateKey = keypair.privateKey;
}
const signature = await createSignature(
context.privateKey,
privateKey,
unsignedKBJWT,
keyType,
);
@@ -203,4 +212,3 @@ export const openID4VPServices = () => {
},
};
};