mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +01:00
Changing PKCS to PKCS11 and config to library for proper terminology.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@9692 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
a0021b17be
commit
0a5229f7ad
2 changed files with 11 additions and 11 deletions
|
@ -46,7 +46,7 @@ public class ConnectionConfiguration implements Cloneable {
|
|||
private String truststorePassword;
|
||||
private String keystorePath;
|
||||
private String keystoreType;
|
||||
private String pkcsConfig;
|
||||
private String pkcs11Library;
|
||||
private boolean verifyChainEnabled = false;
|
||||
private boolean verifyRootCAEnabled = false;
|
||||
private boolean selfSignedCertificateEnabled = false;
|
||||
|
@ -133,7 +133,7 @@ public class ConnectionConfiguration implements Cloneable {
|
|||
truststorePassword = "changeit";
|
||||
keystorePath = System.getProperty("javax.net.ssl.keyStore");
|
||||
keystoreType = "jks";
|
||||
pkcsConfig = "pkcs11.config";
|
||||
pkcs11Library = "pkcs11.config";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -288,23 +288,23 @@ public class ConnectionConfiguration implements Cloneable {
|
|||
|
||||
|
||||
/**
|
||||
* Returns the PKCS11 configuration file location, needed when the
|
||||
* Returns the PKCS11 library file location, needed when the
|
||||
* Keystore type is PKCS11.
|
||||
*
|
||||
* @return the path to the PKCS11 configuration file
|
||||
* @return the path to the PKCS11 library file
|
||||
*/
|
||||
public String getPKCSConfig() {
|
||||
return pkcsConfig;
|
||||
public String getPKCS11Library() {
|
||||
return pkcs11Library;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the PKCS11 configuration file location, needed when the
|
||||
* Sets the PKCS11 library file location, needed when the
|
||||
* Keystore type is PKCS11
|
||||
*
|
||||
* @param pkcsConfig the path to the PKCS11 configuration file
|
||||
* @param pkcs11Library the path to the PKCS11 library file
|
||||
*/
|
||||
public void setPKCSConfig(String pkcsConfig) {
|
||||
this.pkcsConfig = pkcsConfig;
|
||||
public void setPKCS11Library(String pkcs11Library) {
|
||||
this.pkcs11Library = pkcs11Library;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1317,7 +1317,7 @@ public class XMPPConnection {
|
|||
else if(configuration.getKeystoreType().equals("PKCS11")) {
|
||||
try {
|
||||
Constructor c = Class.forName("sun.security.pkcs11.SunPKCS11").getConstructor(InputStream.class);
|
||||
String pkcs11Config = "name = SmartCard\nlibrary = "+configuration.getPKCSConfig();
|
||||
String pkcs11Config = "name = SmartCard\nlibrary = "+configuration.getPKCS11Library();
|
||||
ByteArrayInputStream config = new ByteArrayInputStream(pkcs11Config.getBytes());
|
||||
Provider p = (Provider)c.newInstance(config);
|
||||
Security.addProvider(p);
|
||||
|
|
Loading…
Reference in a new issue