randomSerial();
}
if( certificateSubjectName == null ) {
if( commonName != null || organizationUnit != null || organizationName != null || country != null ) {
try {
subjectName(new X500Name(commonName, organizationUnit, organizationName, country));
}
catch(Exception e) {
fault(e, "commonName(%s) organizationUnit(%s) organizationName(%s) country(%s)", commonName, organizationUnit, organizationName, country);
}
}
}
if( certificateIssuerName == null ) {
//if( certificateSubjectName != null ) { // assume self-signed ?? or check if we have an issuer cert first ???
// XXX TODO
//}
if( commonName != null || organizationUnit != null || organizationName != null || country != null ) {
try {
issuerName(new X500Name(commonName, organizationUnit, organizationName, country));
}
catch(Exception e) {
fault(e, "commonName(%s) organizationUnit(%s) organizationName(%s) country(%s)", commonName, organizationUnit, organizationName, country);
}
}