1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.crypto.pkix.internal

File BcX509TBSCertificateBuilder.java

 

Code metrics

0
0
0
1
100
18
0
-
-
0
-

Classes

Class Line # Actions
BcX509TBSCertificateBuilder 36 0 - 0 0
-1.0 -
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.crypto.pkix.internal;
21   
22    import java.math.BigInteger;
23    import java.util.Date;
24   
25    import org.bouncycastle.asn1.x509.TBSCertificate;
26    import org.xwiki.crypto.params.cipher.asymmetric.PublicKeyParameters;
27    import org.xwiki.crypto.pkix.params.PrincipalIndentifier;
28    import org.xwiki.crypto.signer.Signer;
29   
30    /**
31    * Common interface for X.509 TBS builders.
32    *
33    * @version $Id: 13b76f0c465c281bec65ce508879df8bc8efe28c $
34    * @since 5.4
35    */
 
36    public interface BcX509TBSCertificateBuilder
37    {
38    /**
39    * Set the serialNumber value.
40    *
41    * @param serial the serialNumber value.
42    * @return this builder to allow chaining.
43    */
44    BcX509TBSCertificateBuilder setSerialNumber(BigInteger serial);
45   
46    /**
47    * Set the public key of the subject.
48    *
49    * @param subject public key parameters.
50    * @return this builder to allow chaining.
51    */
52    BcX509TBSCertificateBuilder setSubjectPublicKeyInfo(PublicKeyParameters subject);
53   
54    /**
55    * Set the issuer (subject distinguished name) value.
56    *
57    * @param issuer a principal identifier.
58    * @return this builder to allow chaining.
59    */
60    BcX509TBSCertificateBuilder setIssuer(PrincipalIndentifier issuer);
61   
62    /**
63    * Set the subject (subject distinguished name) value.
64    *
65    * @param subject a principal identifier.
66    * @return this builder to allow chaining.
67    */
68    BcX509TBSCertificateBuilder setSubject(PrincipalIndentifier subject);
69   
70    /**
71    * Set the date before which the certificate is not valid.
72    *
73    * @param time a date.
74    * @return this builder to allow chaining.
75    */
76    BcX509TBSCertificateBuilder setStartDate(Date time);
77   
78    /**
79    * Set the date after which the certificate is not valid.
80    *
81    * @param time a date.
82    * @return this builder to allow chaining.
83    */
84    BcX509TBSCertificateBuilder setEndDate(Date time);
85   
86    /**
87    * Set the signature algorithm.
88    *
89    * @param signer the signer that will be used to sign the certificate.
90    * @return this builder to allow chaining.
91    */
92    BcX509TBSCertificateBuilder setSignature(Signer signer);
93   
94    /**
95    * Build the TBS certificate.
96    *
97    * @return a TBS certificate.
98    */
99    TBSCertificate build();
100    }