@@ -50,7 +50,7 @@ public class CertificateRequestMessageBuilder
5050 private POPOPrivKey popoPrivKey ;
5151 private ASN1Null popRaVerified ;
5252 private PKMACValue agreeMAC ;
53- private AttributeTypeAndValue [] attributeTypeAndValues ;
53+ private AttributeTypeAndValue [] regInfo ;
5454
5555 public CertificateRequestMessageBuilder (BigInteger certReqId )
5656 {
@@ -59,13 +59,13 @@ public CertificateRequestMessageBuilder(BigInteger certReqId)
5959 this .extGenerator = new ExtensionsGenerator ();
6060 this .templateBuilder = new CertTemplateBuilder ();
6161 this .controls = new ArrayList ();
62- this .attributeTypeAndValues = new AttributeTypeAndValue [ 0 ] ;
62+ this .regInfo = null ;
6363 }
6464
65- public CertificateRequestMessageBuilder setAttributeTypeAndValues (AttributeTypeAndValue [] attributeTypeAndValues ) {
66- if ( attributeTypeAndValues != null ) {
67- this .attributeTypeAndValues = attributeTypeAndValues ;
68- }
65+ public CertificateRequestMessageBuilder setRegInfo (AttributeTypeAndValue [] regInfo )
66+ {
67+ this .regInfo = regInfo ;
68+
6969 return this ;
7070 }
7171
@@ -113,8 +113,7 @@ public CertificateRequestMessageBuilder setSerialNumber(BigInteger serialNumber)
113113 * Request a validity period for the certificate. Either, but not both, of the date parameters may be null.
114114 *
115115 * @param notBeforeDate not before date for certificate requested.
116- * @param notAfterDate not after date for the certificate requested.
117- *
116+ * @param notAfterDate not after date for the certificate requested.
118117 * @return the current builder.
119118 */
120119 public CertificateRequestMessageBuilder setValidity (Date notBeforeDate , Date notAfterDate )
@@ -136,8 +135,8 @@ private Time createTime(Date date)
136135
137136 public CertificateRequestMessageBuilder addExtension (
138137 ASN1ObjectIdentifier oid ,
139- boolean critical ,
140- ASN1Encodable value )
138+ boolean critical ,
139+ ASN1Encodable value )
141140 throws CertIOException
142141 {
143142 CRMFUtil .addExtension (extGenerator , oid , critical , value );
@@ -147,8 +146,8 @@ public CertificateRequestMessageBuilder addExtension(
147146
148147 public CertificateRequestMessageBuilder addExtension (
149148 ASN1ObjectIdentifier oid ,
150- boolean critical ,
151- byte [] value )
149+ boolean critical ,
150+ byte [] value )
152151 {
153152 extGenerator .addExtension (oid , critical , value );
154153
@@ -313,15 +312,15 @@ else if (popoPrivKey != null)
313312 else if (agreeMAC != null )
314313 {
315314 proofOfPossession = new ProofOfPossession (ProofOfPossession .TYPE_KEY_AGREEMENT ,
316- POPOPrivKey .getInstance (new DERTaggedObject (false , POPOPrivKey .agreeMAC , agreeMAC )));
315+ POPOPrivKey .getInstance (new DERTaggedObject (false , POPOPrivKey .agreeMAC , agreeMAC )));
317316
318317 }
319318 else if (popRaVerified != null )
320319 {
321320 proofOfPossession = new ProofOfPossession ();
322321 }
323322
324- CertReqMsg certReqMsg = new CertReqMsg (request , proofOfPossession , attributeTypeAndValues );
323+ CertReqMsg certReqMsg = new CertReqMsg (request , proofOfPossession , regInfo );
325324
326325 return new CertificateRequestMessage (certReqMsg );
327326 }
0 commit comments