G
gfrommer
Hello Everyone,
I am having a very strange error. I am trying to load up a PKCS12
file in a KeyStore but the runtime is telling me it cant find the
PKCS12 algorithm in the JSSE provider. Which has me completely baffled
because, before I try and load the keystore I call
Security.getProviders() and print out all the providers and their
accompanying algorithms... and for sure I do see PKCS12 algorithm
printed under the JSSE provider.
But when I load my keystore I get this exception:
java.security.NoSuchAlgorithmException: no such algorithm: pkcs12 for
provider SunJSSE
at sun.security.jca.GetInstance.getService(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at javax.net.ssl.KeyManagerFactory.getInstance(Unknown Source)
at WeNETJavaToolkit.initializeSSL(WeNETJavaToolkit.java:152)
----------------------------------
This is the code I use to load up my PKCS12 keystore.
ks = KeyStore.getInstance("PKCS12", "SunJSSE");
ks.load(new FileInputStream(keystoreFile), password.toCharArray());
------------------------------------
This is my runtime version:
C:\WeNETJavaToolkit>java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode)
-------------------------------------
The algorithm clearly exists but the KeyStore just doesent seem to find
it when in the Keystore.load() method... what am I missing????
Thanks everyone
Greg Frommer
I am having a very strange error. I am trying to load up a PKCS12
file in a KeyStore but the runtime is telling me it cant find the
PKCS12 algorithm in the JSSE provider. Which has me completely baffled
because, before I try and load the keystore I call
Security.getProviders() and print out all the providers and their
accompanying algorithms... and for sure I do see PKCS12 algorithm
printed under the JSSE provider.
But when I load my keystore I get this exception:
java.security.NoSuchAlgorithmException: no such algorithm: pkcs12 for
provider SunJSSE
at sun.security.jca.GetInstance.getService(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at javax.net.ssl.KeyManagerFactory.getInstance(Unknown Source)
at WeNETJavaToolkit.initializeSSL(WeNETJavaToolkit.java:152)
----------------------------------
This is the code I use to load up my PKCS12 keystore.
ks = KeyStore.getInstance("PKCS12", "SunJSSE");
ks.load(new FileInputStream(keystoreFile), password.toCharArray());
------------------------------------
This is my runtime version:
C:\WeNETJavaToolkit>java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode)
-------------------------------------
The algorithm clearly exists but the KeyStore just doesent seem to find
it when in the Keystore.load() method... what am I missing????
Thanks everyone
Greg Frommer