Skip to content

Commit

Permalink
remove unreachable code block
Browse files Browse the repository at this point in the history
  • Loading branch information
kwin committed Oct 19, 2020
1 parent d35fae4 commit 1bd53e0
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,11 @@ private Key(String pemPkcs8PrivateKey, String encryptedPrivateKeyPassword, Strin
if (StringUtils.isBlank(pemPkcs8PrivateKey)) {
throw new InvalidKeyException("The private key must not be blank!");
}

try {
this.encryptedPrivateKeyInfo = decodePKCS8PEM(pemPkcs8PrivateKey);
} catch (IOException e) {
throw new InvalidKeyException("The private key format is wrong", e);
}
if (encryptedPrivateKeyInfo == null) {
throw new InvalidKeyException("The private key is empty");
}
// the same as CryptoSupport.isProtected(...) but must work without the dependency
if (!encryptedPrivateKeyPassword.startsWith("{")) {
throw new InvalidKeyException("The private key password must be given as encrypted value (encrypted with the AEM Crypto Support, i.e. start with '{')");
Expand Down

0 comments on commit 1bd53e0

Please sign in to comment.