* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
}
return name;
}
-
-
+
+
public PKCS10CertificationRequest generateCSR(Trans trans) throws IOException, CertException {
PKCS10CertificationRequestBuilder builder = new JcaPKCS10CertificationRequestBuilder(x500Name(),keypair(trans).getPublic());
if (challenge!=null) {
DERPrintableString password = new DERPrintableString(challenge);
builder.addAttribute(PKCSObjectIdentifiers.pkcs_9_at_challengePassword, password);
}
-
+
int plus = email==null?0:1;
if (!sanList.isEmpty()) {
GeneralName[] gna = new GeneralName[sanList.size()+plus];
gna[++i]=new GeneralName(GeneralName.dNSName,s);
}
gna[++i]=new GeneralName(GeneralName.rfc822Name,email);
-
+
builder.addAttribute(
PKCSObjectIdentifiers.pkcs_9_at_extensionRequest,
new Extensions(new Extension[] {
throw new CertException(e);
}
}
-
+
@SuppressWarnings("deprecation")
public static void dump(PKCS10CertificationRequest csr) {
Attribute[] certAttributes = csr.getAttributes();
}
}
}
-
+
public X509Certificate initialConversationCert(Trans trans) throws CertificateException, OperatorCreationException {
GregorianCalendar gc = new GregorianCalendar();
Date start = gc.getTime();
public void environment(String env) {
environment = env;
}
-
+
/**
- *
+ *
* @return
*/
public String environment() {
return environment;
}
-
+
/**
* @return the mechID
*/
public void challenge(String challenge) {
this.challenge = challenge;
}
-
+
}