Skip to content

Commit

Permalink
Fix readPrivateKey method
Browse files Browse the repository at this point in the history
  • Loading branch information
dtitov committed Mar 26, 2020
1 parent aa8c9ea commit c67681a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>no.uio.ifi</groupId>
<artifactId>crypt4gh</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
<packaging>jar</packaging>

<name>crypt4gh</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/uio/ifi/crypt4gh/util/KeyUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public PrivateKey readPrivateKey(String keyMaterial, char[] password) throws Gen
byte[] decodedKey = decodeKey(keyMaterial);
try {
return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(decodedKey));
} catch (InvalidKeySpecException e) {
} catch (InvalidKeySpecException | IllegalArgumentException e) {
return readCrypt4GHPrivateKey(decodedKey, password);
}
}
Expand Down

0 comments on commit c67681a

Please sign in to comment.