Loads a key pair from a Java keystore (JKS or PKCS12) and returns a java.security.KeyPair. Call getPrivate() or getPublic() on the result to pass a key to the JWT functions.
getKeyPairFromKeystore(config)
→ returns any
keystore (absolute path to the keystore file), keystorePassword, keypairPassword and keystoreAlias.
keys = getKeyPairFromKeystore({
"keystore": expandPath("./jwt.p12"),
"keystorePassword": "secret",
"keypairPassword": "secret",
"keystoreAlias": "contentKey"
});
writeOutput(keys.getPublic().getAlgorithm());
Expected Result: RSA
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.