summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java36
1 files changed, 16 insertions, 20 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java
index 18ddf422..99b87819 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyStoreUtils.java
@@ -17,8 +17,6 @@
* works that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
-
package at.gv.egiz.eaaf.core.impl.utils;
import java.io.BufferedInputStream;
@@ -50,16 +48,14 @@ public class KeyStoreUtils {
*/
private static final String KEYSTORE_TYPE_PKCS12 = "PKCS12";
-
-
/**
* Loads a key store from file.
*
* @param keystoreType key store type
- * @param urlString URL of key store
- * @param password password protecting the key store
+ * @param urlString URL of key store
+ * @param password password protecting the key store
* @return key store loaded
- * @throws IOException thrown while reading the key store from file
+ * @throws IOException thrown while reading the key store from file
* @throws GeneralSecurityException thrown while creating the key store
*/
public static KeyStore loadKeyStore(final String keystoreType, final String urlString,
@@ -74,10 +70,10 @@ public class KeyStoreUtils {
* Load a KeyStore from Filesystem.
*
* @param keyStorePath Path to KeyStore
- * @param password KeyStore password
+ * @param password KeyStore password
* @return KeyStore
* @throws KeyStoreException In case of a keystore error
- * @throws IOException In case of a general read error
+ * @throws IOException In case of a general read error
*/
public static KeyStore loadKeyStore(final String keyStorePath, final String password)
throws KeyStoreException, IOException {
@@ -89,13 +85,15 @@ public class KeyStoreUtils {
}
/**
- * Loads a key store from an <code>InputStream</code>, and closes the <code>InputStream</code>.
+ * Loads a key store from an <code>InputStream</code>, and closes the
+ * <code>InputStream</code>.
*
* @param keystoreType key store type
- * @param in input stream
- * @param password password protecting the key store
+ * @param in input stream
+ * @param password password protecting the key store
* @return key store loaded
- * @throws IOException thrown while reading the key store from the stream
+ * @throws IOException thrown while reading the key store from the
+ * stream
* @throws GeneralSecurityException thrown while creating the key store
*/
public static KeyStore loadKeyStore(final String keystoreType, final InputStream in,
@@ -114,11 +112,11 @@ public class KeyStoreUtils {
/**
* Loads a keyStore without knowing the keyStore type.
*
- * @param is input stream
+ * @param is input stream
* @param password Password protecting the keyStore
* @return keyStore loaded
* @throws KeyStoreException thrown if keyStore cannot be loaded
- * @throws IOException In case of a general error
+ * @throws IOException In case of a general error
*/
public static KeyStore loadKeyStore(final InputStream is, final String password)
throws KeyStoreException, IOException {
@@ -140,10 +138,10 @@ public class KeyStoreUtils {
}
/**
- * Creates a key store from X509 certificate files, aliasing them with the index in the
- * <code>String[]</code>, starting with <code>"0"</code>.
+ * Creates a key store from X509 certificate files, aliasing them with the index
+ * in the <code>String[]</code>, starting with <code>"0"</code>.
*
- * @param keyStoreType key store type
+ * @param keyStoreType key store type
* @param certFilenames certificate filenames
* @return key store created
* @throws Exception In case of an error
@@ -192,6 +190,4 @@ public class KeyStoreUtils {
}
}
-
-
}