Author: nhosoi
Update of /cvs/dirsec/console/src/com/netscape/management/client/security
In directory
cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5197/src/com/netscape/management/client/security
Modified Files:
CertInstallSetTrustPage.java CertificateDialog.java
Log Message:
Bug 158926 - Unable to install CA certificate when using hardware token
( LunaSA )
https://bugzilla.redhat.com/show_bug.cgi?id=158926
Description: CertificateDialog passes the token name selected from the
Security Device menu to ServerCertificatePane, but NOT to CACertificatePane.
Due to this, when a hardware token was selected as a Security Device on
CACertificatePane, installing CA cert was not forwarded to the hardware
token. Also, it was missing to send a passowrd for the Security Device on
CACertificatePane, which caused the install fail with an error "Password".
This patch solves the problems.
Index: CertInstallSetTrustPage.java
===================================================================
RCS file:
/cvs/dirsec/console/src/com/netscape/management/client/security/CertInstallSetTrustPage.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- CertInstallSetTrustPage.java 18 Jul 2005 00:34:15 -0000 1.1.1.1
+++ CertInstallSetTrustPage.java 4 Mar 2011 17:18:58 -0000 1.2
@@ -33,6 +33,7 @@
class CertInstallSetTrustPage extends WizardPage implements SuiConstants {
JCheckBox clientTrust, serverTrust;
+ Hashtable pwdCache = new Hashtable();
public boolean nextInvoked() {
boolean canProceed = false;
@@ -56,6 +57,10 @@
args.put("dercert" , dataCollectionModel.getValue("dercert"));
args.put("certtype" ,
dataCollectionModel.getValue("certtype"));
args.put("certname" ,
dataCollectionModel.getValue("certname"));
+ for (Enumeration e=pwdCache.keys(); e.hasMoreElements();) {
+ Object tokenPwd = e.nextElement();
+ args.put(tokenPwd, pwdCache.get(tokenPwd));
+ }
int t = (clientTrust.isSelected()?EditTrustDialog.TRUSTED_CLIENT_CA:0) |
(serverTrust.isSelected()?EditTrustDialog.TRUSTED_CA:0);
@@ -70,6 +75,8 @@
consoleInfo.getAuthenticationDN(),
consoleInfo.getAuthenticationPassword());
+ SecurityUtil.execWithPwdInput(admTask, args, pwdCache);
+
admTask.setArguments(args);
admTask.exec();
Index: CertificateDialog.java
===================================================================
RCS file:
/cvs/dirsec/console/src/com/netscape/management/client/security/CertificateDialog.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- CertificateDialog.java 18 Jul 2005 00:34:16 -0000 1.1.1.1
+++ CertificateDialog.java 4 Mar 2011 17:18:58 -0000 1.2
@@ -285,6 +285,7 @@
}
CertificateDialog.this.serverCertificatePane.setTokenName(token.toString());
+
CertificateDialog.this.caCertificatePane.setTokenName(token.toString());
SwingUtilities.invokeLater(new Runnable() {
public void run() {