/** * Load a key store from a resource. * * @param aKeyStoreType * Type of key store. May not be <code>null</code>. * @param sKeyStorePath * The path pointing to the key store. May not be <code>null</code>. * @param sKeyStorePassword * The key store password. May be <code>null</code> to indicate that no * password is required. * @return The Java key-store object. * @throws GeneralSecurityException * In case of a key store error * @throws IOException * In case key store loading fails * @throws IllegalArgumentException * If the key store path is invalid */ @Nonnull public static KeyStore loadKeyStoreDirect (@Nonnull final IKeyStoreType aKeyStoreType, @Nonnull final String sKeyStorePath, @Nullable final String sKeyStorePassword) throws GeneralSecurityException, IOException { return loadKeyStoreDirect (aKeyStoreType, sKeyStorePath, sKeyStorePassword == null ? null : sKeyStorePassword.toCharArray ()); }
aKeyStore = loadKeyStoreDirect (aKeyStoreType, sKeyStorePath, sKeyStorePassword);
m_aKeyStore = KeyStoreHelper.loadKeyStoreDirect (m_eTruststoreType, m_sTruststorePath, m_sTrustStorePassword);
try final KeyStore aKS = KeyStoreHelper.loadKeyStoreDirect (aTS.getType (), aTS.getPath (), aTS.getPassword ()); aCert = (X509Certificate) aKS.getCertificate (aTS.getAlias ());