Use a MIME Base64 decoder for attachment signing keys.

This commit is contained in:
Jon Chambers
2021-04-26 18:46:44 -04:00
committed by Jon Chambers
parent 4b42dd1db3
commit 59e401f41e
2 changed files with 2 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ public class CanonicalRequestSigner {
if (matcher.matches()) {
try {
final KeyFactory keyFactory = KeyFactory.getInstance("RSA");
final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(matcher.group(1)));
final PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.getMimeDecoder().decode(matcher.group(1)));
final PrivateKey key = keyFactory.generatePrivate(keySpec);
testKeyIsValidForSigning(key);