The public cert is issued by the claims provider. It is for custom apex JWT verification. I get an error when uploading: "Error: No certificate was imported because the keystore file doesn't contain a PrivateKey entry. Check the file and try again."
"Error: No certificate was imported because the keystore file doesn't contain a PrivateKey entry. Check the file and try again."
This works if I load the public key manually:
Blob publicKey = EncodingUtil.base64Decode('MIIBCg......');
//returns true
System.debug(Crypto.verify('RSA-SHA256', Blob.valueOf(payload), bsignature, publicKey));
I want to be able to use this way instead:
Crypto.verify('RSA-SHA256', Blob.valueOf(payload), bsignature, '<cert name>'))
Folloing is the coomand to create the keystore:
keytool -importcert -file cert.cer -keystore cert.jks -alias stgcert -storetype jks