mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-29 15:44:14 +00:00
Catch DecoderException in the tcg_rim_tool CredentialParser class.
This commit is contained in:
parent
71ec0cbd97
commit
3accb244e9
@ -10,6 +10,7 @@ import org.bouncycastle.openssl.PEMKeyPair;
|
||||
import org.bouncycastle.openssl.PEMParser;
|
||||
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
|
||||
import org.bouncycastle.util.encoders.Base64;
|
||||
import org.bouncycastle.util.encoders.DecoderException;
|
||||
|
||||
import java.io.*;
|
||||
import java.security.*;
|
||||
@ -154,6 +155,8 @@ public class CredentialParser {
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
System.out.println("Unable to locate private key file: " + filename);
|
||||
} catch (DecoderException e) {
|
||||
System.out.println("Failed to parse uploaded pem file: " + e.getMessage());
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
System.out.println("Unable to instantiate KeyFactory with algorithm: " + algorithm);
|
||||
} catch (IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user