From f39ab43fc0120b7fa97028d40acd7851de8d4a99 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 24 Nov 2022 14:14:37 +0100 Subject: Repository moved to GitHub: https://github.com/a-sit/pdf-over --- .../asit/pdfover/gui/keystore/KeystoreUtils.java | 28 ---------------------- 1 file changed, 28 deletions(-) delete mode 100644 pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore/KeystoreUtils.java (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/keystore') 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; - } -} -- cgit v1.2.3