diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-11-24 14:14:37 +0100 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-11-24 14:14:37 +0100 |
commit | f39ab43fc0120b7fa97028d40acd7851de8d4a99 (patch) | |
tree | 335caaa8b701395bae64fbf67ca9afb1776ae658 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore | |
parent | a4dd755534013449be5573102114d8dcfccba159 (diff) | |
download | pdf-over-master.tar.gz pdf-over-master.tar.bz2 pdf-over-master.zip |
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java deleted file mode 100644 index 8b7bb59c..00000000 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.asit.pdfover.gui.keystore; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; - -public class KeystoreUtils { - public static KeyStore tryLoadKeystore(File location, String storeType, String storePass) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException { - KeyStore ks = KeyStore.getInstance(storeType); - FileInputStream fis = new FileInputStream(location); - try - { - ks.load(fis, storePass.toCharArray()); - } catch (IOException e) { - UnrecoverableKeyException keyCause = (UnrecoverableKeyException)e.getCause(); - if (keyCause != null) - throw keyCause; - else - throw e; - } - return ks; - } -} |