Difference between revisions of "Java PKCS11"

From Dogtag
Jump to: navigation, search
(Created page with "= Sun PKCS#11 Provider = Main class: sun.security.pkcs11.SunPKCS11 == Installation == See [https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec...")
 
m (References)
Line 24: Line 24:
  
 
* [[Java]]
 
* [[Java]]
 +
* [https://docs.oracle.com/javase/8/docs/technotes/guides/security/p11guide.html JDK 8 PKCS#11 Reference Guide]
 
* [[JSS]]
 
* [[JSS]]

Revision as of 11:56, 29 May 2018

Sun PKCS#11 Provider

Main class: sun.security.pkcs11.SunPKCS11

Installation

See Installing Providers.

Static Installation

To install the provider statically, add the following property into $JAVA_HOME/lib/security/java.security:

security.provider.7=sun.security.pkcs11.SunPKCS11 /opt/bar/cfg/pkcs11.cfg

Dynamic Installation

To install the provider dynamically, use the following code:

String configName = "/opt/bar/cfg/pkcs11.cfg";
Provider p = new sun.security.pkcs11.SunPKCS11(configName);
Security.addProvider(p);

References