Hi Willard,
I'm very curious as to why you need a private key as a context variable. This is a highly unusual requirement. Private keys should rarely be exposed.
Cheers!
JayMac
------------------------------
Jay MacDonald - Adoption Architect - Broadcom API Management (Layer 7)
------------------------------
Original Message:
Sent: Nov 16, 2023 01:00 PM
From: Willard Jansen
Subject: Private key in context variable
Hi All,
I'm on a Software Gateway 10.1 CR03 on premisse.
Ineed to put a private key from the PK Store into a context variable and encode it to Base64. I tried lookup certificate by name and then base64 encode with encode/decode data properties, but the base64 is invalid. The keychain I use is ones that I created with the gateway itself for dev. I get the following error after using this in a custom assertion: Warning 398 STERR:javasecurity.spec.InvalidKeySpecExeption: java.security.InvalidKeyExeption: IOExeption " DER input, integer tag error.
Help is very much appreciated.
Thanks,
WJ