OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 /* | 5 /* |
6 * Private header defining OCSP types. | 6 * Private header defining OCSP types. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef _OCSPTI_H_ | 9 #ifndef _OCSPTI_H_ |
10 #define _OCSPTI_H_ | 10 #define _OCSPTI_H_ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 typedef struct ocspSignatureStr ocspSignature; | 65 typedef struct ocspSignatureStr ocspSignature; |
66 typedef struct ocspSingleRequestStr ocspSingleRequest; | 66 typedef struct ocspSingleRequestStr ocspSingleRequest; |
67 typedef struct ocspSingleResponseStr ocspSingleResponse; | 67 typedef struct ocspSingleResponseStr ocspSingleResponse; |
68 typedef struct ocspTBSRequestStr ocspTBSRequest; | 68 typedef struct ocspTBSRequestStr ocspTBSRequest; |
69 | 69 |
70 | 70 |
71 /* | 71 /* |
72 * An OCSPRequest; this is what is sent (encoded) to an OCSP responder. | 72 * An OCSPRequest; this is what is sent (encoded) to an OCSP responder. |
73 */ | 73 */ |
74 struct CERTOCSPRequestStr { | 74 struct CERTOCSPRequestStr { |
75 PRArenaPool *arena;»» » /* local; not part of encoding */ | 75 PLArenaPool *arena;»» » /* local; not part of encoding */ |
76 ocspTBSRequest *tbsRequest; | 76 ocspTBSRequest *tbsRequest; |
77 ocspSignature *optionalSignature; | 77 ocspSignature *optionalSignature; |
78 }; | 78 }; |
79 | 79 |
80 /* | 80 /* |
81 * A TBSRequest; when an OCSPRequest is signed, the encoding of this | 81 * A TBSRequest; when an OCSPRequest is signed, the encoding of this |
82 * is what the signature is actually applied to. ("TBS" == To Be Signed) | 82 * is what the signature is actually applied to. ("TBS" == To Be Signed) |
83 * Whether signed or not, however, this structure will be present, and | 83 * Whether signed or not, however, this structure will be present, and |
84 * is the "meat" of the OCSPRequest. | 84 * is the "meat" of the OCSPRequest. |
85 * | 85 * |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 * whose status is being checked. | 137 * whose status is being checked. |
138 * | 138 * |
139 * Note that in the OCSP specification this is just called "Request", | 139 * Note that in the OCSP specification this is just called "Request", |
140 * but since that seemed confusing (vs. an OCSPRequest) and to be more | 140 * but since that seemed confusing (vs. an OCSPRequest) and to be more |
141 * consistent with the parallel type "SingleResponse", I called it a | 141 * consistent with the parallel type "SingleResponse", I called it a |
142 * "SingleRequest". | 142 * "SingleRequest". |
143 * | 143 * |
144 * XXX figure out how to get rid of that arena -- there must be a way | 144 * XXX figure out how to get rid of that arena -- there must be a way |
145 */ | 145 */ |
146 struct ocspSingleRequestStr { | 146 struct ocspSingleRequestStr { |
147 PRArenaPool *arena;»» » /* just a copy of the response arena, | 147 PLArenaPool *arena;»» » /* just a copy of the response arena, |
148 * needed here for extension handling | 148 * needed here for extension handling |
149 * routines, on creation only */ | 149 * routines, on creation only */ |
150 CERTOCSPCertID *reqCert; | 150 CERTOCSPCertID *reqCert; |
151 CERTCertExtension **singleRequestExtensions; | 151 CERTCertExtension **singleRequestExtensions; |
152 }; | 152 }; |
153 | 153 |
154 /* | 154 /* |
155 * A CertID is the means of identifying a certificate, used both in requests | 155 * A CertID is the means of identifying a certificate, used both in requests |
156 * and in responses. | 156 * and in responses. |
157 * | 157 * |
158 * When in a SingleRequest it specifies the certificate to be checked. | 158 * When in a SingleRequest it specifies the certificate to be checked. |
159 * When in a SingleResponse it is the cert whose status is being given. | 159 * When in a SingleResponse it is the cert whose status is being given. |
160 */ | 160 */ |
161 struct CERTOCSPCertIDStr { | 161 struct CERTOCSPCertIDStr { |
162 SECAlgorithmID hashAlgorithm; | 162 SECAlgorithmID hashAlgorithm; |
163 SECItem issuerNameHash; /* an OCTET STRING */ | 163 SECItem issuerNameHash; /* an OCTET STRING */ |
164 SECItem issuerKeyHash; /* an OCTET STRING */ | 164 SECItem issuerKeyHash; /* an OCTET STRING */ |
165 SECItem serialNumber; /* an INTEGER */ | 165 SECItem serialNumber; /* an INTEGER */ |
166 SECItem issuerSHA1NameHash; /* keep other hashes around when */ | 166 SECItem issuerSHA1NameHash; /* keep other hashes around when */ |
167 SECItem issuerMD5NameHash; /* we have them */ | 167 SECItem issuerMD5NameHash; /* we have them */ |
168 SECItem issuerMD2NameHash; | 168 SECItem issuerMD2NameHash; |
169 SECItem issuerSHA1KeyHash; /* keep other hashes around when */ | 169 SECItem issuerSHA1KeyHash; /* keep other hashes around when */ |
170 SECItem issuerMD5KeyHash; /* we have them */ | 170 SECItem issuerMD5KeyHash; /* we have them */ |
171 SECItem issuerMD2KeyHash; | 171 SECItem issuerMD2KeyHash; |
172 PRArenaPool *poolp; | 172 PLArenaPool *poolp; |
173 }; | 173 }; |
174 | 174 |
175 /* | 175 /* |
176 * This describes the value of the responseStatus field in an OCSPResponse. | 176 * This describes the value of the responseStatus field in an OCSPResponse. |
177 * The corresponding ASN.1 definition is: | 177 * The corresponding ASN.1 definition is: |
178 * | 178 * |
179 * OCSPResponseStatus ::= ENUMERATED { | 179 * OCSPResponseStatus ::= ENUMERATED { |
180 * successful (0), --Response has valid confirmations | 180 * successful (0), --Response has valid confirmations |
181 * malformedRequest (1), --Illegal confirmation request | 181 * malformedRequest (1), --Illegal confirmation request |
182 * internalError (2), --Internal error in issuer | 182 * internalError (2), --Internal error in issuer |
(...skipping 19 matching lines...) Expand all Loading... |
202 } ocspResponseStatus; | 202 } ocspResponseStatus; |
203 | 203 |
204 /* | 204 /* |
205 * An OCSPResponse is what is sent (encoded) by an OCSP responder. | 205 * An OCSPResponse is what is sent (encoded) by an OCSP responder. |
206 * | 206 * |
207 * The field "responseStatus" is the ASN.1 encoded value; the field | 207 * The field "responseStatus" is the ASN.1 encoded value; the field |
208 * "statusValue" is simply that same value translated into our local | 208 * "statusValue" is simply that same value translated into our local |
209 * type ocspResponseStatus. | 209 * type ocspResponseStatus. |
210 */ | 210 */ |
211 struct CERTOCSPResponseStr { | 211 struct CERTOCSPResponseStr { |
212 PRArenaPool *arena;»» » /* local; not part of encoding */ | 212 PLArenaPool *arena;»» » /* local; not part of encoding */ |
213 SECItem responseStatus; /* an ENUMERATED, see above */ | 213 SECItem responseStatus; /* an ENUMERATED, see above */ |
214 ocspResponseStatus statusValue; /* local; not part of encoding */ | 214 ocspResponseStatus statusValue; /* local; not part of encoding */ |
215 ocspResponseBytes *responseBytes; /* only when status is successful */ | 215 ocspResponseBytes *responseBytes; /* only when status is successful */ |
216 }; | 216 }; |
217 | 217 |
218 /* | 218 /* |
219 * A ResponseBytes (despite appearances) is what contains the meat | 219 * A ResponseBytes (despite appearances) is what contains the meat |
220 * of a successful response -- but still in encoded form. The type | 220 * of a successful response -- but still in encoded form. The type |
221 * given as "responseType" tells you how to decode the string. | 221 * given as "responseType" tells you how to decode the string. |
222 * | 222 * |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 } responderIDValue; | 277 } responderIDValue; |
278 }; | 278 }; |
279 | 279 |
280 /* | 280 /* |
281 * The ResponseData in a BasicOCSPResponse contains a SEQUENCE OF | 281 * The ResponseData in a BasicOCSPResponse contains a SEQUENCE OF |
282 * SingleResponse -- one for each certificate whose status is being supplied. | 282 * SingleResponse -- one for each certificate whose status is being supplied. |
283 * | 283 * |
284 * XXX figure out how to get rid of that arena -- there must be a way | 284 * XXX figure out how to get rid of that arena -- there must be a way |
285 */ | 285 */ |
286 struct CERTOCSPSingleResponseStr { | 286 struct CERTOCSPSingleResponseStr { |
287 PRArenaPool *arena;»» » /* just a copy of the response arena, | 287 PLArenaPool *arena;»» » /* just a copy of the response arena, |
288 * needed here for extension handling | 288 * needed here for extension handling |
289 * routines, on creation only */ | 289 * routines, on creation only */ |
290 CERTOCSPCertID *certID; | 290 CERTOCSPCertID *certID; |
291 SECItem derCertStatus; | 291 SECItem derCertStatus; |
292 ocspCertStatus *certStatus; /* local; not part of encoding */ | 292 ocspCertStatus *certStatus; /* local; not part of encoding */ |
293 SECItem thisUpdate; /* a GeneralizedTime */ | 293 SECItem thisUpdate; /* a GeneralizedTime */ |
294 SECItem *nextUpdate; /* a GeneralizedTime */ | 294 SECItem *nextUpdate; /* a GeneralizedTime */ |
295 CERTCertExtension **singleExtensions; | 295 CERTCertExtension **singleExtensions; |
296 }; | 296 }; |
297 | 297 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 * When added, it specifies the (name of the) issuer of the cert being | 350 * When added, it specifies the (name of the) issuer of the cert being |
351 * checked, and optionally the value of the AuthorityInfoAccess extension | 351 * checked, and optionally the value of the AuthorityInfoAccess extension |
352 * if the cert has one. | 352 * if the cert has one. |
353 */ | 353 */ |
354 struct ocspServiceLocatorStr { | 354 struct ocspServiceLocatorStr { |
355 CERTName *issuer; | 355 CERTName *issuer; |
356 SECItem locator; /* DER encoded authInfoAccess extension from cert */ | 356 SECItem locator; /* DER encoded authInfoAccess extension from cert */ |
357 }; | 357 }; |
358 | 358 |
359 #endif /* _OCSPTI_H_ */ | 359 #endif /* _OCSPTI_H_ */ |
OLD | NEW |