diff options
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; - } -} |