}
private void importUserCert() {
Log.debug(CLASS_NAME, "ImportUserCert=>certName=" + filePath);
PKCS12 pkcs12 = null;
try {
if (userCerts == null) {
userCerts = new KeyStore(FileBaseUtil.getUserKeyStorePath(),
storePW);
userCerts.initialize();
}
// check pkcs12 certificate
pkcs12 = CertificateUtil.getPKCS12Certificate(filePath, importPW);
if (pkcs12 == null) {
throw new SignOnException(
mh.getMessage("failure_opening_pkcs12"));
}
// make alias name.
X509Certificate cert = (X509Certificate) pkcs12.getCertificate();
String alias = CertificateNameUtil.makeAliasName(cert);
// add ks
userCerts.setKeyEntry(alias, pkcs12.getKey(), importPW,
pkcs12.getCertificateChain());
userCerts.store();
String cn = CertificateNameUtil.getCommonName(cert);
SubjectName dn = new SubjectName(alias, cn);
if (controller == null) {