summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
blob: fb92d53ee644c7694f2ad2579053646f3a0e401b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2007 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;

import com.netscape.certsrv.request.IRequest;

/**
 * This interface represents an enrollment profile.
 * <p>
 * An enrollment profile contains a list of enrollment
 * specific input plugins, default policies, constriant
 * policies and output plugins.
 * <p>
 * This interface also defines a set of enrollment specific
 * attribute names that can be used to retrieve values
 * from an enrollment request.
 * <p>
 *
 * @version $Revision$, $Date$
 */
public interface IEnrollProfile extends IProfile {

    /**
     * Name of request attribute that stores the User 
     * Supplied Certificate Request Type.
     */
    public static final String CTX_CERT_REQUEST_TYPE = "cert_request_type";

    /**
     * Name of request attribute that stores the User 
     * Supplied Certificate Request.
     */
    public static final String CTX_CERT_REQUEST = "cert_request";

    /**
     * Possible values for CTX_CERT_REQUEST_TYPE attribute.
     */
    public static final String REQ_TYPE_PKCS10 = "pkcs10";
    public static final String REQ_TYPE_CRMF = "crmf";
    public static final String REQ_TYPE_CMC = "cmc";
    public static final String REQ_TYPE_KEYGEN = "keygen";

    /**
     * Name of request attribute that stores the End-User Locale. 
     * <p>
     * The value is of type java.util.Locale.
     */
    public static final String REQUEST_LOCALE = "req_locale";

    /**
     * Name of request attribute that stores the sequence number. Consider
     * a CRMF request that may contain multiple certificate request.
     * The first sub certificate certificate request has a sequence
     * number of 0, the next one has a sequence of 1, and so on.
     * <p>
     * The value is of type java.lang.Integer.
     */
    public static final String REQUEST_SEQ_NUM = "req_seq_num";

    /**
     * Name of the request attribute that stores the sequence number for a
     * renewal request. Only one request at a time is permitted for a renewal.
     * This value corresponds to the sequence number (and hence the appropriate
     * certificate) of the original request
     */
    public static final String CTX_RENEWAL_SEQ_NUM = "renewal_seq_num";

    /**
     * Name of request attribute to indicate if this is a renewal
     */
    public static final String CTX_RENEWAL = "renewal";

    /**
     * Name of request attribute that stores the End-User Supplied
     * Key.
     * <p>
     * The value is of type netscape.security.x509.CertificateX509Key
     */
    public static final String REQUEST_KEY = "req_key";

    /**
     * Name of request attribute that stores the End-User Supplied
     * Subject Name.
     * <p>
     * The value is of type netscape.security.x509.CertificateSubjectName
     */
    public static final String REQUEST_SUBJECT_NAME = "req_subject_name";

    /**
     * Name of request attribute that stores the End-User Supplied
     * Validity.
     * <p>
     * The value is of type netscape.security.x509.CertificateValidity
     */
    public static final String REQUEST_VALIDITY = "req_validity";

    /**
     * Name of request attribute that stores the End-User Supplied
     * Signing Algorithm.
     * <p>
     * The value is of type netscape.security.x509.CertificateAlgorithmId
     */
    public static final String REQUEST_SIGNING_ALGORITHM = "req_signing_alg";

    /**
     * Name of request attribute that stores the End-User Supplied
     * Extensions.
     * <p>
     * The value is of type netscape.security.x509.CertificateExtensions
     */
    public static final String REQUEST_EXTENSIONS = "req_extensions";

    /**
     * Name of request attribute that stores the End-User Supplied
     * PKI Archive Option extension. This extension is extracted
     * from a CRMF request that has the user-provided private key.
     * <p>
     * The value is of type byte []
     */
    public static final String REQUEST_ARCHIVE_OPTIONS = "req_archive_options";

    /**
     * Name of request attribute that stores the certificate template
     * that will be signed and then become a certificate.
     * <p>
     * The value is of type netscape.security.x509.X509CertInfo
     */
    public static final String REQUEST_CERTINFO = "req_x509info";

    /**
     * Name of request attribute that stores the issued certificate.
     * <p>
     * The value is of type netscape.security.x509.X509CertImpl
     */
    public static final String REQUEST_ISSUED_CERT = "req_issued_cert";

    /**
     * Set Default X509CertInfo in the request.
     * @param request profile-based certificate request.
     * @exception EProfileException failed to set the X509CertInfo.
     */
    public void setDefaultCertInfo(IRequest request) throws EProfileException;
}