Difference between revisions of "Java PKCS11"

From Dogtag
Jump to: navigation, search
m (References)
m (Sun PKCS#11 Provider)
Line 2: Line 2:
  
 
Main class: sun.security.pkcs11.SunPKCS11
 
Main class: sun.security.pkcs11.SunPKCS11
 +
 +
See also:
 +
* https://github.com/dmlloyd/openjdk/blob/jdk/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
 +
* https://github.com/dmlloyd/openjdk/blob/jdk/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java
  
 
== Installation ==
 
== Installation ==

Revision as of 18:08, 30 May 2018

Sun PKCS#11 Provider

Main class: sun.security.pkcs11.SunPKCS11

See also:

Installation

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 /etc/pki/nssdb/pkcs11.cfg

Dynamic Installation

To install the provider dynamically, use the following code:

String configName = "/etc/pki/nssdb/pkcs11.cfg";
Provider p = new sun.security.pkcs11.SunPKCS11(configName);
Security.addProvider(p);

Configuration

name=NSS
nssLibraryDirectory=/usr/lib64
nssSecmodDirectory=/etc/pki/nssdb
nssModule=keystore

JSS Provider

References