File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/bunq/sdk/security Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ private static String getPrivateKeyFormattedString(PrivateKey privateKey) {
171
171
}
172
172
173
173
/**
174
- * @param publicKeyString X509 Public Key string
174
+ * @param publicKeyString X509 Public Key string
175
175
* @param privateKeyString PKCS8 Private Key string
176
176
*/
177
177
public static KeyPair createKeyPairFromFormattedStrings (String publicKeyString ,
@@ -538,10 +538,11 @@ public static Certificate getCertificateFromFile(String path) throws IOException
538
538
File certificateFile = new File (path );
539
539
if (certificateFile .exists ()) {
540
540
Certificate certificate = new Certificate ();
541
- certificate .setCertificate (FileUtils .readFileToString (certificateFile ));
541
+ certificate .setCertificate (FileUtils .readFileToString (certificateFile , "UTF-8" ));
542
542
return certificate ;
543
+ } else {
544
+ throw new FileNotFoundException ();
543
545
}
544
- throw new FileNotFoundException ();
545
546
}
546
547
547
548
private static byte [] getResponseHeadBytes (int code , List <BunqBasicHeader > headers ) {
You can’t perform that action at this time.
0 commit comments