From 34f6c750a96a0aef9c358ca71a3766824c89e3cd Mon Sep 17 00:00:00 2001 From: balachandarg-tw Date: Wed, 23 Apr 2025 06:42:07 +0530 Subject: [PATCH] [INJIMOB-3188]: Defaulting RSA key type (#1900) Signed-off-by: BalachandarG --- .talismanrc | 2 +- machines/Issuers/IssuersService.ts | 7 +++---- shared/constants.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.talismanrc b/.talismanrc index 5cc8545b..c01a597d 100644 --- a/.talismanrc +++ b/.talismanrc @@ -272,7 +272,7 @@ fileignoreconfig: - filename: injitest/automation_trigger.sh checksum: f2f34839c99cb1b871dde17aed8508a071345d22738796e005ff709d2dab8644 - filename: machines/Issuers/IssuersService.ts - checksum: 880c77c31b0ead3e4bce572cdd3d6313faa88d42d3a608ece9c6b445efc1bef6 + checksum: a87c0b8c73e0282e4c3075cef64effed9ecc456abaa369e9265f2c54e109e325 - filename: screens/Home/ViewVcModal.tsx checksum: cfb25d562185488432b76287c4ef93359c1c64d8e29f5755d4c0a726c1485442 - filename: injitest/src/main/resources/TestData.json diff --git a/machines/Issuers/IssuersService.ts b/machines/Issuers/IssuersService.ts index 2d57cdd2..c0fb5888 100644 --- a/machines/Issuers/IssuersService.ts +++ b/machines/Issuers/IssuersService.ts @@ -193,11 +193,10 @@ export const IssuersService = () => { } return response; }, - - fetchKeyPair: async () => { - return await fetchKeyPair(KeyTypes.RS256); + fetchKeyPair: async context => { + const keyType = context.vcMetadata?.downloadKeyType; + return await fetchKeyPair(keyType); }, - addWalletBindingId: async context => { const response = await request( API_URLS.walletBinding.method, diff --git a/shared/constants.ts b/shared/constants.ts index 2850f881..1046735f 100644 --- a/shared/constants.ts +++ b/shared/constants.ts @@ -78,10 +78,10 @@ export function isIOS(): boolean { return Platform.OS === 'ios'; } export const SUPPORTED_KEY_TYPES = { + RSA: KeyTypes.RS256, ED25519: KeyTypes.ED25519, 'ECC K1': KeyTypes.ES256K, 'ECC R1': KeyTypes.ES256, - RSA: KeyTypes.RS256, }; export function isAndroid(): boolean {