security/nss/lib/libpkix/include/pkix_pl_pki.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4 /*
michael@0 5 * This file defines several platform independent functions to
michael@0 6 * manipulate certificates and CRLs in a portable manner.
michael@0 7 *
michael@0 8 */
michael@0 9
michael@0 10 #ifndef _PKIX_PL_PKI_H
michael@0 11 #define _PKIX_PL_PKI_H
michael@0 12
michael@0 13 #include "pkixt.h"
michael@0 14 #include "seccomon.h"
michael@0 15 #include "certt.h"
michael@0 16
michael@0 17 #ifdef __cplusplus
michael@0 18 extern "C" {
michael@0 19 #endif
michael@0 20
michael@0 21 /* General
michael@0 22 *
michael@0 23 * Please refer to the libpkix Programmer's Guide for detailed information
michael@0 24 * about how to use the libpkix library. Certain key warnings and notices from
michael@0 25 * that document are repeated here for emphasis.
michael@0 26 *
michael@0 27 * All identifiers in this file (and all public identifiers defined in
michael@0 28 * libpkix) begin with "PKIX_". Private identifiers only intended for use
michael@0 29 * within the library begin with "pkix_".
michael@0 30 *
michael@0 31 * A function returns NULL upon success, and a PKIX_Error pointer upon failure.
michael@0 32 *
michael@0 33 * Unless otherwise noted, for all accessor (gettor) functions that return a
michael@0 34 * PKIX_PL_Object pointer, callers should assume that this pointer refers to a
michael@0 35 * shared object. Therefore, the caller should treat this shared object as
michael@0 36 * read-only and should not modify this shared object. When done using the
michael@0 37 * shared object, the caller should release the reference to the object by
michael@0 38 * using the PKIX_PL_Object_DecRef function.
michael@0 39 *
michael@0 40 * While a function is executing, if its arguments (or anything referred to by
michael@0 41 * its arguments) are modified, free'd, or destroyed, the function's behavior
michael@0 42 * is undefined.
michael@0 43 *
michael@0 44 */
michael@0 45
michael@0 46 /*
michael@0 47 * Cert
michael@0 48 *
michael@0 49 * A Cert represents an X.509 certificate. It can be created using the bytes
michael@0 50 * of a valid ASN.1 DER encoding. Once created, a Cert is immutable. The
michael@0 51 * following functions include accessors (gettors) for the various components
michael@0 52 * of an X.509 certificate. Also included are functions to perform various
michael@0 53 * checks on a certificate, including name constraints, key usage, validity
michael@0 54 * (expiration), and signature verification.
michael@0 55 */
michael@0 56
michael@0 57 /*
michael@0 58 * FUNCTION: PKIX_PL_Cert_Create
michael@0 59 * DESCRIPTION:
michael@0 60 *
michael@0 61 * Creates a new certificate using the bytes in the ByteArray pointed to by
michael@0 62 * "byteArray" and stores it at "pCert". If the bytes are not a valid ASN.1
michael@0 63 * DER encoding of a certificate, a PKIX_Error pointer is returned. Once
michael@0 64 * created, a Cert is immutable.
michael@0 65 *
michael@0 66 * Certificate ::= SEQUENCE {
michael@0 67 * tbsCertificate TBSCertificate,
michael@0 68 * signatureAlgorithm AlgorithmIdentifier,
michael@0 69 * signatureValue BIT STRING }
michael@0 70 *
michael@0 71 * AlgorithmIdentifier ::= SEQUENCE {
michael@0 72 * algorithm OBJECT IDENTIFIER,
michael@0 73 * parameters ANY DEFINED BY algorithm OPTIONAL }
michael@0 74 *
michael@0 75 * TBSCertificate ::= SEQUENCE {
michael@0 76 * version [0] EXPLICIT Version DEFAULT v1,
michael@0 77 * serialNumber CertificateSerialNumber,
michael@0 78 * signature AlgorithmIdentifier,
michael@0 79 * issuer Name,
michael@0 80 * validity Validity,
michael@0 81 * subject Name,
michael@0 82 * subjectPublicKeyInfo SubjectPublicKeyInfo,
michael@0 83 * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
michael@0 84 * -- If present, version MUST be v2 or v3
michael@0 85 * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
michael@0 86 * -- If present, version MUST be v2 or v3
michael@0 87 * extensions [3] EXPLICIT Extensions OPTIONAL
michael@0 88 * -- If present, version MUST be v3
michael@0 89 * }
michael@0 90 *
michael@0 91 * Version ::= INTEGER { v1(0), v2(1), v3(2) }
michael@0 92 *
michael@0 93 * CertificateSerialNumber ::= INTEGER
michael@0 94 *
michael@0 95 * Validity ::= SEQUENCE {
michael@0 96 * notBefore Time,
michael@0 97 * notAfter Time }
michael@0 98 *
michael@0 99 * Time ::= CHOICE {
michael@0 100 * utcTime UTCTime,
michael@0 101 * generalTime GeneralizedTime }
michael@0 102 *
michael@0 103 * UniqueIdentifier ::= BIT STRING
michael@0 104 *
michael@0 105 * SubjectPublicKeyInfo ::= SEQUENCE {
michael@0 106 * algorithm AlgorithmIdentifier,
michael@0 107 * subjectPublicKey BIT STRING }
michael@0 108 *
michael@0 109 * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
michael@0 110 *
michael@0 111 * Extension ::= SEQUENCE {
michael@0 112 * extnID OBJECT IDENTIFIER,
michael@0 113 * critical BOOLEAN DEFAULT FALSE,
michael@0 114 * extnValue OCTET STRING }
michael@0 115 *
michael@0 116 * PARAMETERS:
michael@0 117 * "byteArray"
michael@0 118 * Address of ByteArray representing the CERT's DER encoding.
michael@0 119 * Must be non-NULL.
michael@0 120 * "pCert"
michael@0 121 * Address where object pointer will be stored. Must be non-NULL.
michael@0 122 * "plContext"
michael@0 123 * Platform-specific context pointer.
michael@0 124 * THREAD SAFETY:
michael@0 125 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 126 * RETURNS:
michael@0 127 * Returns NULL if the function succeeds.
michael@0 128 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 129 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 130 */
michael@0 131 PKIX_Error *
michael@0 132 PKIX_PL_Cert_Create(
michael@0 133 PKIX_PL_ByteArray *byteArray,
michael@0 134 PKIX_PL_Cert **pCert,
michael@0 135 void *plContext);
michael@0 136
michael@0 137 /*
michael@0 138 * FUNCTION: PKIX_PL_Cert_CreateFromCERTCertificate
michael@0 139 * DESCRIPTION:
michael@0 140 *
michael@0 141 * Creates a new certificate using passed in CERTCertificate object.
michael@0 142 *
michael@0 143 * PARAMETERS:
michael@0 144 * "nssCert"
michael@0 145 * The object that will be used to create new PKIX_PL_Cert.
michael@0 146 * "pCert"
michael@0 147 * Address where object pointer will be stored. Must be non-NULL.
michael@0 148 * "plContext"
michael@0 149 * Platform-specific context pointer.
michael@0 150 * THREAD SAFETY:
michael@0 151 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 152 * RETURNS:
michael@0 153 * Returns NULL if the function succeeds.
michael@0 154 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 155 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 156 */
michael@0 157 PKIX_Error *
michael@0 158 PKIX_PL_Cert_CreateFromCERTCertificate(
michael@0 159 const CERTCertificate *nssCert,
michael@0 160 PKIX_PL_Cert **pCert,
michael@0 161 void *plContext);
michael@0 162
michael@0 163 /*
michael@0 164 * FUNCTION: PKIX_PL_Cert_GetCERTCertificate
michael@0 165 * DESCRIPTION:
michael@0 166 *
michael@0 167 * Returns underlying CERTCertificate structure. Return CERTCertificate
michael@0 168 * object is duplicated and should be destroyed by caller.
michael@0 169 *
michael@0 170 * PARAMETERS:
michael@0 171 * "cert"
michael@0 172 * Address of PKIX_PL_Cert. Must be non-NULL.
michael@0 173 * "pCert"
michael@0 174 * Address where object pointer will be stored. Must be non-NULL.
michael@0 175 * "plContext"
michael@0 176 * Platform-specific context pointer.
michael@0 177 * THREAD SAFETY:
michael@0 178 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 179 * RETURNS:
michael@0 180 * Returns NULL if the function succeeds.
michael@0 181 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 182 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 183 */
michael@0 184 PKIX_Error *
michael@0 185 PKIX_PL_Cert_GetCERTCertificate(
michael@0 186 PKIX_PL_Cert *cert,
michael@0 187 CERTCertificate **pnssCert,
michael@0 188 void *plContext);
michael@0 189
michael@0 190 /*
michael@0 191 * FUNCTION: PKIX_PL_Cert_GetVersion
michael@0 192 * DESCRIPTION:
michael@0 193 *
michael@0 194 * Retrieves the version of the Cert pointed to by "cert" and stores it at
michael@0 195 * "pVersion". The version number will either be 0, 1, or 2 (corresponding to
michael@0 196 * v1, v2, or v3, respectively).
michael@0 197 *
michael@0 198 * Version ::= INTEGER { v1(0), v2(1), v3(2) }
michael@0 199 *
michael@0 200 * PARAMETERS:
michael@0 201 * "cert"
michael@0 202 * Address of Cert whose version is to be stored. Must be non-NULL.
michael@0 203 * "pVersion"
michael@0 204 * Address where PKIX_UInt32 will be stored. Must be non-NULL.
michael@0 205 * "plContext"
michael@0 206 * Platform-specific context pointer.
michael@0 207 * THREAD SAFETY:
michael@0 208 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 209 * RETURNS:
michael@0 210 * Returns NULL if the function succeeds.
michael@0 211 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 212 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 213 */
michael@0 214 PKIX_Error *
michael@0 215 PKIX_PL_Cert_GetVersion(
michael@0 216 PKIX_PL_Cert *cert,
michael@0 217 PKIX_UInt32 *pVersion,
michael@0 218 void *plContext);
michael@0 219
michael@0 220 /*
michael@0 221 * FUNCTION: PKIX_PL_Cert_GetSerialNumber
michael@0 222 * DESCRIPTION:
michael@0 223 *
michael@0 224 * Retrieves a pointer to the BigInt that represents the serial number of the
michael@0 225 * Cert pointed to by "cert" and stores it at "pSerialNumber".
michael@0 226 *
michael@0 227 * CertificateSerialNumber ::= INTEGER
michael@0 228 *
michael@0 229 * PARAMETERS:
michael@0 230 * "cert"
michael@0 231 * Address of Cert whose serial number is to be stored. Must be non-NULL.
michael@0 232 * "pSerial"
michael@0 233 * Address where object pointer will be stored. Must be non-NULL.
michael@0 234 * "plContext"
michael@0 235 * Platform-specific context pointer.
michael@0 236 * THREAD SAFETY:
michael@0 237 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 238 * RETURNS:
michael@0 239 * Returns NULL if the function succeeds.
michael@0 240 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 241 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 242 */
michael@0 243 PKIX_Error *
michael@0 244 PKIX_PL_Cert_GetSerialNumber(
michael@0 245 PKIX_PL_Cert *cert,
michael@0 246 PKIX_PL_BigInt **pSerial,
michael@0 247 void *plContext);
michael@0 248
michael@0 249 /*
michael@0 250 * FUNCTION: PKIX_PL_Cert_GetIssuer
michael@0 251 * DESCRIPTION:
michael@0 252 *
michael@0 253 * Retrieves a pointer to the X500Name that represents the issuer DN of the
michael@0 254 * Cert pointed to by "cert" and stores it at "pIssuer".
michael@0 255 *
michael@0 256 * PARAMETERS:
michael@0 257 * "cert"
michael@0 258 * Address of Cert whose issuer is to be stored. Must be non-NULL.
michael@0 259 * "pIssuer"
michael@0 260 * Address where object pointer will be stored. Must be non-NULL.
michael@0 261 * "plContext"
michael@0 262 * Platform-specific context pointer.
michael@0 263 * THREAD SAFETY:
michael@0 264 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 265 * RETURNS:
michael@0 266 * Returns NULL if the function succeeds.
michael@0 267 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 268 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 269 */
michael@0 270 PKIX_Error *
michael@0 271 PKIX_PL_Cert_GetIssuer(
michael@0 272 PKIX_PL_Cert *cert,
michael@0 273 PKIX_PL_X500Name **pIssuer,
michael@0 274 void *plContext);
michael@0 275
michael@0 276 /*
michael@0 277 * FUNCTION: PKIX_PL_Cert_GetSubject
michael@0 278 * DESCRIPTION:
michael@0 279 *
michael@0 280 * Retrieves a pointer to the X500Name that represents the subject DN of the
michael@0 281 * Cert pointed to by "cert" and stores it at "pSubject". If the Cert does not
michael@0 282 * have a subject DN, this function stores NULL at "pSubject".
michael@0 283 *
michael@0 284 * PARAMETERS:
michael@0 285 * "cert"
michael@0 286 * Address of Cert whose subject is to be stored. Must be non-NULL.
michael@0 287 * "pSubject"
michael@0 288 * Address where object pointer will be stored. Must be non-NULL.
michael@0 289 * "plContext"
michael@0 290 * Platform-specific context pointer.
michael@0 291 * THREAD SAFETY:
michael@0 292 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 293 * RETURNS:
michael@0 294 * Returns NULL if the function succeeds.
michael@0 295 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 296 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 297 */
michael@0 298 PKIX_Error *
michael@0 299 PKIX_PL_Cert_GetSubject(
michael@0 300 PKIX_PL_Cert *cert,
michael@0 301 PKIX_PL_X500Name **pSubject,
michael@0 302 void *plContext);
michael@0 303
michael@0 304 /*
michael@0 305 * FUNCTION: PKIX_PL_Cert_GetSubjectPublicKeyAlgId
michael@0 306 * DESCRIPTION:
michael@0 307 *
michael@0 308 * Retrieves a pointer to the OID that represents the subject public key
michael@0 309 * algorithm of the Cert pointed to by "cert" and stores it at
michael@0 310 * "pSubjKeyAlgId".
michael@0 311 *
michael@0 312 * SubjectPublicKeyInfo ::= SEQUENCE {
michael@0 313 * algorithm AlgorithmIdentifier,
michael@0 314 * subjectPublicKey BIT STRING }
michael@0 315 *
michael@0 316 * AlgorithmIdentifier ::= SEQUENCE {
michael@0 317 * algorithm OBJECT IDENTIFIER,
michael@0 318 * parameters ANY DEFINED BY algorithm OPTIONAL }
michael@0 319 *
michael@0 320 * PARAMETERS:
michael@0 321 * "cert"
michael@0 322 * Address of Cert whose subject public key algorithm OID is to be stored.
michael@0 323 * Must be non-NULL.
michael@0 324 * "pSubjKeyAlgId"
michael@0 325 * Address where object pointer will be stored. Must be non-NULL.
michael@0 326 * "plContext"
michael@0 327 * Platform-specific context pointer.
michael@0 328 * THREAD SAFETY:
michael@0 329 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 330 * RETURNS:
michael@0 331 * Returns NULL if the function succeeds.
michael@0 332 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 333 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 334 */
michael@0 335 PKIX_Error *
michael@0 336 PKIX_PL_Cert_GetSubjectPublicKeyAlgId(
michael@0 337 PKIX_PL_Cert *cert,
michael@0 338 PKIX_PL_OID **pSubjKeyAlgId,
michael@0 339 void *plContext);
michael@0 340
michael@0 341 /*
michael@0 342 * FUNCTION: PKIX_PL_Cert_GetSubjectPublicKey
michael@0 343 * DESCRIPTION:
michael@0 344 *
michael@0 345 * Retrieves a pointer to the PublicKey that represents the subject public key
michael@0 346 * of the Cert pointed to by "cert" and stores it at "pPublicKey".
michael@0 347 *
michael@0 348 * SubjectPublicKeyInfo ::= SEQUENCE {
michael@0 349 * algorithm AlgorithmIdentifier,
michael@0 350 * subjectPublicKey BIT STRING }
michael@0 351 *
michael@0 352 * PARAMETERS:
michael@0 353 * "cert"
michael@0 354 * Address of Cert whose subject public key is to be stored.
michael@0 355 * Must be non-NULL.
michael@0 356 * "pPublicKey"
michael@0 357 * Address where object pointer will be stored. Must be non-NULL.
michael@0 358 * "plContext"
michael@0 359 * Platform-specific context pointer.
michael@0 360 * THREAD SAFETY:
michael@0 361 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 362 * RETURNS:
michael@0 363 * Returns NULL if the function succeeds.
michael@0 364 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 365 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 366 */
michael@0 367 PKIX_Error *
michael@0 368 PKIX_PL_Cert_GetSubjectPublicKey(
michael@0 369 PKIX_PL_Cert *cert,
michael@0 370 PKIX_PL_PublicKey **pPublicKey,
michael@0 371 void *plContext);
michael@0 372
michael@0 373 /*
michael@0 374 * FUNCTION: PKIX_PL_PublicKey_NeedsDSAParameters
michael@0 375 * DESCRIPTION:
michael@0 376 *
michael@0 377 * Determines if the PublicKey pointed to by "pubKey" is a DSA Key with null
michael@0 378 * parameters and stores the result at "pNeedsParams".
michael@0 379 *
michael@0 380 * PARAMETERS:
michael@0 381 * "pubKey"
michael@0 382 * Address of the Public Key of interest. Must be non-NULL.
michael@0 383 * "pNeedsParams"
michael@0 384 * Address where object pointer will be stored. Must be non-NULL.
michael@0 385 * "plContext"
michael@0 386 * Platform-specific context pointer.
michael@0 387 * THREAD SAFETY:
michael@0 388 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 389 * RETURNS:
michael@0 390 * Returns NULL if the function succeeds.
michael@0 391 * Returns a PublicKey Error if the function fails in a non-fatal way.
michael@0 392 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 393 */
michael@0 394 PKIX_Error *
michael@0 395 PKIX_PL_PublicKey_NeedsDSAParameters(
michael@0 396 PKIX_PL_PublicKey *pubKey,
michael@0 397 PKIX_Boolean *pNeedsParams,
michael@0 398 void *plContext);
michael@0 399
michael@0 400 /*
michael@0 401 * FUNCTION: PKIX_PL_PublicKey_MakeInheritedDSAPublicKey
michael@0 402 * DESCRIPTION:
michael@0 403 *
michael@0 404 * This function is used for DSA key parameter inheritance, which allows a
michael@0 405 * first DSA key with omitted parameters (pointed to by "firstKey") to inherit
michael@0 406 * the PQG parameters of a second DSA key that does have parameters. (pointed
michael@0 407 * to by "secondKey"). Once created, a PublicKey is immutable.
michael@0 408 *
michael@0 409 * Specifically, the algorithm used by the function is:
michael@0 410 *
michael@0 411 * If the first PublicKey is not a DSA public key with omitted parameters,
michael@0 412 * the function stores NULL at "pResultKey". (No Error is returned)
michael@0 413 * Else if the second PublicKey is not a DSA public key with non-NULL,
michael@0 414 * parameters, the function returns an Error.
michael@0 415 * Else
michael@0 416 * the function creates a third PublicKey with a "Y" value from the
michael@0 417 * first PublicKey and the DSA parameters from the second PublicKey,
michael@0 418 * and stores it at "pResultKey".
michael@0 419 *
michael@0 420 * PARAMETERS:
michael@0 421 * "firstKey"
michael@0 422 * Address of a Public Key that needs to inherit DSA parameters.
michael@0 423 * Must be non-NULL.
michael@0 424 * "secondKey"
michael@0 425 * Address of a Public Key that has DSA parameters that will be inherited
michael@0 426 * by "firstKey". Must be non-NULL.
michael@0 427 * "pResultKey"
michael@0 428 * Address where object pointer will be stored. Must be non-NULL.
michael@0 429 * "plContext"
michael@0 430 * Platform-specific context pointer.
michael@0 431 * THREAD SAFETY:
michael@0 432 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 433 * RETURNS:
michael@0 434 * Returns NULL if the function succeeds.
michael@0 435 * Returns a PublicKey Error if the function fails in a non-fatal way.
michael@0 436 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 437 */
michael@0 438 PKIX_Error *
michael@0 439 PKIX_PL_PublicKey_MakeInheritedDSAPublicKey(
michael@0 440 PKIX_PL_PublicKey *firstKey,
michael@0 441 PKIX_PL_PublicKey *secondKey,
michael@0 442 PKIX_PL_PublicKey **pResultKey,
michael@0 443 void *plContext);
michael@0 444
michael@0 445 /*
michael@0 446 * FUNCTION: PKIX_PL_Cert_GetCriticalExtensionOIDs
michael@0 447 * DESCRIPTION:
michael@0 448 *
michael@0 449 * Retrieves a pointer to the List of OIDs (each OID corresponding to a
michael@0 450 * critical extension of the Cert pointed to by "cert") and stores it at
michael@0 451 * "pExtensions". If "cert" does not have any critical extensions, this
michael@0 452 * function stores an empty List at "pExtensions".
michael@0 453 *
michael@0 454 * Note that the List returned by this function is immutable.
michael@0 455 *
michael@0 456 * PARAMETERS:
michael@0 457 * "cert"
michael@0 458 * Address of Cert whose critical extension OIDs are to be stored.
michael@0 459 * Must be non-NULL.
michael@0 460 * "pExtensions"
michael@0 461 * Address where object pointer will be stored. Must be non-NULL.
michael@0 462 * "plContext"
michael@0 463 * Platform-specific context pointer.
michael@0 464 * THREAD SAFETY:
michael@0 465 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 466 * RETURNS:
michael@0 467 * Returns NULL if the function succeeds.
michael@0 468 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 469 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 470 */
michael@0 471 PKIX_Error *
michael@0 472 PKIX_PL_Cert_GetCriticalExtensionOIDs(
michael@0 473 PKIX_PL_Cert *cert,
michael@0 474 PKIX_List **pExtensions, /* list of PKIX_PL_OID */
michael@0 475 void *plContext);
michael@0 476
michael@0 477 /*
michael@0 478 * FUNCTION: PKIX_PL_Cert_GetAuthorityKeyIdentifier
michael@0 479 * DESCRIPTION:
michael@0 480 *
michael@0 481 * Retrieves a pointer to a ByteArray representing the authority key
michael@0 482 * identifier extension of the Cert pointed to by "cert" and stores it at
michael@0 483 * "pAuthKeyId".
michael@0 484 *
michael@0 485 * Note that this function only retrieves the keyIdentifier component
michael@0 486 * (OCTET STRING) of the AuthorityKeyIdentifier extension, when present.
michael@0 487 *
michael@0 488 * If "cert" does not have an AuthorityKeyIdentifier extension or if the
michael@0 489 * keyIdentifier component of the AuthorityKeyIdentifier extension is not
michael@0 490 * present, this function stores NULL at "pAuthKeyId".
michael@0 491 *
michael@0 492 * AuthorityKeyIdentifier ::= SEQUENCE {
michael@0 493 * keyIdentifier [0] KeyIdentifier OPTIONAL,
michael@0 494 * authorityCertIssuer [1] GeneralNames OPTIONAL,
michael@0 495 * authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL }
michael@0 496 *
michael@0 497 * PARAMETERS:
michael@0 498 * "cert"
michael@0 499 * Address of Cert whose authority key identifier is to be stored.
michael@0 500 * Must be non-NULL.
michael@0 501 * "pAuthKeyId"
michael@0 502 * Address where object pointer will be stored. Must be non-NULL.
michael@0 503 * "plContext"
michael@0 504 * Platform-specific context pointer.
michael@0 505 * THREAD SAFETY:
michael@0 506 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 507 * RETURNS:
michael@0 508 * Returns NULL if the function succeeds.
michael@0 509 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 510 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 511 */
michael@0 512 PKIX_Error *
michael@0 513 PKIX_PL_Cert_GetAuthorityKeyIdentifier(
michael@0 514 PKIX_PL_Cert *cert,
michael@0 515 PKIX_PL_ByteArray **pAuthKeyId,
michael@0 516 void *plContext);
michael@0 517
michael@0 518 /*
michael@0 519 * FUNCTION: PKIX_PL_Cert_GetSubjectKeyIdentifier
michael@0 520 * DESCRIPTION:
michael@0 521 *
michael@0 522 * Retrieves a pointer to a ByteArray representing the subject key identifier
michael@0 523 * extension of the Cert pointed to by "cert" and stores it at "pSubjKeyId".
michael@0 524 * If "cert" does not have a SubjectKeyIdentifier extension, this function
michael@0 525 * stores NULL at "pSubjKeyId".
michael@0 526 *
michael@0 527 * SubjectKeyIdentifier ::= KeyIdentifier
michael@0 528 *
michael@0 529 * PARAMETERS:
michael@0 530 * "cert"
michael@0 531 * Address of Cert whose subject key identifier is to be stored.
michael@0 532 * Must be non-NULL.
michael@0 533 * "pSubjKeyId"
michael@0 534 * Address where object pointer will be stored. Must be non-NULL.
michael@0 535 * "plContext"
michael@0 536 * Platform-specific context pointer.
michael@0 537 * THREAD SAFETY:
michael@0 538 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 539 * RETURNS:
michael@0 540 * Returns NULL if the function succeeds.
michael@0 541 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 542 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 543 */
michael@0 544 PKIX_Error *
michael@0 545 PKIX_PL_Cert_GetSubjectKeyIdentifier(
michael@0 546 PKIX_PL_Cert *cert,
michael@0 547 PKIX_PL_ByteArray **pSubjKeyId,
michael@0 548 void *plContext);
michael@0 549
michael@0 550 /*
michael@0 551 * FUNCTION: PKIX_PL_Cert_GetSubjectAltNames
michael@0 552 * DESCRIPTION:
michael@0 553 *
michael@0 554 * Retrieves a pointer to the List of GeneralNames (each GeneralName
michael@0 555 * representing a subject alternative name found in the subject alternative
michael@0 556 * names extension of the Cert pointed to by "cert") and stores it at
michael@0 557 * "pSubjectAltNames". If "cert" does not have a SubjectAlternativeNames
michael@0 558 * extension, this function stores NULL at "pSubjectAltNames".
michael@0 559 *
michael@0 560 * Note that the List returned by this function is immutable.
michael@0 561 *
michael@0 562 * SubjectAltName ::= GeneralNames
michael@0 563 *
michael@0 564 * GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
michael@0 565 *
michael@0 566 * GeneralName ::= CHOICE {
michael@0 567 * otherName [0] OtherName,
michael@0 568 * rfc822Name [1] IA5String,
michael@0 569 * dNSName [2] IA5String,
michael@0 570 * x400Address [3] ORAddress,
michael@0 571 * directoryName [4] Name,
michael@0 572 * ediPartyName [5] EDIPartyName,
michael@0 573 * uniformResourceIdentifier [6] IA5String,
michael@0 574 * iPAddress [7] OCTET STRING,
michael@0 575 * registeredID [8] OBJECT IDENTIFIER }
michael@0 576 *
michael@0 577 * OtherName ::= SEQUENCE {
michael@0 578 * type-id OBJECT IDENTIFIER,
michael@0 579 * value [0] EXPLICIT ANY DEFINED BY type-id }
michael@0 580 *
michael@0 581 * EDIPartyName ::= SEQUENCE {
michael@0 582 * nameAssigner [0] DirectoryString OPTIONAL,
michael@0 583 * partyName [1] DirectoryString }
michael@0 584 *
michael@0 585 * PARAMETERS:
michael@0 586 * "cert"
michael@0 587 * Address of Cert whose subjectAltNames are to be stored.
michael@0 588 * Must be non-NULL.
michael@0 589 * "pSubjectAltNames"
michael@0 590 * Address where object pointer will be stored. Must be non-NULL.
michael@0 591 * "plContext"
michael@0 592 * Platform-specific context pointer.
michael@0 593 * THREAD SAFETY:
michael@0 594 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 595 * RETURNS:
michael@0 596 * Returns NULL if the function succeeds.
michael@0 597 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 598 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 599 */
michael@0 600 PKIX_Error *
michael@0 601 PKIX_PL_Cert_GetSubjectAltNames(
michael@0 602 PKIX_PL_Cert *cert,
michael@0 603 PKIX_List **pSubjectAltNames, /* list of PKIX_PL_GeneralName */
michael@0 604 void *plContext);
michael@0 605
michael@0 606 /*
michael@0 607 * FUNCTION: PKIX_PL_Cert_GetAllSubjectNames
michael@0 608 * DESCRIPTION:
michael@0 609 *
michael@0 610 * Retrieves a pointer to the List of GeneralNames (each GeneralName
michael@0 611 * representing a subject DN or a subject alternative name found in the
michael@0 612 * subject alternative names extension of the Cert pointed to by "cert") and
michael@0 613 * stores it at "pAllSubjectNames".If the Subject DN of "cert" is empty and
michael@0 614 * it does not have a SubjectAlternativeNames extension, this function stores
michael@0 615 * NULL at "pAllSubjectNames".
michael@0 616 *
michael@0 617 * Note that the List returned by this function is immutable.
michael@0 618 *
michael@0 619 * PARAMETERS:
michael@0 620 * "cert"
michael@0 621 * Address of Cert whose subject DN and subjectAltNames are to be stored.
michael@0 622 * Must be non-NULL.
michael@0 623 * "pAllSubjectNames"
michael@0 624 * Address where object pointer will be stored. Must be non-NULL.
michael@0 625 * "plContext"
michael@0 626 * Platform-specific context pointer.
michael@0 627 * THREAD SAFETY:
michael@0 628 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 629 * RETURNS:
michael@0 630 * Returns NULL if the function succeeds.
michael@0 631 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 632 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 633 */
michael@0 634 PKIX_Error *
michael@0 635 PKIX_PL_Cert_GetAllSubjectNames(
michael@0 636 PKIX_PL_Cert *cert,
michael@0 637 PKIX_List **pAllSubjectNames, /* list of PKIX_PL_GeneralName */
michael@0 638 void *plContext);
michael@0 639
michael@0 640 /*
michael@0 641 * FUNCTION: PKIX_PL_Cert_GetExtendedKeyUsage
michael@0 642 * DESCRIPTION:
michael@0 643 *
michael@0 644 * Retrieves a pointer to a List of OIDs (each OID corresponding to an
michael@0 645 * extended key usage of the Cert pointed to by "cert") and stores it at
michael@0 646 * "pKeyUsage". If "cert" does not have an extended key usage extension, this
michael@0 647 * function stores a NULL at "pKeyUsage".
michael@0 648 *
michael@0 649 * Note that the List returned by this function is immutable.
michael@0 650 *
michael@0 651 * ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
michael@0 652 *
michael@0 653 * KeyPurposeId ::= OBJECT IDENTIFIER
michael@0 654 *
michael@0 655 * PARAMETERS:
michael@0 656 * "cert"
michael@0 657 * Address of Cert whose extended key usage OIDs are to be stored.
michael@0 658 * Must be non-NULL.
michael@0 659 * "pKeyUsage"
michael@0 660 * Address where object pointer will be stored. Must be non-NULL.
michael@0 661 * "plContext"
michael@0 662 * Platform-specific context pointer.
michael@0 663 * THREAD SAFETY:
michael@0 664 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 665 * RETURNS:
michael@0 666 * Returns NULL if the function succeeds.
michael@0 667 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 668 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 669 */
michael@0 670 PKIX_Error *
michael@0 671 PKIX_PL_Cert_GetExtendedKeyUsage(
michael@0 672 PKIX_PL_Cert *cert,
michael@0 673 PKIX_List **pKeyUsage, /* list of PKIX_PL_OID */
michael@0 674 void *plContext);
michael@0 675
michael@0 676 /*
michael@0 677 * FUNCTION: PKIX_PL_Cert_GetNameConstraints
michael@0 678 * DESCRIPTION:
michael@0 679 *
michael@0 680 * Retrieves a pointer to a CertNameConstraints object representing the name
michael@0 681 * constraints extension of the Cert pointed to by "cert" and stores it at
michael@0 682 * "pNameConstraints".
michael@0 683 *
michael@0 684 * If "cert" does not have a name constraints extension, this function stores
michael@0 685 * NULL at "pNameConstraints".
michael@0 686 *
michael@0 687 * NameConstraints ::= SEQUENCE {
michael@0 688 * permittedSubtrees [0] GeneralSubtrees OPTIONAL,
michael@0 689 * excludedSubtrees [1] GeneralSubtrees OPTIONAL }
michael@0 690 *
michael@0 691 * GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
michael@0 692 *
michael@0 693 * GeneralSubtree ::= SEQUENCE {
michael@0 694 * base GeneralName,
michael@0 695 * minimum [0] BaseDistance DEFAULT 0,
michael@0 696 * maximum [1] BaseDistance OPTIONAL }
michael@0 697 *
michael@0 698 * BaseDistance ::= INTEGER (0..MAX)
michael@0 699 *
michael@0 700 * PARAMETERS:
michael@0 701 * "cert"
michael@0 702 * Address of Cert whose name constraints extension is to be stored.
michael@0 703 * Must be non-NULL.
michael@0 704 * "pNameConstraints"
michael@0 705 * Address where object pointer will be stored. Must be non-NULL.
michael@0 706 * "plContext"
michael@0 707 * Platform-specific context pointer.
michael@0 708 * THREAD SAFETY:
michael@0 709 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 710 * RETURNS:
michael@0 711 * Returns NULL if the function succeeds.
michael@0 712 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 713 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 714 */
michael@0 715 PKIX_Error *
michael@0 716 PKIX_PL_Cert_GetNameConstraints(
michael@0 717 PKIX_PL_Cert *cert,
michael@0 718 PKIX_PL_CertNameConstraints **pNameConstraints,
michael@0 719 void *plContext);
michael@0 720
michael@0 721 /*
michael@0 722 * FUNCTION: PKIX_PL_Cert_GetBasicConstraints
michael@0 723 * DESCRIPTION:
michael@0 724 *
michael@0 725 * Retrieves a pointer to a CertBasicConstraints object representing the basic
michael@0 726 * constraints extension of the Cert pointed to by "cert" and stores it at
michael@0 727 * "pBasicConstraints".
michael@0 728 *
michael@0 729 * If "cert" does not have a basic constraints extension, this function stores
michael@0 730 * NULL at "pBasicConstraints". Once created, a CertBasicConstraints object
michael@0 731 * is immutable.
michael@0 732 *
michael@0 733 * BasicConstraints ::= SEQUENCE {
michael@0 734 * cA BOOLEAN DEFAULT FALSE,
michael@0 735 * pathLenConstraint INTEGER (0..MAX) OPTIONAL }
michael@0 736 *
michael@0 737 * PARAMETERS:
michael@0 738 * "cert"
michael@0 739 * Address of Cert whose basic constraints extension is to be stored.
michael@0 740 * Must be non-NULL.
michael@0 741 * "pBasicConstraints"
michael@0 742 * Address where object pointer will be stored. Must be non-NULL.
michael@0 743 * "plContext"
michael@0 744 * Platform-specific context pointer.
michael@0 745 * THREAD SAFETY:
michael@0 746 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 747 * RETURNS:
michael@0 748 * Returns NULL if the function succeeds.
michael@0 749 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 750 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 751 */
michael@0 752 PKIX_Error *
michael@0 753 PKIX_PL_Cert_GetBasicConstraints(
michael@0 754 PKIX_PL_Cert *cert,
michael@0 755 PKIX_PL_CertBasicConstraints **pBasicConstraints,
michael@0 756 void *plContext);
michael@0 757
michael@0 758 /*
michael@0 759 * FUNCTION: PKIX_PL_BasicConstraints_GetCAFlag
michael@0 760 * DESCRIPTION:
michael@0 761 *
michael@0 762 * Retrieves a pointer to a Boolean value representing the cA Flag component
michael@0 763 * of the CertBasicConstraints object pointed to by "basicConstraints" and
michael@0 764 * stores it at "pResult".
michael@0 765 *
michael@0 766 * BasicConstraints ::= SEQUENCE {
michael@0 767 * cA BOOLEAN DEFAULT FALSE,
michael@0 768 * pathLenConstraint INTEGER (0..MAX) OPTIONAL }
michael@0 769 *
michael@0 770 * PARAMETERS:
michael@0 771 * "basicConstraints"
michael@0 772 * Address of CertBasicConstraints whose cA Flag is to be stored.
michael@0 773 * Must be non-NULL.
michael@0 774 * "pResult"
michael@0 775 * Address where object pointer will be stored. Must be non-NULL.
michael@0 776 * "plContext"
michael@0 777 * Platform-specific context pointer.
michael@0 778 * THREAD SAFETY:
michael@0 779 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 780 * RETURNS:
michael@0 781 * Returns NULL if the function succeeds.
michael@0 782 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 783 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 784 */
michael@0 785 PKIX_Error *
michael@0 786 PKIX_PL_BasicConstraints_GetCAFlag(
michael@0 787 PKIX_PL_CertBasicConstraints *basicConstraints,
michael@0 788 PKIX_Boolean *pResult,
michael@0 789 void *plContext);
michael@0 790
michael@0 791 /*
michael@0 792 * FUNCTION: PKIX_PL_BasicConstraints_GetPathLenConstraint
michael@0 793 * DESCRIPTION:
michael@0 794 *
michael@0 795 * Retrieves a pointer to an integer value representing the pathLenConstraint
michael@0 796 * component of the CertBasicConstraints object pointed to by
michael@0 797 * "basicConstraints" and stores it at "pPathLenConstraint". If the
michael@0 798 * pathLenConstraint component is not present, this function stores -1 at
michael@0 799 * "pPathLenConstraint".
michael@0 800 *
michael@0 801 * PARAMETERS:
michael@0 802 * "basicConstraints"
michael@0 803 * Address of CertBasicConstraints whose pathLen is to be stored.
michael@0 804 * Must be non-NULL.
michael@0 805 * "pPathLenConstraint"
michael@0 806 * Address where PKIX_Int32 will be stored. Must be non-NULL.
michael@0 807 * "plContext"
michael@0 808 * Platform-specific context pointer.
michael@0 809 * THREAD SAFETY:
michael@0 810 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 811 * RETURNS:
michael@0 812 * Returns NULL if the function succeeds.
michael@0 813 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 814 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 815 */
michael@0 816 PKIX_Error *
michael@0 817 PKIX_PL_BasicConstraints_GetPathLenConstraint(
michael@0 818 PKIX_PL_CertBasicConstraints *basicConstraints,
michael@0 819 PKIX_Int32 *pPathLenConstraint,
michael@0 820 void *plContext);
michael@0 821
michael@0 822 /*
michael@0 823 * FUNCTION: PKIX_PL_Cert_GetPolicyInformation
michael@0 824 * DESCRIPTION:
michael@0 825 *
michael@0 826 * Retrieves a pointer to a List of CertPolicyInfos found in the certificate
michael@0 827 * policies extension of the Cert pointed to by "cert" and stores it at
michael@0 828 * "pPolicyInfo". If "cert" does not have a certificate policies extension,
michael@0 829 * this function stores NULL at "pPolicyInfo". Once created, a CertPolicyInfo
michael@0 830 * object is immutable.
michael@0 831 *
michael@0 832 * Note that the List returned by this function is immutable.
michael@0 833 *
michael@0 834 * certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
michael@0 835 *
michael@0 836 * PolicyInformation ::= SEQUENCE {
michael@0 837 * policyIdentifier CertPolicyId,
michael@0 838 * policyQualifiers SEQUENCE SIZE (1..MAX) OF
michael@0 839 * PolicyQualifierInfo OPTIONAL }
michael@0 840 *
michael@0 841 * PARAMETERS:
michael@0 842 * "cert"
michael@0 843 * Address of Cert whose CertPolicyInfos are to be stored.
michael@0 844 * Must be non-NULL.
michael@0 845 * "pPolicyInfo"
michael@0 846 * Address where object pointer will be stored. Must be non-NULL.
michael@0 847 * "plContext"
michael@0 848 * Platform-specific context pointer.
michael@0 849 * THREAD SAFETY:
michael@0 850 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 851 * RETURNS:
michael@0 852 * Returns NULL if the function succeeds.
michael@0 853 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 854 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 855 */
michael@0 856 PKIX_Error *
michael@0 857 PKIX_PL_Cert_GetPolicyInformation(
michael@0 858 PKIX_PL_Cert *cert,
michael@0 859 PKIX_List **pPolicyInfo, /* list of PKIX_PL_CertPolicyInfo */
michael@0 860 void *plContext);
michael@0 861
michael@0 862 /*
michael@0 863 * FUNCTION: PKIX_PL_CertPolicyInfo_GetPolicyId
michael@0 864 * DESCRIPTION:
michael@0 865 *
michael@0 866 * Retrieves a pointer to an OID representing the policyIdentifier of the
michael@0 867 * CertPolicyInfo pointed to by "policyInfo" and stores it at "pCertPolicyId".
michael@0 868 *
michael@0 869 * certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
michael@0 870 *
michael@0 871 * PolicyInformation ::= SEQUENCE {
michael@0 872 * policyIdentifier CertPolicyId,
michael@0 873 * policyQualifiers SEQUENCE SIZE (1..MAX) OF
michael@0 874 * PolicyQualifierInfo OPTIONAL }
michael@0 875 *
michael@0 876 * CertPolicyId ::= OBJECT IDENTIFIER
michael@0 877 *
michael@0 878 * PARAMETERS:
michael@0 879 * "policyInfo"
michael@0 880 * Address of CertPolicyInfo whose policy identifier is to be stored.
michael@0 881 * Must be non-NULL.
michael@0 882 * "pCertPolicyId"
michael@0 883 * Address where object pointer will be stored. Must be non-NULL.
michael@0 884 * "plContext"
michael@0 885 * Platform-specific context pointer.
michael@0 886 * THREAD SAFETY:
michael@0 887 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 888 * RETURNS:
michael@0 889 * Returns NULL if the function succeeds.
michael@0 890 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 891 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 892 */
michael@0 893 PKIX_Error *
michael@0 894 PKIX_PL_CertPolicyInfo_GetPolicyId(
michael@0 895 PKIX_PL_CertPolicyInfo *policyInfo,
michael@0 896 PKIX_PL_OID **pCertPolicyId,
michael@0 897 void *plContext);
michael@0 898
michael@0 899 /*
michael@0 900 * FUNCTION: PKIX_PL_CertPolicyInfo_GetPolQualifiers
michael@0 901 * DESCRIPTION:
michael@0 902 *
michael@0 903 * Retrieves a pointer to a List of the CertPolicyQualifiers representing
michael@0 904 * the policyQualifiers of the CertPolicyInfo pointed to by "policyInfo" and
michael@0 905 * stores it at "pPolicyQualifiers". If "policyInfo" does not have any
michael@0 906 * policyQualifiers, this function stores NULL at "pPolicyQualifiers". Once
michael@0 907 * created, a CertPolicyQualifier is immutable.
michael@0 908 *
michael@0 909 * Note that the List returned by this function is immutable.
michael@0 910 *
michael@0 911 * certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
michael@0 912 *
michael@0 913 * PolicyInformation ::= SEQUENCE {
michael@0 914 * policyIdentifier CertPolicyId,
michael@0 915 * policyQualifiers SEQUENCE SIZE (1..MAX) OF
michael@0 916 * PolicyQualifierInfo OPTIONAL }
michael@0 917 *
michael@0 918 * PolicyQualifierInfo ::= SEQUENCE {
michael@0 919 * policyQualifierId PolicyQualifierId,
michael@0 920 * qualifier ANY DEFINED BY policyQualifierId }
michael@0 921 *
michael@0 922 * PARAMETERS:
michael@0 923 * "policyInfo"
michael@0 924 * Address of CertPolicyInfo whose policy qualifiers List is to be stored.
michael@0 925 * Must be non-NULL.
michael@0 926 * "pPolicyQualifiers"
michael@0 927 * Address where object pointer will be stored. Must be non-NULL.
michael@0 928 * "plContext"
michael@0 929 * Platform-specific context pointer.
michael@0 930 * THREAD SAFETY:
michael@0 931 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 932 * RETURNS:
michael@0 933 * Returns NULL if the function succeeds.
michael@0 934 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 935 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 936 */
michael@0 937 PKIX_Error *
michael@0 938 PKIX_PL_CertPolicyInfo_GetPolQualifiers(
michael@0 939 PKIX_PL_CertPolicyInfo *policyInfo,
michael@0 940 PKIX_List **pPolicyQualifiers, /* list of PKIX_PL_CertPolicyQualifier */
michael@0 941 void *plContext);
michael@0 942
michael@0 943 /*
michael@0 944 * FUNCTION: PKIX_PL_PolicyQualifier_GetPolicyQualifierId
michael@0 945 * DESCRIPTION:
michael@0 946 *
michael@0 947 * Retrieves a pointer to an OID representing the policyQualifierId of the
michael@0 948 * CertPolicyQualifier pointed to by "policyQualifier" and stores it at
michael@0 949 * "pPolicyQualifierId".
michael@0 950 *
michael@0 951 * PolicyQualifierInfo ::= SEQUENCE {
michael@0 952 * policyQualifierId PolicyQualifierId,
michael@0 953 * qualifier ANY DEFINED BY policyQualifierId }
michael@0 954 *
michael@0 955 * PolicyQualifierId ::=
michael@0 956 * OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
michael@0 957 *
michael@0 958 * PARAMETERS:
michael@0 959 * "policyQualifier"
michael@0 960 * Address of CertPolQualifier whose policyQualifierId is to be stored.
michael@0 961 * Must be non-NULL.
michael@0 962 * "pPolicyQualifierId"
michael@0 963 * Address where object pointer will be stored. Must be non-NULL.
michael@0 964 * "plContext"
michael@0 965 * Platform-specific context pointer.
michael@0 966 * THREAD SAFETY:
michael@0 967 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 968 * RETURNS:
michael@0 969 * Returns NULL if the function succeeds.
michael@0 970 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 971 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 972 */
michael@0 973 PKIX_Error *
michael@0 974 PKIX_PL_PolicyQualifier_GetPolicyQualifierId(
michael@0 975 PKIX_PL_CertPolicyQualifier *policyQualifier,
michael@0 976 PKIX_PL_OID **pPolicyQualifierId,
michael@0 977 void *plContext);
michael@0 978
michael@0 979 /*
michael@0 980 * FUNCTION: PKIX_PL_PolicyQualifier_GetQualifier
michael@0 981 * DESCRIPTION:
michael@0 982 *
michael@0 983 * Retrieves a pointer to a ByteArray representing the qualifier of the
michael@0 984 * CertPolicyQualifier pointed to by "policyQualifier" and stores it at
michael@0 985 * "pQualifier".
michael@0 986 *
michael@0 987 * PolicyQualifierInfo ::= SEQUENCE {
michael@0 988 * policyQualifierId PolicyQualifierId,
michael@0 989 * qualifier ANY DEFINED BY policyQualifierId }
michael@0 990 *
michael@0 991 * PARAMETERS:
michael@0 992 * "policyQualifier"
michael@0 993 * Address of CertPolicyQualifier whose qualifier is to be stored.
michael@0 994 * Must be non-NULL.
michael@0 995 * "pQualifier"
michael@0 996 * Address where object pointer will be stored. Must be non-NULL.
michael@0 997 * "plContext"
michael@0 998 * Platform-specific context pointer.
michael@0 999 * THREAD SAFETY:
michael@0 1000 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1001 * RETURNS:
michael@0 1002 * Returns NULL if the function succeeds.
michael@0 1003 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1004 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1005 */
michael@0 1006 PKIX_Error *
michael@0 1007 PKIX_PL_PolicyQualifier_GetQualifier(
michael@0 1008 PKIX_PL_CertPolicyQualifier *policyQualifier,
michael@0 1009 PKIX_PL_ByteArray **pQualifier,
michael@0 1010 void *plContext);
michael@0 1011
michael@0 1012 /*
michael@0 1013 * FUNCTION: PKIX_PL_Cert_GetPolicyMappings
michael@0 1014 * DESCRIPTION:
michael@0 1015 *
michael@0 1016 * Retrieves a pointer to a List of CertPolicyMaps found in the policy
michael@0 1017 * mappings extension of the Cert pointed to by "cert" and stores it at
michael@0 1018 * "pPolicyMappings". If "cert" does not have a policy mappings extension,
michael@0 1019 * this function stores NULL at "pPolicyMappings". Once created, a
michael@0 1020 * CertPolicyMap is immutable.
michael@0 1021 *
michael@0 1022 * Note that the List returned by this function is immutable.
michael@0 1023 *
michael@0 1024 * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
michael@0 1025 * issuerDomainPolicy CertPolicyId,
michael@0 1026 * subjectDomainPolicy CertPolicyId }
michael@0 1027 *
michael@0 1028 * PARAMETERS:
michael@0 1029 * "cert"
michael@0 1030 * Address of Cert whose CertPolicyMaps are to be stored.
michael@0 1031 * Must be non-NULL.
michael@0 1032 * "pPolicyMappings"
michael@0 1033 * Address where object pointer will be stored. Must be non-NULL.
michael@0 1034 * "plContext"
michael@0 1035 * Platform-specific context pointer.
michael@0 1036 * THREAD SAFETY:
michael@0 1037 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1038 * RETURNS:
michael@0 1039 * Returns NULL if the function succeeds.
michael@0 1040 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1041 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1042 */
michael@0 1043 PKIX_Error *
michael@0 1044 PKIX_PL_Cert_GetPolicyMappings(
michael@0 1045 PKIX_PL_Cert *cert,
michael@0 1046 PKIX_List **pPolicyMappings, /* list of PKIX_PL_CertPolicyMap */
michael@0 1047 void *plContext);
michael@0 1048
michael@0 1049 /*
michael@0 1050 * FUNCTION: PKIX_PL_CertPolicyMap_GetIssuerDomainPolicy
michael@0 1051 * DESCRIPTION:
michael@0 1052 *
michael@0 1053 * Retrieves a pointer to an OID representing the issuerDomainPolicy of the
michael@0 1054 * CertPolicyMap pointed to by "policyMapping" and stores it at
michael@0 1055 * "pIssuerDomainPolicy".
michael@0 1056 *
michael@0 1057 * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
michael@0 1058 * issuerDomainPolicy CertPolicyId,
michael@0 1059 * subjectDomainPolicy CertPolicyId }
michael@0 1060 *
michael@0 1061 * PARAMETERS:
michael@0 1062 * "policyMapping"
michael@0 1063 * Address of CertPolicyMap whose issuerDomainPolicy is to be stored.
michael@0 1064 * Must be non-NULL.
michael@0 1065 * "pIssuerDomainPolicy"
michael@0 1066 * Address where object pointer will be stored. Must be non-NULL.
michael@0 1067 * "plContext"
michael@0 1068 * Platform-specific context pointer.
michael@0 1069 * THREAD SAFETY:
michael@0 1070 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1071 * RETURNS:
michael@0 1072 * Returns NULL if the function succeeds.
michael@0 1073 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1074 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1075 */
michael@0 1076 PKIX_Error *
michael@0 1077 PKIX_PL_CertPolicyMap_GetIssuerDomainPolicy(
michael@0 1078 PKIX_PL_CertPolicyMap *policyMapping,
michael@0 1079 PKIX_PL_OID **pIssuerDomainPolicy,
michael@0 1080 void *plContext);
michael@0 1081
michael@0 1082 /*
michael@0 1083 * FUNCTION: PKIX_PL_CertPolicyMap_GetSubjectDomainPolicy
michael@0 1084 * DESCRIPTION:
michael@0 1085 *
michael@0 1086 * Retrieves a pointer to an OID representing the subjectDomainPolicy of the
michael@0 1087 * CertPolicyMap pointed to by "policyMapping" and stores it at
michael@0 1088 * "pSubjectDomainPolicy".
michael@0 1089 *
michael@0 1090 * PolicyMappings ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE {
michael@0 1091 * issuerDomainPolicy CertPolicyId,
michael@0 1092 * subjectDomainPolicy CertPolicyId }
michael@0 1093 *
michael@0 1094 * PARAMETERS:
michael@0 1095 * "policyMapping"
michael@0 1096 * Address of CertPolicyMap whose subjectDomainPolicy is to be stored.
michael@0 1097 * Must be non-NULL.
michael@0 1098 * "pSubjectDomainPolicy"
michael@0 1099 * Address where object pointer will be stored. Must be non-NULL.
michael@0 1100 * "plContext"
michael@0 1101 * Platform-specific context pointer.
michael@0 1102 * THREAD SAFETY:
michael@0 1103 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1104 * RETURNS:
michael@0 1105 * Returns NULL if the function succeeds.
michael@0 1106 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1107 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1108 */
michael@0 1109 PKIX_Error *
michael@0 1110 PKIX_PL_CertPolicyMap_GetSubjectDomainPolicy(
michael@0 1111 PKIX_PL_CertPolicyMap *policyMapping,
michael@0 1112 PKIX_PL_OID **pSubjectDomainPolicy,
michael@0 1113 void *plContext);
michael@0 1114
michael@0 1115 /*
michael@0 1116 * FUNCTION: PKIX_PL_Cert_GetRequireExplicitPolicy
michael@0 1117 * DESCRIPTION:
michael@0 1118 *
michael@0 1119 * Retrieves the requireExplicitPolicy value of the policy constraints
michael@0 1120 * extension of the Cert pointed to by "cert" and stores it at "pSkipCerts".
michael@0 1121 * If "cert" does not have a policy constraints extension or the
michael@0 1122 * requireExplicitPolicy component is not populated, this function stores -1
michael@0 1123 * at "pSkipCerts".
michael@0 1124 *
michael@0 1125 * PolicyConstraints ::= SEQUENCE {
michael@0 1126 * requireExplicitPolicy [0] SkipCerts OPTIONAL,
michael@0 1127 * inhibitPolicyMapping [1] SkipCerts OPTIONAL }
michael@0 1128 *
michael@0 1129 * SkipCerts ::= INTEGER (0..MAX)
michael@0 1130 *
michael@0 1131 * PARAMETERS:
michael@0 1132 * "cert"
michael@0 1133 * Address of Cert whose requireExplicitPolicy value is to be stored.
michael@0 1134 * Must be non-NULL.
michael@0 1135 * "pSkipCerts"
michael@0 1136 * Address where PKIX_Int32 will be stored. Must be non-NULL.
michael@0 1137 * "plContext"
michael@0 1138 * Platform-specific context pointer.
michael@0 1139 * THREAD SAFETY:
michael@0 1140 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1141 * RETURNS:
michael@0 1142 * Returns NULL if the function succeeds.
michael@0 1143 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1144 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1145 */
michael@0 1146 PKIX_Error *
michael@0 1147 PKIX_PL_Cert_GetRequireExplicitPolicy(
michael@0 1148 PKIX_PL_Cert *cert,
michael@0 1149 PKIX_Int32 *pSkipCerts,
michael@0 1150 void *plContext);
michael@0 1151
michael@0 1152 /*
michael@0 1153 * FUNCTION: PKIX_PL_Cert_GetPolicyMappingInhibited
michael@0 1154 * DESCRIPTION:
michael@0 1155 *
michael@0 1156 * Retrieves the inhibitPolicyMapping value of the policy constraints
michael@0 1157 * extension of the Cert pointed to by "cert" and stores it at "pSkipCerts".
michael@0 1158 * If "cert" does not have a policy constraints extension or the
michael@0 1159 * inhibitPolicyMapping component is not populated, this function stores -1
michael@0 1160 * at "pSkipCerts".
michael@0 1161 *
michael@0 1162 * PolicyConstraints ::= SEQUENCE {
michael@0 1163 * requireExplicitPolicy [0] SkipCerts OPTIONAL,
michael@0 1164 * inhibitPolicyMapping [1] SkipCerts OPTIONAL }
michael@0 1165 *
michael@0 1166 * SkipCerts ::= INTEGER (0..MAX)
michael@0 1167 *
michael@0 1168 * PARAMETERS:
michael@0 1169 * "cert"
michael@0 1170 * Address of Cert whose requireExplicitPolicy value is to be stored.
michael@0 1171 * Must be non-NULL.
michael@0 1172 * "pSkipCerts"
michael@0 1173 * Address where PKIX_Int32 will be stored. Must be non-NULL.
michael@0 1174 * "plContext"
michael@0 1175 * Platform-specific context pointer.
michael@0 1176 * THREAD SAFETY:
michael@0 1177 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1178 * RETURNS:
michael@0 1179 * Returns NULL if the function succeeds.
michael@0 1180 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1181 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1182 */
michael@0 1183 PKIX_Error *
michael@0 1184 PKIX_PL_Cert_GetPolicyMappingInhibited(
michael@0 1185 PKIX_PL_Cert *cert,
michael@0 1186 PKIX_Int32 *pSkipCerts,
michael@0 1187 void *plContext);
michael@0 1188
michael@0 1189 /*
michael@0 1190 * FUNCTION: PKIX_PL_Cert_GetInhibitAnyPolicy
michael@0 1191 * DESCRIPTION:
michael@0 1192 *
michael@0 1193 * Retrieves the value of the inhibit any-policy extension of the Cert
michael@0 1194 * pointed to by "cert" and stores it at "pSkipCerts". If "cert" does not have
michael@0 1195 * an inhibit any-policy extension, this function stores -1 at "pSkipCerts".
michael@0 1196 *
michael@0 1197 * InhibitAnyPolicy ::= SkipCerts
michael@0 1198 *
michael@0 1199 * SkipCerts ::= INTEGER (0..MAX)
michael@0 1200 *
michael@0 1201 * PARAMETERS:
michael@0 1202 * "cert"
michael@0 1203 * Address of Cert whose inhibit any-policy extensions value is to be
michael@0 1204 * stored. Must be non-NULL.
michael@0 1205 * "pSkipCerts"
michael@0 1206 * Address where PKIX_Int32 will be stored. Must be non-NULL.
michael@0 1207 * "plContext"
michael@0 1208 * Platform-specific context pointer.
michael@0 1209 * THREAD SAFETY:
michael@0 1210 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1211 * RETURNS:
michael@0 1212 * Returns NULL if the function succeeds.
michael@0 1213 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1214 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1215 */
michael@0 1216 PKIX_Error *
michael@0 1217 PKIX_PL_Cert_GetInhibitAnyPolicy(
michael@0 1218 PKIX_PL_Cert *cert,
michael@0 1219 PKIX_Int32 *pSkipCerts,
michael@0 1220 void *plContext);
michael@0 1221
michael@0 1222 /* policy processing functions */
michael@0 1223
michael@0 1224 /*
michael@0 1225 * FUNCTION: PKIX_PL_Cert_AreCertPoliciesCritical
michael@0 1226 * DESCRIPTION:
michael@0 1227 *
michael@0 1228 * Checks whether the certificate policies extension of the Cert pointed to
michael@0 1229 * by "cert" is critical and stores the Boolean result at "pCritical". If
michael@0 1230 * "cert" does not have a certificate policies extension, this function
michael@0 1231 * stores NULL at "pCritical".
michael@0 1232 *
michael@0 1233 * XXX what distinguishes NULL from PKIX_FALSE?
michael@0 1234 *
michael@0 1235 * PARAMETERS:
michael@0 1236 * "cert"
michael@0 1237 * Address of Cert whose certificate policies extension's criticality is
michael@0 1238 * to be determined. Must be non-NULL.
michael@0 1239 * "pCritical"
michael@0 1240 * Address where PKIX_Boolean will be stored. Must be non-NULL.
michael@0 1241 * "plContext"
michael@0 1242 * Platform-specific context pointer.
michael@0 1243 * THREAD SAFETY:
michael@0 1244 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1245 * RETURNS:
michael@0 1246 * Returns NULL if the function succeeds.
michael@0 1247 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1248 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1249 */
michael@0 1250 PKIX_Error *
michael@0 1251 PKIX_PL_Cert_AreCertPoliciesCritical(
michael@0 1252 PKIX_PL_Cert *cert,
michael@0 1253 PKIX_Boolean *pCritical,
michael@0 1254 void *plContext);
michael@0 1255
michael@0 1256 /*
michael@0 1257 * FUNCTION: PKIX_PL_Cert_CheckNameConstraints
michael@0 1258 * DESCRIPTION:
michael@0 1259 *
michael@0 1260 * Checks whether the subject distinguished name and subject alternative names
michael@0 1261 * of the Cert pointed to by "cert" satisfy the CertNameConstraints pointed
michael@0 1262 * to by "nameConstraints". If the CertNameConstraints are not satisfied, a
michael@0 1263 * PKIX_Error pointer is returned. If "nameConstraints" is NULL, the function
michael@0 1264 * does nothing.
michael@0 1265 *
michael@0 1266 * PARAMETERS:
michael@0 1267 * "cert"
michael@0 1268 * Address of Cert whose subject names are to be checked.
michael@0 1269 * Must be non-NULL.
michael@0 1270 * "nameConstraints"
michael@0 1271 * Address of CertNameConstraints that need to be satisfied.
michael@0 1272 * "treatCommonNameAsDNSName"
michael@0 1273 * PKIX_TRUE if the subject common name should be considered a dNSName
michael@0 1274 * when evaluating name constraints.
michael@0 1275 * "plContext"
michael@0 1276 * Platform-specific context pointer.
michael@0 1277 * THREAD SAFETY:
michael@0 1278 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1279 * RETURNS:
michael@0 1280 * Returns NULL if the function succeeds.
michael@0 1281 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1282 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1283 */
michael@0 1284 PKIX_Error *
michael@0 1285 PKIX_PL_Cert_CheckNameConstraints(
michael@0 1286 PKIX_PL_Cert *cert,
michael@0 1287 PKIX_PL_CertNameConstraints *nameConstraints,
michael@0 1288 PKIX_Boolean treatCommonNameAsDNSName,
michael@0 1289 void *plContext);
michael@0 1290
michael@0 1291 /*
michael@0 1292 * FUNCTION: PKIX_PL_Cert_MergeNameConstraints
michael@0 1293 * DESCRIPTION:
michael@0 1294 *
michael@0 1295 * Merges the CertNameConstraints pointed to by "firstNC" and the
michael@0 1296 * CertNameConstraints pointed to by "secondNC" and stores the merged
michael@0 1297 * CertNameConstraints at "pResultNC". If "secondNC" is NULL, the
michael@0 1298 * CertNameConstraints pointed to by "firstNC" is stored at "pResultNC".
michael@0 1299 *
michael@0 1300 * Once created, a CertNameConstraints object is immutable.
michael@0 1301 *
michael@0 1302 * PARAMETERS:
michael@0 1303 * "firstNC"
michael@0 1304 * Address of first CertNameConstraints to be merged. Must be non-NULL.
michael@0 1305 * "secondNC"
michael@0 1306 * Address of second CertNameConstraints to be merged
michael@0 1307 * "pResultNC"
michael@0 1308 * Address where object pointer will be stored. Must be non-NULL.
michael@0 1309 * "plContext"
michael@0 1310 * Platform-specific context pointer.
michael@0 1311 * THREAD SAFETY:
michael@0 1312 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1313 * RETURNS:
michael@0 1314 * Returns NULL if the function succeeds.
michael@0 1315 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1316 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1317 */
michael@0 1318 PKIX_Error *
michael@0 1319 PKIX_PL_Cert_MergeNameConstraints(
michael@0 1320 PKIX_PL_CertNameConstraints *firstNC,
michael@0 1321 PKIX_PL_CertNameConstraints *secondNC,
michael@0 1322 PKIX_PL_CertNameConstraints **pResultNC,
michael@0 1323 void *plContext);
michael@0 1324
michael@0 1325 /*
michael@0 1326 * FUNCTION: PKIX_PL_Cert_VerifyKeyUsage
michael@0 1327 * DESCRIPTION:
michael@0 1328 *
michael@0 1329 * Verifies that the keyUsage bit(s) specified by "keyUsage" appear in the
michael@0 1330 * keyUsage extension of the Cert pointed to by "cert". The keyUsage bit
michael@0 1331 * values specified in pkixt.h are supported, and can be bitwise or'ed if
michael@0 1332 * multiple bit values are to be verified. If the keyUsages do not all appear
michael@0 1333 * in the keyUsage extension of "cert", a PKIX_Error pointer is returned.
michael@0 1334 *
michael@0 1335 * KeyUsage ::= BIT STRING {
michael@0 1336 * digitalSignature (0),
michael@0 1337 * nonRepudiation (1),
michael@0 1338 * keyEncipherment (2),
michael@0 1339 * dataEncipherment (3),
michael@0 1340 * keyAgreement (4),
michael@0 1341 * keyCertSign (5),
michael@0 1342 * cRLSign (6),
michael@0 1343 * encipherOnly (7),
michael@0 1344 * decipherOnly (8) }
michael@0 1345 *
michael@0 1346 * PARAMETERS:
michael@0 1347 * "cert"
michael@0 1348 * Address of Cert whose keyUsage bits are to be verified.
michael@0 1349 * Must be non-NULL.
michael@0 1350 * "keyUsage"
michael@0 1351 * Constant representing keyUsage bit(s) that all must appear in keyUsage
michael@0 1352 * extension of "cert".
michael@0 1353 * "plContext" - Platform-specific context pointer.
michael@0 1354 * THREAD SAFETY:
michael@0 1355 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1356 * RETURNS:
michael@0 1357 * Returns NULL if the function succeeds.
michael@0 1358 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1359 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1360 */
michael@0 1361 PKIX_Error *
michael@0 1362 PKIX_PL_Cert_VerifyKeyUsage(
michael@0 1363 PKIX_PL_Cert *cert,
michael@0 1364 PKIX_UInt32 keyUsage,
michael@0 1365 void *plContext);
michael@0 1366
michael@0 1367 /*
michael@0 1368 * FUNCTION: PKIX_PL_Cert_VerifyCertAndKeyType
michael@0 1369 * DESCRIPTION:
michael@0 1370 *
michael@0 1371 * Verifies cert and key types against certificate usage that is
michael@0 1372 * a part of plContext(pkix_pl_nsscontext) structure. Throws an error
michael@0 1373 * if cert or key types does not match.
michael@0 1374 *
michael@0 1375 * PARAMETERS:
michael@0 1376 * "cert"
michael@0 1377 * Address of Cert whose keyUsage bits are to be verified.
michael@0 1378 * Must be non-NULL.
michael@0 1379 * "isLeafCert"
michael@0 1380 * What type of a cert has been verified.
michael@0 1381 * "plContext" - Platform-specific context pointer.
michael@0 1382 * THREAD SAFETY:
michael@0 1383 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1384 * RETURNS:
michael@0 1385 * Returns NULL if the function succeeds.
michael@0 1386 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1387 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1388 */
michael@0 1389 PKIX_Error *
michael@0 1390 PKIX_PL_Cert_VerifyCertAndKeyType(
michael@0 1391 PKIX_PL_Cert *cert,
michael@0 1392 PKIX_Boolean isChainCert,
michael@0 1393 void *plContext);
michael@0 1394
michael@0 1395 /*
michael@0 1396 * FUNCTION: PKIX_PL_Cert_CheckValidity
michael@0 1397 * DESCRIPTION:
michael@0 1398 *
michael@0 1399 * Checks whether the Cert pointed to by "cert" would be valid at the time
michael@0 1400 * represented by the Date pointed to by "date". If "date" is NULL, then this
michael@0 1401 * function checks whether the Cert would be valid at the current time. If the
michael@0 1402 * Cert would not be valid at the specified Date, a PKIX_Error pointer is
michael@0 1403 * returned.
michael@0 1404 *
michael@0 1405 * Validity ::= SEQUENCE {
michael@0 1406 * notBefore Time,
michael@0 1407 * notAfter Time }
michael@0 1408 *
michael@0 1409 * Time ::= CHOICE {
michael@0 1410 * utcTime UTCTime,
michael@0 1411 * generalTime GeneralizedTime }
michael@0 1412 *
michael@0 1413 * PARAMETERS:
michael@0 1414 * "cert"
michael@0 1415 * Address of Cert whose validity is to be checked. Must be non-NULL.
michael@0 1416 * "date"
michael@0 1417 * Address of Date at which the Cert is being checked for validity.
michael@0 1418 * If NULL, the current time is used for the Date.
michael@0 1419 * "plContext"
michael@0 1420 * Platform-specific context pointer.
michael@0 1421 * THREAD SAFETY:
michael@0 1422 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1423 * RETURNS:
michael@0 1424 * Returns NULL if the function succeeds.
michael@0 1425 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1426 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1427 */
michael@0 1428 PKIX_Error *
michael@0 1429 PKIX_PL_Cert_CheckValidity(
michael@0 1430 PKIX_PL_Cert *cert,
michael@0 1431 PKIX_PL_Date *date,
michael@0 1432 void *plContext);
michael@0 1433
michael@0 1434 /*
michael@0 1435 * FUNCTION: PKIX_PL_Cert_GetValidityNotAfter
michael@0 1436 * DESCRIPTION:
michael@0 1437 *
michael@0 1438 * Retrieves a pointer to the Date that represents the notAfter time of the
michael@0 1439 * Certificate pointed to by "cert" and stores it at "pDate".
michael@0 1440 *
michael@0 1441 * Validity ::= SEQUENCE {
michael@0 1442 * notBefore Time,
michael@0 1443 * notAfter Time }
michael@0 1444 *
michael@0 1445 * PARAMETERS:
michael@0 1446 * "cert"
michael@0 1447 * Address of Cert whose validity time is to be retrieved. Must be
michael@0 1448 * non-NULL.
michael@0 1449 * "date"
michael@0 1450 * Address of Date at which the Cert's notAfter time is being retrieved.
michael@0 1451 * Must be non-NULL.
michael@0 1452 * "plContext"
michael@0 1453 * Platform-specific context pointer.
michael@0 1454 * THREAD SAFETY:
michael@0 1455 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1456 * RETURNS:
michael@0 1457 * Returns NULL if the function succeeds.
michael@0 1458 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1459 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1460 */
michael@0 1461 PKIX_Error *
michael@0 1462 PKIX_PL_Cert_GetValidityNotAfter(
michael@0 1463 PKIX_PL_Cert *cert,
michael@0 1464 PKIX_PL_Date **pDate,
michael@0 1465 void *plContext);
michael@0 1466
michael@0 1467 /*
michael@0 1468 * FUNCTION: PKIX_PL_Cert_VerifySignature
michael@0 1469 * DESCRIPTION:
michael@0 1470 *
michael@0 1471 * Verifies the signature on the Cert pointed to by "cert" using the
michael@0 1472 * PublicKey pointed to by "pubKey". If the signature doesn't verify, an
michael@0 1473 * Error pointer is returned.
michael@0 1474 *
michael@0 1475 * PARAMETERS:
michael@0 1476 * "cert"
michael@0 1477 * Address of Cert whose signature is to be verified. Must be non-NULL.
michael@0 1478 * "pubKey"
michael@0 1479 * Address of a Public Key used to verify the signature. Must be non-NULL.
michael@0 1480 * "plContext"
michael@0 1481 * Platform-specific context pointer.
michael@0 1482 * THREAD SAFETY:
michael@0 1483 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1484 * RETURNS:
michael@0 1485 * Returns NULL if the function succeeds.
michael@0 1486 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1487 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1488 */
michael@0 1489 PKIX_Error *
michael@0 1490 PKIX_PL_Cert_VerifySignature(
michael@0 1491 PKIX_PL_Cert *cert,
michael@0 1492 PKIX_PL_PublicKey *pubKey,
michael@0 1493 void *plContext);
michael@0 1494
michael@0 1495 /* A set of flags to indicate how explicitly configured trust anchors should be
michael@0 1496 * handled by PKIX_PL_Cert_IsCertTrusted
michael@0 1497 */
michael@0 1498 typedef enum PKIX_PL_TrustAnchorModeEnum {
michael@0 1499 /* Indicates trust anchors should be ignored; only the underlying
michael@0 1500 * platform's trust settings should be used.
michael@0 1501 */
michael@0 1502 PKIX_PL_TrustAnchorMode_Ignore,
michael@0 1503
michael@0 1504 /* Indicates that explicitly configured trust anchors may be considered
michael@0 1505 * trustworthy, if present.
michael@0 1506 * Note: If the underlying platform supports marking a certificate as
michael@0 1507 * explicitly untrustworthy, explicitly configured trust anchors
michael@0 1508 * MAY be ignored/rejected.
michael@0 1509 */
michael@0 1510 PKIX_PL_TrustAnchorMode_Additive,
michael@0 1511
michael@0 1512 /* Indicates that ONLY trust anchors should be considered as
michael@0 1513 * trustworthy.
michael@0 1514 * Note: If the underlying platform supports marking a certificate as
michael@0 1515 * explicitly untrustworthy, explicitly configured trust anchors
michael@0 1516 * MAY be ignored/rejected.
michael@0 1517 */
michael@0 1518 PKIX_PL_TrustAnchorMode_Exclusive
michael@0 1519 } PKIX_PL_TrustAnchorMode;
michael@0 1520
michael@0 1521 /*
michael@0 1522 * FUNCTION: PKIX_PL_Cert_IsCertTrusted
michael@0 1523 * DESCRIPTION:
michael@0 1524 *
michael@0 1525 * Checks the Cert specified by "cert" to determine, in a manner that depends
michael@0 1526 * on the underlying platform, whether it is trusted, and stores the result in
michael@0 1527 * "pTrusted". If a certificate is trusted it means that a chain built to that
michael@0 1528 * certificate, and satisfying all the usage, policy, validity, and other
michael@0 1529 * tests, is a valid chain and the End Entity certificate from which it was
michael@0 1530 * built can be trusted.
michael@0 1531 *
michael@0 1532 * If the Certificate is not intrinsically trustworthy, it still might end up a
michael@0 1533 * component in a successful chain.
michael@0 1534 *
michael@0 1535 * If the Certificate is intrinsically untrustworthy, this function will return
michael@0 1536 * an error.
michael@0 1537 *
michael@0 1538 * PARAMETERS
michael@0 1539 * "cert"
michael@0 1540 * Address of Cert whose trustworthiness is to be determined. Must be
michael@0 1541 * non-NULL.
michael@0 1542 * "trustAnchorMode"
michael@0 1543 * A PKIX_PL_TrustAnchorMode that indicates how explicitly defined user
michael@0 1544 * trust anchors should be handled.
michael@0 1545 * "pTrusted"
michael@0 1546 * Address where the Boolean value will be stored. Must be non-NULL.
michael@0 1547 * "plContext"
michael@0 1548 * Platform-specific context pointer.
michael@0 1549 * THREAD SAFETY:
michael@0 1550 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1551 * RETURNS:
michael@0 1552 * Returns NULL if the function succeeds.
michael@0 1553 * Returns a CERT Error if the function fails in a non-fatal way.
michael@0 1554 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1555 */
michael@0 1556 PKIX_Error *
michael@0 1557 PKIX_PL_Cert_IsCertTrusted(
michael@0 1558 PKIX_PL_Cert *cert,
michael@0 1559 PKIX_PL_TrustAnchorMode trustAnchorMode,
michael@0 1560 PKIX_Boolean *pTrusted,
michael@0 1561 void *plContext);
michael@0 1562
michael@0 1563 /*
michael@0 1564 * FUNCTION: PKIX_PL_Cert_IsLeafCertTrusted
michael@0 1565 * DESCRIPTION:
michael@0 1566 *
michael@0 1567 * Checks the Leaf Cert specified by "cert" to determine, in a manner that
michael@0 1568 * depends on the underlying platform, whether it is trusted, and stores the
michael@0 1569 * result in "pTrusted". If a certificate is trusted it means that this
michael@0 1570 * End Entify certificate has been marked as trusted for the requested usage,
michael@0 1571 * policy, validity, and other tests.
michael@0 1572 *
michael@0 1573 * If the Certificate is not intrinsically trustworthy, we can still try to
michael@0 1574 * build a successful chain.
michael@0 1575 *
michael@0 1576 * If the Certificate is intrinsically untrustworthy, this function will return
michael@0 1577 * an error.
michael@0 1578 *
michael@0 1579 * PARAMETERS
michael@0 1580 * "cert"
michael@0 1581 * Address of Cert whose trustworthiness is to be determined. Must be
michael@0 1582 * non-NULL.
michael@0 1583 * "pTrusted"
michael@0 1584 * Address where the Boolean value will be stored. Must be non-NULL.
michael@0 1585 * "plContext"
michael@0 1586 * Platform-specific context pointer.
michael@0 1587 * THREAD SAFETY:
michael@0 1588 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1589 * RETURNS:
michael@0 1590 * Returns NULL if the function succeeds.
michael@0 1591 * Returns a CERT Error if the function fails in a non-fatal way.
michael@0 1592 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1593 */
michael@0 1594 PKIX_Error *
michael@0 1595 PKIX_PL_Cert_IsLeafCertTrusted(
michael@0 1596 PKIX_PL_Cert *cert,
michael@0 1597 PKIX_Boolean *pTrusted,
michael@0 1598 void *plContext);
michael@0 1599
michael@0 1600 /* FUNCTION: PKIX_PL_Cert_SetAsTrustAnchor */
michael@0 1601 PKIX_Error*
michael@0 1602 PKIX_PL_Cert_SetAsTrustAnchor(PKIX_PL_Cert *cert,
michael@0 1603 void *plContext);
michael@0 1604
michael@0 1605 /*
michael@0 1606 * FUNCTION: PKIX_PL_Cert_GetCacheFlag
michael@0 1607 * DESCRIPTION:
michael@0 1608 *
michael@0 1609 * Retrieves the value of the cache flag in "cert" and return it at address
michael@0 1610 * pointed by "pCacheFlag". The initila cache flag is determined by the
michael@0 1611 * CertStore this "cert" is fetched from. When CertStore is created, user
michael@0 1612 * need to specify if the data should be cached.
michael@0 1613 *
michael@0 1614 * PARAMETERS:
michael@0 1615 * "cert"
michael@0 1616 * Address of Cert whose cache flag is fetched. Must be non-NULL.
michael@0 1617 * "pCacheFlag"
michael@0 1618 * Address where PKIX_Boolean will be stored. Must be non-NULL.
michael@0 1619 * "plContext"
michael@0 1620 * Platform-specific context pointer.
michael@0 1621 * THREAD SAFETY:
michael@0 1622 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1623 * RETURNS:
michael@0 1624 * Returns NULL if the function succeeds.
michael@0 1625 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1626 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1627 */
michael@0 1628 PKIX_Error *
michael@0 1629 PKIX_PL_Cert_GetCacheFlag(
michael@0 1630 PKIX_PL_Cert *cert,
michael@0 1631 PKIX_Boolean *pCacheFlag,
michael@0 1632 void *plContext);
michael@0 1633
michael@0 1634 /*
michael@0 1635 * FUNCTION: PKIX_PL_Cert_SetCacheFlag
michael@0 1636 * DESCRIPTION:
michael@0 1637 *
michael@0 1638 * Set the value of the cache flag in "cert" base on the boolean value stored
michael@0 1639 * at "cacheFlag". This function is meant to be used by CertStore after a
michael@0 1640 * Cert is created.
michael@0 1641 *
michael@0 1642 * PARAMETERS:
michael@0 1643 * "cert"
michael@0 1644 * Address of Cert where "cacheFlag" is stored. Must be non-NULL.
michael@0 1645 * "cacheFlag"
michael@0 1646 * PKIX_Boolean flag for cache flag.
michael@0 1647 * "plContext"
michael@0 1648 * Platform-specific context pointer.
michael@0 1649 * THREAD SAFETY:
michael@0 1650 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1651 * RETURNS:
michael@0 1652 * Returns NULL if the function succeeds.
michael@0 1653 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1654 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1655 */
michael@0 1656 PKIX_Error *
michael@0 1657 PKIX_PL_Cert_SetCacheFlag(
michael@0 1658 PKIX_PL_Cert *cert,
michael@0 1659 PKIX_Boolean cacheFlag,
michael@0 1660 void *plContext);
michael@0 1661
michael@0 1662 /*
michael@0 1663 * FUNCTION: PKIX_PL_Cert_GetTrustCertStore
michael@0 1664 * DESCRIPTION:
michael@0 1665 *
michael@0 1666 * Retrieves the value of the CertStore in "cert" and return it at address
michael@0 1667 * pointed by "pCertStore".
michael@0 1668 *
michael@0 1669 * PARAMETERS:
michael@0 1670 * "cert"
michael@0 1671 * Address of Cert whose CertStore is fetched. Must be non-NULL.
michael@0 1672 * "pTrustCertStore"
michael@0 1673 * Address where CertStore will be stored and returned. Must be non-NULL.
michael@0 1674 * "plContext"
michael@0 1675 * Platform-specific context pointer.
michael@0 1676 * THREAD SAFETY:
michael@0 1677 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1678 * RETURNS:
michael@0 1679 * Returns NULL if the function succeeds.
michael@0 1680 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1681 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1682 */
michael@0 1683 PKIX_Error *
michael@0 1684 PKIX_PL_Cert_GetTrustCertStore(
michael@0 1685 PKIX_PL_Cert *cert,
michael@0 1686 PKIX_CertStore **pTrustCertStore,
michael@0 1687 void *plContext);
michael@0 1688
michael@0 1689 /*
michael@0 1690 * FUNCTION: PKIX_PL_Cert_SetTrustCertStore
michael@0 1691 * DESCRIPTION:
michael@0 1692 *
michael@0 1693 * Set the value of the CertStore "certStore" in "cert".
michael@0 1694 *
michael@0 1695 * PARAMETERS:
michael@0 1696 * "cert"
michael@0 1697 * Address of Cert where "certStore" will be stored. Must be non-NULL.
michael@0 1698 * "trustCertStore"
michael@0 1699 * Address where the CertStore is. Must be non-NULL.
michael@0 1700 * "plContext"
michael@0 1701 * Platform-specific context pointer.
michael@0 1702 * THREAD SAFETY:
michael@0 1703 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1704 * RETURNS:
michael@0 1705 * Returns NULL if the function succeeds.
michael@0 1706 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1707 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1708 */
michael@0 1709 PKIX_Error *
michael@0 1710 PKIX_PL_Cert_SetTrustCertStore(
michael@0 1711 PKIX_PL_Cert *cert,
michael@0 1712 PKIX_CertStore *trustCertStore,
michael@0 1713 void *plContext);
michael@0 1714
michael@0 1715
michael@0 1716 /*
michael@0 1717 * FUNCTION: PKIX_PL_Cert_GetAuthorityInfoAccess
michael@0 1718 * DESCRIPTION:
michael@0 1719 *
michael@0 1720 * Retrieves the value(s) of the Authority Information Access in "cert" and
michael@0 1721 * returns it in a list at address pointed by "pAuthorityInfoAccess".
michael@0 1722 *
michael@0 1723 * SubjectInfoAccess ::=
michael@0 1724 * SEQUENCE SIZE (1..MAX) of AccessDescription
michael@0 1725 * AccessDescription ::= SEQUENCE {
michael@0 1726 * accessMethod OBJECT IDENTIFIER,
michael@0 1727 * accessLocation GeneralName
michael@0 1728 * }
michael@0 1729 *
michael@0 1730 * PARAMETERS:
michael@0 1731 * "cert"
michael@0 1732 * Address of Cert whose Authority Information Access is fetched.
michael@0 1733 * Must be non-NULL.
michael@0 1734 * "pAuthorityInfoAccess"
michael@0 1735 * Address where Authority InfoAccess will be stored and returned.
michael@0 1736 * Must be non-NULL.
michael@0 1737 * "plContext"
michael@0 1738 * Platform-specific context pointer.
michael@0 1739 * THREAD SAFETY:
michael@0 1740 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1741 * RETURNS:
michael@0 1742 * Returns NULL if the function succeeds.
michael@0 1743 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1744 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1745 */
michael@0 1746 PKIX_Error *
michael@0 1747 PKIX_PL_Cert_GetAuthorityInfoAccess(
michael@0 1748 PKIX_PL_Cert *cert,
michael@0 1749 PKIX_List **pAiaList, /* of PKIX_PL_InfoAccess */
michael@0 1750 void *plContext);
michael@0 1751
michael@0 1752
michael@0 1753 /*
michael@0 1754 * FUNCTION: PKIX_PL_Cert_GetSubjectInfoAccess
michael@0 1755 * DESCRIPTION:
michael@0 1756 *
michael@0 1757 * Retrieves the value(s) of the Subject Information Access in "cert" and
michael@0 1758 * returns it in a list at address pointed by "pSubjectInfoAccess".
michael@0 1759 *
michael@0 1760 * SubjectInfoAccess ::=
michael@0 1761 * SEQUENCE SIZE (1..MAX) of AccessDescription
michael@0 1762 * AccessDescription ::= SEQUENCE {
michael@0 1763 * accessMethod OBJECT IDENTIFIER,
michael@0 1764 * accessLocation GeneralName
michael@0 1765 * }
michael@0 1766 *
michael@0 1767 * PARAMETERS:
michael@0 1768 * "cert"
michael@0 1769 * Address of Cert whose Subject Information Access is fetched.
michael@0 1770 * Must be non-NULL.
michael@0 1771 * "pSubjectInfoAccess"
michael@0 1772 * Address where Subject InfoAccess will be stored and returned.
michael@0 1773 * Must be non-NULL.
michael@0 1774 * "plContext"
michael@0 1775 * Platform-specific context pointer.
michael@0 1776 * THREAD SAFETY:
michael@0 1777 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1778 * RETURNS:
michael@0 1779 * Returns NULL if the function succeeds.
michael@0 1780 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1781 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1782 */
michael@0 1783 PKIX_Error *
michael@0 1784 PKIX_PL_Cert_GetSubjectInfoAccess(
michael@0 1785 PKIX_PL_Cert *cert,
michael@0 1786 PKIX_List **pSiaList, /* of PKIX_PL_InfoAccess */
michael@0 1787 void *plContext);
michael@0 1788
michael@0 1789
michael@0 1790
michael@0 1791 /*
michael@0 1792 * FUNCTION: PKIX_PL_Cert_GetCrlDp
michael@0 1793 * DESCRIPTION:
michael@0 1794 *
michael@0 1795 * Retrieves the value(s) of the CRL Distribution Point Extension and
michael@0 1796 * returns it in a list at address pointed by "pDpList".
michael@0 1797 *
michael@0 1798 * PARAMETERS:
michael@0 1799 * "cert"
michael@0 1800 * Address of Cert whose Subject Information Access is fetched.
michael@0 1801 * Must be non-NULL.
michael@0 1802 * "pDpList"
michael@0 1803 * Address where CRL DP will be stored and returned.
michael@0 1804 * Must be non-NULL.
michael@0 1805 * "plContext"
michael@0 1806 * Platform-specific context pointer.
michael@0 1807 * THREAD SAFETY:
michael@0 1808 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1809 * RETURNS:
michael@0 1810 * Returns NULL if the function succeeds.
michael@0 1811 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1812 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1813 */
michael@0 1814 PKIX_Error *
michael@0 1815 PKIX_PL_Cert_GetCrlDp(PKIX_PL_Cert *cert,
michael@0 1816 PKIX_List **pDpList,
michael@0 1817 void *plContext);
michael@0 1818
michael@0 1819
michael@0 1820 /*
michael@0 1821 * InfoAccess
michael@0 1822 *
michael@0 1823 * To hold Authority Information Access or Subject Information Access
michael@0 1824 * retrieved from a Certificate.
michael@0 1825 */
michael@0 1826
michael@0 1827 #define PKIX_INFOACCESS_OCSP 1
michael@0 1828 #define PKIX_INFOACCESS_CA_ISSUERS 2
michael@0 1829 #define PKIX_INFOACCESS_TIMESTAMPING 3
michael@0 1830 #define PKIX_INFOACCESS_CA_REPOSITORY 5
michael@0 1831
michael@0 1832 #define PKIX_INFOACCESS_LOCATION_UNKNOWN 0
michael@0 1833 #define PKIX_INFOACCESS_LOCATION_HTTP 1
michael@0 1834 #ifndef NSS_PKIX_NO_LDAP
michael@0 1835 #define PKIX_INFOACCESS_LOCATION_LDAP 2
michael@0 1836 #endif
michael@0 1837
michael@0 1838 /*
michael@0 1839 * FUNCTION: PKIX_PL_InfoAccess_GetMethod
michael@0 1840 * DESCRIPTION:
michael@0 1841 *
michael@0 1842 * Stores the method of the Information Access from "infoAccess" and
michael@0 1843 * returns in "pMethod".
michael@0 1844 *
michael@0 1845 * SubjectInfoAccess ::=
michael@0 1846 * AccessDescription ::= SEQUENCE {
michael@0 1847 * accessMethod OBJECT IDENTIFIER,
michael@0 1848 * accessLocation GeneralName
michael@0 1849 * }
michael@0 1850 *
michael@0 1851 * PARAMETERS:
michael@0 1852 * "infoAccess"
michael@0 1853 * Address of PKIX_PL_InfoAccess that has the access data.
michael@0 1854 * Must be non-NULL.
michael@0 1855 * "pMethod"
michael@0 1856 * Address where access method will be stored and returned.
michael@0 1857 * Must be non-NULL.
michael@0 1858 * "plContext"
michael@0 1859 * Platform-specific context pointer.
michael@0 1860 * THREAD SAFETY:
michael@0 1861 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1862 * RETURNS:
michael@0 1863 * Returns NULL if the function succeeds.
michael@0 1864 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1865 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1866 */
michael@0 1867 PKIX_Error *
michael@0 1868 PKIX_PL_InfoAccess_GetMethod(
michael@0 1869 PKIX_PL_InfoAccess *infoAccess,
michael@0 1870 PKIX_UInt32 *pMethod,
michael@0 1871 void *plContext);
michael@0 1872
michael@0 1873 /*
michael@0 1874 * FUNCTION: PKIX_PL_InfoAccess_GetLocation
michael@0 1875 * DESCRIPTION:
michael@0 1876 *
michael@0 1877 * Stores the location of the Information Access from "infoAccess" and
michael@0 1878 * returns in "pLocation".
michael@0 1879 *
michael@0 1880 * SubjectInfoAccess ::=
michael@0 1881 * AccessDescription ::= SEQUENCE {
michael@0 1882 * accessMethod OBJECT IDENTIFIER,
michael@0 1883 * accessLocation GeneralName
michael@0 1884 * }
michael@0 1885 *
michael@0 1886 * PARAMETERS:
michael@0 1887 * "infoAccess"
michael@0 1888 * Address of PKIX_PL_InfoAccess that has the access data.
michael@0 1889 * Must be non-NULL.
michael@0 1890 * "pLocation"
michael@0 1891 * Address where access location will be stored and returned.
michael@0 1892 * Must be non-NULL.
michael@0 1893 * "plContext"
michael@0 1894 * Platform-specific context pointer.
michael@0 1895 * THREAD SAFETY:
michael@0 1896 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1897 * RETURNS:
michael@0 1898 * Returns NULL if the function succeeds.
michael@0 1899 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1900 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1901 */
michael@0 1902 PKIX_Error *
michael@0 1903 PKIX_PL_InfoAccess_GetLocation(
michael@0 1904 PKIX_PL_InfoAccess *infoAccess,
michael@0 1905 PKIX_PL_GeneralName **pLocation,
michael@0 1906 void *plContext);
michael@0 1907
michael@0 1908 /*
michael@0 1909 * FUNCTION: PKIX_PL_InfoAccess_GetLocationType
michael@0 1910 * DESCRIPTION:
michael@0 1911 *
michael@0 1912 * Stores the type of location of the Information Access from "infoAccess" and
michael@0 1913 * returns in "pType".
michael@0 1914 *
michael@0 1915 * SubjectInfoAccess ::=
michael@0 1916 * AccessDescription ::= SEQUENCE {
michael@0 1917 * accessMethod OBJECT IDENTIFIER,
michael@0 1918 * accessLocation GeneralName
michael@0 1919 * }
michael@0 1920 *
michael@0 1921 * PARAMETERS:
michael@0 1922 * "infoAccess"
michael@0 1923 * Address of PKIX_PL_InfoAccess that has the access data.
michael@0 1924 * Must be non-NULL.
michael@0 1925 * "pType"
michael@0 1926 * Address where access location type will be stored and returned.
michael@0 1927 * Must be non-NULL.
michael@0 1928 * "plContext"
michael@0 1929 * Platform-specific context pointer.
michael@0 1930 * THREAD SAFETY:
michael@0 1931 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 1932 * RETURNS:
michael@0 1933 * Returns NULL if the function succeeds.
michael@0 1934 * Returns a Cert Error if the function fails in a non-fatal way.
michael@0 1935 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 1936 */
michael@0 1937 PKIX_Error *
michael@0 1938 PKIX_PL_InfoAccess_GetLocationType(
michael@0 1939 PKIX_PL_InfoAccess *infoAccess,
michael@0 1940 PKIX_UInt32 *pType,
michael@0 1941 void *plContext);
michael@0 1942
michael@0 1943 PKIX_Error *
michael@0 1944 pkix_pl_InfoAccess_GetAIACerts(
michael@0 1945 PKIX_PL_InfoAccess *ia,
michael@0 1946 void **pNBIOContext,
michael@0 1947 void **pHandle,
michael@0 1948 PKIX_List **pCerts,
michael@0 1949 void *plContext);
michael@0 1950
michael@0 1951 /*
michael@0 1952 * CRL
michael@0 1953 *
michael@0 1954 * A CRL represents an X.509 certificate revocation list. It can be created
michael@0 1955 * using the bytes of a valid ASN.1 DER encoding. Once created, a CRL is
michael@0 1956 * immutable. The following functions include accessors (gettors) for the
michael@0 1957 * various components of an X.509 CRL, as well as a function for signature
michael@0 1958 * verification.
michael@0 1959 */
michael@0 1960
michael@0 1961 /*
michael@0 1962 * FUNCTION: PKIX_PL_CRL_Create
michael@0 1963 * DESCRIPTION:
michael@0 1964 *
michael@0 1965 * Creates a new CRL using the bytes in the ByteArray pointed to by
michael@0 1966 * "byteArray" and stores it at "pCRL". If the bytes are not a valid ASN.1
michael@0 1967 * DER encoding of a CRL, a PKIX_Error pointer is returned. Once created, a
michael@0 1968 * CRL is immutable.
michael@0 1969 *
michael@0 1970 * CertificateList ::= SEQUENCE {
michael@0 1971 * tbsCertList TBSCertList,
michael@0 1972 * signatureAlgorithm AlgorithmIdentifier,
michael@0 1973 * signatureValue BIT STRING }
michael@0 1974 *
michael@0 1975 * TBSCertList ::= SEQUENCE {
michael@0 1976 * version Version OPTIONAL,
michael@0 1977 * -- if present, MUST be v2
michael@0 1978 * signature AlgorithmIdentifier,
michael@0 1979 * issuer Name,
michael@0 1980 * thisUpdate Time,
michael@0 1981 * nextUpdate Time OPTIONAL,
michael@0 1982 * revokedCertificates SEQUENCE OF SEQUENCE {
michael@0 1983 * userCertificate CertificateSerialNumber,
michael@0 1984 * revocationDate Time,
michael@0 1985 * crlEntryExtensions Extensions OPTIONAL
michael@0 1986 * -- if present, MUST be v2
michael@0 1987 * } OPTIONAL,
michael@0 1988 * crlExtensions [0] EXPLICIT Extensions OPTIONAL
michael@0 1989 * -- if present, MUST be v2
michael@0 1990 * }
michael@0 1991 *
michael@0 1992 * PARAMETERS:
michael@0 1993 * "byteArray"
michael@0 1994 * Address of ByteArray representing the CRL's DER encoding.
michael@0 1995 * Must be non-NULL.
michael@0 1996 * "pCRL"
michael@0 1997 * Address where object pointer will be stored. Must be non-NULL.
michael@0 1998 * "plContext"
michael@0 1999 * Platform-specific context pointer.
michael@0 2000 * THREAD SAFETY:
michael@0 2001 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2002 * RETURNS:
michael@0 2003 * Returns NULL if the function succeeds.
michael@0 2004 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2005 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2006 */
michael@0 2007 PKIX_Error *
michael@0 2008 PKIX_PL_CRL_Create(
michael@0 2009 PKIX_PL_ByteArray *byteArray,
michael@0 2010 PKIX_PL_CRL **pCRL,
michael@0 2011 void *plContext);
michael@0 2012
michael@0 2013 /*
michael@0 2014 * FUNCTION: PKIX_PL_CRL_GetIssuer
michael@0 2015 * DESCRIPTION:
michael@0 2016 *
michael@0 2017 * Retrieves a pointer to the X500Name that represents the issuer of the CRL
michael@0 2018 * pointed to by "crl" and stores it at "pCRLIssuer".
michael@0 2019 *
michael@0 2020 * PARAMETERS:
michael@0 2021 * "crl"
michael@0 2022 * Address of CRL whose issuer is to be stored. Must be non-NULL.
michael@0 2023 * "pCRLIssuer"
michael@0 2024 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2025 * "plContext"
michael@0 2026 * Platform-specific context pointer.
michael@0 2027 * THREAD SAFETY:
michael@0 2028 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2029 * RETURNS:
michael@0 2030 * Returns NULL if the function succeeds.
michael@0 2031 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2032 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2033 */
michael@0 2034 PKIX_Error *
michael@0 2035 PKIX_PL_CRL_GetIssuer(
michael@0 2036 PKIX_PL_CRL *crl,
michael@0 2037 PKIX_PL_X500Name **pCRLIssuer,
michael@0 2038 void *plContext);
michael@0 2039
michael@0 2040 /*
michael@0 2041 * FUNCTION: PKIX_PL_CRL_GetCriticalExtensionOIDs
michael@0 2042 * DESCRIPTION:
michael@0 2043 *
michael@0 2044 * Retrieves a pointer to the List of OIDs (each OID corresponding to a
michael@0 2045 * critical extension of the CRL pointed to by "crl") and stores it at
michael@0 2046 * "pExtensions". If "crl" does not have any critical extensions, this
michael@0 2047 * function stores an empty List at "pExtensions".
michael@0 2048 *
michael@0 2049 * Note that the List returned by this function is immutable.
michael@0 2050 *
michael@0 2051 * PARAMETERS:
michael@0 2052 * "crl"
michael@0 2053 * Address of CRL whose critical extension OIDs are to be stored.
michael@0 2054 * Must be non-NULL.
michael@0 2055 * "pExtensions"
michael@0 2056 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2057 * "plContext"
michael@0 2058 * Platform-specific context pointer.
michael@0 2059 * THREAD SAFETY:
michael@0 2060 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2061 * RETURNS:
michael@0 2062 * Returns NULL if the function succeeds.
michael@0 2063 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2064 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2065 */
michael@0 2066 PKIX_Error *
michael@0 2067 PKIX_PL_CRL_GetCriticalExtensionOIDs(
michael@0 2068 PKIX_PL_CRL *crl,
michael@0 2069 PKIX_List **pExtensions, /* list of PKIX_PL_OID */
michael@0 2070 void *plContext);
michael@0 2071
michael@0 2072 /*
michael@0 2073 * FUNCTION: PKIX_PL_CRL_GetCRLEntryForSerialNumber
michael@0 2074 * DESCRIPTION:
michael@0 2075 *
michael@0 2076 * Retrieves a pointer to the CRLEntry (found in the CRL pointed to by "crl")
michael@0 2077 * corresponding to the BigInt pointed to by "serialNumber" and stores it at
michael@0 2078 * "pCRLEntry". If there is no such CRLEntry, this functions stores NULL at
michael@0 2079 * "pCRLEntry". Once created, a CRLEntry is immutable.
michael@0 2080 *
michael@0 2081 * PARAMETERS:
michael@0 2082 * "crl"
michael@0 2083 * Address of CRL whose CRL Entries are to be searched. Must be non-NULL.
michael@0 2084 * "serialNumber"
michael@0 2085 * Address of BigInt representing serial number of certificate whose
michael@0 2086 * CRLEntry is to be found. Must be non-NULL.
michael@0 2087 * "pCRLEntry"
michael@0 2088 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2089 * "plContext"
michael@0 2090 * Platform-specific context pointer.
michael@0 2091 * THREAD SAFETY:
michael@0 2092 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2093 * RETURNS:
michael@0 2094 * Returns NULL if the function succeeds.
michael@0 2095 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2096 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2097 */
michael@0 2098 PKIX_Error *
michael@0 2099 PKIX_PL_CRL_GetCRLEntryForSerialNumber(
michael@0 2100 PKIX_PL_CRL *crl,
michael@0 2101 PKIX_PL_BigInt *serialNumber,
michael@0 2102 PKIX_PL_CRLEntry **pCRLEntry,
michael@0 2103 void *plContext);
michael@0 2104
michael@0 2105 /*
michael@0 2106 * FUNCTION: PKIX_PL_CRL_GetCRLNumber
michael@0 2107 * DESCRIPTION:
michael@0 2108 * Retrieves the CRL Number from extension. This is non-critical extension.
michael@0 2109 *
michael@0 2110 * PARAMETERS:
michael@0 2111 * "crl"
michael@0 2112 * Address of CRL whose version is to be stored. Must be non-NULL.
michael@0 2113 * "pCrlNumber"
michael@0 2114 * Address where a CRL Number will be stored. Must be non-NULL.
michael@0 2115 * "plContext"
michael@0 2116 * Platform-specific context pointer.
michael@0 2117 * THREAD SAFETY:
michael@0 2118 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2119 * RETURNS:
michael@0 2120 * Returns NULL if the function succeeds.
michael@0 2121 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2122 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2123 */
michael@0 2124 PKIX_Error *
michael@0 2125 PKIX_PL_CRL_GetCRLNumber(
michael@0 2126 PKIX_PL_CRL *crl,
michael@0 2127 PKIX_PL_BigInt **pCrlNumber,
michael@0 2128 void *plContext);
michael@0 2129
michael@0 2130 /*
michael@0 2131 * FUNCTION: PKIX_PL_CRL_VerifyUpdateTime
michael@0 2132 * DESCRIPTION:
michael@0 2133 *
michael@0 2134 * Checks whether the CRL pointed to by "crl" would be valid at the time
michael@0 2135 * represented by the Date pointed to by "date" and stores the Boolean result
michael@0 2136 * at "pResult". This check is done only when NIST policy is enforced.
michael@0 2137 *
michael@0 2138 * Time ::= CHOICE {
michael@0 2139 * utcTime UTCTime,
michael@0 2140 * generalTime GeneralizedTime }
michael@0 2141 *
michael@0 2142 * PARAMETERS:
michael@0 2143 * "crl"
michael@0 2144 * Address of CRL whose validity is to be checked. Must be non-NULL.
michael@0 2145 * "date"
michael@0 2146 * Address of Date at which the CRL is being checked for validity.
michael@0 2147 * Must be non-NULL.
michael@0 2148 * "pResult"
michael@0 2149 * Address of Boolean result. Must be non-NULL.
michael@0 2150 * "plContext"
michael@0 2151 * Platform-specific context pointer.
michael@0 2152 * THREAD SAFETY:
michael@0 2153 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2154 * RETURNS:
michael@0 2155 * Returns NULL if the function succeeds.
michael@0 2156 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2157 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2158 */
michael@0 2159 PKIX_Error *
michael@0 2160 PKIX_PL_CRL_VerifyUpdateTime(
michael@0 2161 PKIX_PL_CRL *crl,
michael@0 2162 PKIX_PL_Date *date,
michael@0 2163 PKIX_Boolean *pResult,
michael@0 2164 void *plContext);
michael@0 2165
michael@0 2166 /*
michael@0 2167 * FUNCTION: PKIX_PL_CRL_VerifySignature
michael@0 2168 * DESCRIPTION:
michael@0 2169 *
michael@0 2170 * Verifies the signature on the CRL pointed to by "crl" using the PublicKey
michael@0 2171 * pointed to by "pubKey". If the signature doesn't verify, a PKIX_Error
michael@0 2172 * pointer is returned.
michael@0 2173 *
michael@0 2174 * PARAMETERS:
michael@0 2175 * "crl"
michael@0 2176 * Address of CRL whose signature is to be verified. Must be non-NULL.
michael@0 2177 * "pubKey"
michael@0 2178 * Address of a Public Key used to verify the signature. Must be non-NULL.
michael@0 2179 * "plContext"
michael@0 2180 * Platform-specific context pointer.
michael@0 2181 * THREAD SAFETY:
michael@0 2182 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2183 * RETURNS:
michael@0 2184 * Returns NULL if the function succeeds.
michael@0 2185 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2186 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2187 */
michael@0 2188 PKIX_Error *
michael@0 2189 PKIX_PL_CRL_VerifySignature(
michael@0 2190 PKIX_PL_CRL *crl,
michael@0 2191 PKIX_PL_PublicKey *pubKey,
michael@0 2192 void *plContext);
michael@0 2193
michael@0 2194 /*
michael@0 2195 * FUNCTION: PKIX_PL_CRL_ReleaseDerCrl
michael@0 2196 * DESCRIPTION:
michael@0 2197 *
michael@0 2198 * Relinguish the ownership for the crl der. The operation will succeed if
michael@0 2199 * a crl owns the der. If the crl was created from existing crl and does not
michael@0 2200 * own the der, then the function will return null.
michael@0 2201 *
michael@0 2202 * PARAMETERS:
michael@0 2203 * "crl"
michael@0 2204 * Address of CRL whose signature is to be verified. Must be non-NULL.
michael@0 2205 * "derCrl"
michael@0 2206 * Pointer to a SECItem that has der crl.
michael@0 2207 * "plContext"
michael@0 2208 * Platform-specific context pointer.
michael@0 2209 * THREAD SAFETY:
michael@0 2210 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2211 * RETURNS:
michael@0 2212 * Returns NULL if the function succeeds.
michael@0 2213 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2214 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2215 */
michael@0 2216 PKIX_Error *
michael@0 2217 PKIX_PL_CRL_ReleaseDerCrl(PKIX_PL_CRL *crl,
michael@0 2218 SECItem **derCrl,
michael@0 2219 void *plContext);
michael@0 2220 /*
michael@0 2221 * FUNCTION: PKIX_PL_CRL_AdoptDerCrl
michael@0 2222 * DESCRIPTION:
michael@0 2223 *
michael@0 2224 * Adopt memory of the der. The secItem that contains der will be
michael@0 2225 * freed with destruction of parent pkix crl structure.
michael@0 2226 *
michael@0 2227 * * PARAMETERS:
michael@0 2228 * "crl"
michael@0 2229 * Address of CRL whose signature is to be verified. Must be non-NULL.
michael@0 2230 * "derCrl"
michael@0 2231 * Pointer to a SECItem that has der crl.
michael@0 2232 * "plContext"
michael@0 2233 * Platform-specific context pointer.
michael@0 2234 * THREAD SAFETY:
michael@0 2235 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2236 * RETURNS:
michael@0 2237 * Returns NULL if the function succeeds.
michael@0 2238 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2239 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2240 */
michael@0 2241 PKIX_Error *
michael@0 2242 PKIX_PL_CRL_AdoptDerCrl(PKIX_PL_CRL *crl,
michael@0 2243 SECItem *derCrl,
michael@0 2244 void *plContext);
michael@0 2245
michael@0 2246 /*
michael@0 2247 * FUNCTION: PKIX_PL_CRLEntry_GetCRLEntryReasonCode
michael@0 2248 * DESCRIPTION:
michael@0 2249 *
michael@0 2250 * Retrieves the value of the reason code extension of the CRLEntry pointed
michael@0 2251 * to by "crlEntry" and stores it at "pReason". If the "crlEntry" has no
michael@0 2252 * reason code extension, this function stores -1 at "pReason".
michael@0 2253 *
michael@0 2254 * CRLReason ::= ENUMERATED {
michael@0 2255 * unspecified (0),
michael@0 2256 * keyCompromise (1),
michael@0 2257 * cACompromise (2),
michael@0 2258 * affiliationChanged (3),
michael@0 2259 * superseded (4),
michael@0 2260 * cessationOfOperation (5),
michael@0 2261 * certificateHold (6),
michael@0 2262 * removeFromCRL (8),
michael@0 2263 * privilegeWithdrawn (9),
michael@0 2264 * aACompromise (10) }
michael@0 2265 *
michael@0 2266 * PARAMETERS:
michael@0 2267 * "crlEntry"
michael@0 2268 * Address of CRLEntry whose reason code bit values are to be returned
michael@0 2269 * at "pReason". Must be non-NULL.
michael@0 2270 * "pReason"
michael@0 2271 * Address of PKIX_Int32 where reason code is stored. Must be non-NULL.
michael@0 2272 * "plContext"
michael@0 2273 * Platform-specific context pointer.
michael@0 2274 * THREAD SAFETY:
michael@0 2275 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2276 * RETURNS:
michael@0 2277 * Returns NULL if the function succeeds.
michael@0 2278 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2279 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2280 */
michael@0 2281 PKIX_Error *
michael@0 2282 PKIX_PL_CRLEntry_GetCRLEntryReasonCode(
michael@0 2283 PKIX_PL_CRLEntry *crlEntry,
michael@0 2284 PKIX_Int32 *pReason,
michael@0 2285 void *plContext);
michael@0 2286
michael@0 2287 /*
michael@0 2288 * FUNCTION: PKIX_PL_CRLEntry_GetCriticalExtensionOIDs
michael@0 2289 * DESCRIPTION:
michael@0 2290 *
michael@0 2291 * Retrieves a pointer to the List of OIDs (each OID corresponding to a
michael@0 2292 * critical extension of the CRLEntry pointed to by "crlEntry") and stores it
michael@0 2293 * at "pExtensions". If "crlEntry" does not have any critical extensions, this
michael@0 2294 * function stores an empty List at "pExtensions".
michael@0 2295 *
michael@0 2296 * Note that the List returned by this function is immutable.
michael@0 2297 *
michael@0 2298 * PARAMETERS:
michael@0 2299 * "crlEntry"
michael@0 2300 * Address of CRLEntry whose critical extension OIDs are to be stored.
michael@0 2301 * Must be non-NULL.
michael@0 2302 * "pExtensions"
michael@0 2303 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2304 * "plContext"
michael@0 2305 * Platform-specific context pointer.
michael@0 2306 * THREAD SAFETY:
michael@0 2307 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2308 * RETURNS:
michael@0 2309 * Returns NULL if the function succeeds.
michael@0 2310 * Returns a CRL Error if the function fails in a non-fatal way.
michael@0 2311 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2312 */
michael@0 2313 PKIX_Error *
michael@0 2314 PKIX_PL_CRLEntry_GetCriticalExtensionOIDs(
michael@0 2315 PKIX_PL_CRLEntry *crlEntry,
michael@0 2316 PKIX_List **pExtensions, /* list of PKIX_PL_OID */
michael@0 2317 void *plContext);
michael@0 2318
michael@0 2319 #ifdef BUILD_LIBPKIX_TESTS
michael@0 2320 /*
michael@0 2321 * FUNCTION: PKIX_PL_X500Name_Create
michael@0 2322 * DESCRIPTION:
michael@0 2323 *
michael@0 2324 * Creates a new X500Name using the UTF8 string representation pointed to by
michael@0 2325 * "stringRep" and stores it at "pName". Once created, an X500Name is
michael@0 2326 * immutable.
michael@0 2327 *
michael@0 2328 * Name ::= CHOICE {
michael@0 2329 * RDNSequence }
michael@0 2330 *
michael@0 2331 * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
michael@0 2332 *
michael@0 2333 * RelativeDistinguishedName ::=
michael@0 2334 * SET OF AttributeTypeAndValue
michael@0 2335 *
michael@0 2336 * AttributeTypeAndValue ::= SEQUENCE {
michael@0 2337 * type AttributeType,
michael@0 2338 * value AttributeValue }
michael@0 2339 *
michael@0 2340 * AttributeType ::= OBJECT IDENTIFIER
michael@0 2341 *
michael@0 2342 * AttributeValue ::= ANY DEFINED BY AttributeType
michael@0 2343 *
michael@0 2344 * DirectoryString ::= CHOICE {
michael@0 2345 * teletexString TeletexString (SIZE (1..MAX)),
michael@0 2346 * printableString PrintableString (SIZE (1..MAX)),
michael@0 2347 * universalString UniversalString (SIZE (1..MAX)),
michael@0 2348 * utf8String UTF8String (SIZE (1..MAX)),
michael@0 2349 * bmpString BMPString (SIZE (1..MAX)) }
michael@0 2350 *
michael@0 2351 * PARAMETERS:
michael@0 2352 * "stringRep"
michael@0 2353 * Address of UTF8 String representation of X500Name. Must be non-NULL.
michael@0 2354 * "pName"
michael@0 2355 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2356 * "plContext"
michael@0 2357 * Platform-specific context pointer.
michael@0 2358 * THREAD SAFETY:
michael@0 2359 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2360 * RETURNS:
michael@0 2361 * Returns NULL if the function succeeds.
michael@0 2362 * Returns an X500Name Error if the function fails in a non-fatal way.
michael@0 2363 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2364 */
michael@0 2365 PKIX_Error *
michael@0 2366 PKIX_PL_X500Name_Create (
michael@0 2367 PKIX_PL_String *stringRep,
michael@0 2368 PKIX_PL_X500Name **pName,
michael@0 2369 void *plContext);
michael@0 2370
michael@0 2371 #endif /* BUILD_LIBPKIX_TESTS */
michael@0 2372
michael@0 2373 /*
michael@0 2374 * FUNCTION: PKIX_PL_X500Name_CreateFromCERTName
michael@0 2375 * DESCRIPTION:
michael@0 2376 *
michael@0 2377 * The function creates x500Name using der encoded DN and/or pointer to
michael@0 2378 * CERTName. If arument "name" is NULL, but derName is supplied when
michael@0 2379 * the function generates nssDN(CERTName type) from der data. If derName
michael@0 2380 * is not supplied, CERTName *name will not be used to generate DN DER
michael@0 2381 * encoding.
michael@0 2382 *
michael@0 2383 * PARAMETERS:
michael@0 2384 * "derName"
michael@0 2385 * Address of DER representation of X500Name. Can be NULL
michael@0 2386 * "name"
michael@0 2387 * Address of CERTName representation of X500Name. Can be NULL
michael@0 2388 * "pName"
michael@0 2389 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2390 * "plContext"
michael@0 2391 * Platform-specific context pointer.
michael@0 2392 * THREAD SAFETY:
michael@0 2393 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2394 * RETURNS:
michael@0 2395 * Returns NULL if the function succeeds.
michael@0 2396 * Returns an X500Name Error if the function fails in a non-fatal way.
michael@0 2397 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2398 */
michael@0 2399 PKIX_Error *
michael@0 2400 PKIX_PL_X500Name_CreateFromCERTName(
michael@0 2401 SECItem *derName,
michael@0 2402 CERTName *name,
michael@0 2403 PKIX_PL_X500Name **pName,
michael@0 2404 void *plContext);
michael@0 2405
michael@0 2406
michael@0 2407 /*
michael@0 2408 * TYPE: PKIX_PL_X500Name_Match
michael@0 2409 * DESCRIPTION:
michael@0 2410 * Checks whether the X500Name pointed to by "firstX500Name" MATCHES the
michael@0 2411 * X500Name pointed to by "secondX500Name" and stores the boolean result at
michael@0 2412 * "pResult". Two X500Names MATCH if they meet the conditions specified by
michael@0 2413 * RFC 3280 (section 4.1.2.4). Namely:
michael@0 2414 *
michael@0 2415 * "This specification requires only a subset of the name comparison
michael@0 2416 * functionality specified in the X.500 series of specifications.
michael@0 2417 * Conforming implementations are REQUIRED to implement the following
michael@0 2418 * name comparison rules:
michael@0 2419 *
michael@0 2420 * (a) attribute values encoded in different types (e.g., PrintableString
michael@0 2421 * and BMPString) MAY be assumed to represent different strings;
michael@0 2422 *
michael@0 2423 * (b) attribute values in types other than PrintableString are case
michael@0 2424 * sensitive (this permits matching of attribute values as binary objects)
michael@0 2425 *
michael@0 2426 * (c) attribute values in PrintableString are not case sensitive
michael@0 2427 * (e.g., "Marianne Swanson" is the same as "MARIANNE SWANSON"); and
michael@0 2428 *
michael@0 2429 * (d) attribute values in PrintableString are compared after removing
michael@0 2430 * leading and trailing white space and converting internal substrings of
michael@0 2431 * one or more consecutive white space characters to a single space."
michael@0 2432 *
michael@0 2433 * PARAMETERS:
michael@0 2434 * "firstX500Name"
michael@0 2435 * Address of first X500Name to compare. Must be non-NULL.
michael@0 2436 * "secondX500Name"
michael@0 2437 * Address of second X500Name to compare. Must be non-NULL.
michael@0 2438 * "pResult"
michael@0 2439 * Address of Boolean result. Must be non-NULL.
michael@0 2440 * "plContext"
michael@0 2441 * Platform-specific context pointer.
michael@0 2442 * THREAD SAFETY:
michael@0 2443 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2444 * RETURNS:
michael@0 2445 * Returns NULL if the function succeeds.
michael@0 2446 * Returns an X500Name Error if the function fails in a non-fatal way.
michael@0 2447 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2448 */
michael@0 2449 PKIX_Error *
michael@0 2450 PKIX_PL_X500Name_Match(
michael@0 2451 PKIX_PL_X500Name *firstX500Name,
michael@0 2452 PKIX_PL_X500Name *secondX500Name,
michael@0 2453 PKIX_Boolean *pResult,
michael@0 2454 void *plContext);
michael@0 2455
michael@0 2456 /*
michael@0 2457 * FUNCTION: PKIX_PL_Date_Create_UTCTime
michael@0 2458 * DESCRIPTION:
michael@0 2459 * Creates a new Date of type UTCTime using the string representation pointed
michael@0 2460 * to by "stringRep" and stores it at "pDate". The UTCTime restriction means
michael@0 2461 * that the year can only be specified by the least significant two digits
michael@0 2462 * (YY). As such, Only the years 1950-2049 can be represented. If "stringRep"
michael@0 2463 * is NULL, this function creates a new Date representing the current time
michael@0 2464 * and stores it at "pDate". Once created, a Date is immutable.
michael@0 2465 *
michael@0 2466 * If YY is greater than or equal to 50, the year is interpreted as 19YY.
michael@0 2467 * If YY is less than 50, the year is interpreted as 20YY.
michael@0 2468 *
michael@0 2469 * The string representation of the date must be in the following form:
michael@0 2470 * "YYMMDDhhmmssZ" where:
michael@0 2471 *
michael@0 2472 * YY is the least significant two digits of the year
michael@0 2473 * MM is the month (01 to 12)
michael@0 2474 * DD is the day (01 to 31)
michael@0 2475 * hh is the hour (00 to 23)
michael@0 2476 * mm are the minutes (00 to 59)
michael@0 2477 * ss are the seconds (00 to 59)
michael@0 2478 * Z indicates that local time is GMT
michael@0 2479 *
michael@0 2480 * PARAMETERS:
michael@0 2481 * "stringRep"
michael@0 2482 * Address of String representation of Date.
michael@0 2483 * If NULL, current time is used.
michael@0 2484 * "pDate"
michael@0 2485 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2486 * "plContext"
michael@0 2487 * Platform-specific context pointer.
michael@0 2488 * THREAD SAFETY:
michael@0 2489 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2490 * RETURNS:
michael@0 2491 * Returns NULL if the function succeeds.
michael@0 2492 * Returns a Date Error if the function fails in a non-fatal way.
michael@0 2493 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2494 */
michael@0 2495 PKIX_Error *
michael@0 2496 PKIX_PL_Date_Create_UTCTime (
michael@0 2497 PKIX_PL_String *stringRep,
michael@0 2498 PKIX_PL_Date **pDate,
michael@0 2499 void *plContext);
michael@0 2500
michael@0 2501 /*
michael@0 2502 * FUNCTION: PKIX_PL_Date_Create_UTCTime
michael@0 2503 * DESCRIPTION:
michael@0 2504 * Creates a new Date from PRTime data.
michael@0 2505 *
michael@0 2506 * PARAMETERS:
michael@0 2507 * "time"
michael@0 2508 * Represented time in PRTime type.
michael@0 2509 * "pDate"
michael@0 2510 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2511 * "plContext"
michael@0 2512 * Platform-specific context pointer.
michael@0 2513 * THREAD SAFETY:
michael@0 2514 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2515 * RETURNS:
michael@0 2516 * Returns NULL if the function succeeds.
michael@0 2517 * Returns a Date Error if the function fails in a non-fatal way.
michael@0 2518 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2519 */
michael@0 2520 PKIX_Error *
michael@0 2521 PKIX_PL_Date_CreateFromPRTime(
michael@0 2522 PRTime time,
michael@0 2523 PKIX_PL_Date **pDate,
michael@0 2524 void *plContext);
michael@0 2525
michael@0 2526 /*
michael@0 2527 * FUNCTION: PKIX_PL_Date_Create_CurrentOffBySeconds
michael@0 2528 * DESCRIPTION:
michael@0 2529 * Creates a new Date of type UTCTime for current time with seconds off by
michael@0 2530 * "secondsOffset" and returns it at "pDate".
michael@0 2531 *
michael@0 2532 * PARAMETERS:
michael@0 2533 * "secondsOffset"
michael@0 2534 * A PKIX_Int32 indicates the time offset from current. If "secondsOffset"
michael@0 2535 * is negative, the time is in past.
michael@0 2536 * "pDate"
michael@0 2537 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2538 * "plContext"
michael@0 2539 * Platform-specific context pointer.
michael@0 2540 * THREAD SAFETY:
michael@0 2541 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2542 * RETURNS:
michael@0 2543 * Returns NULL if the function succeeds.
michael@0 2544 * Returns a Date Error if the function fails in a non-fatal way.
michael@0 2545 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2546 */
michael@0 2547 PKIX_Error *
michael@0 2548 PKIX_PL_Date_Create_CurrentOffBySeconds(
michael@0 2549 PKIX_Int32 secondsOffset,
michael@0 2550 PKIX_PL_Date **pDate,
michael@0 2551 void *plContext);
michael@0 2552
michael@0 2553 #ifdef BUILD_LIBPKIX_TESTS
michael@0 2554 /*
michael@0 2555 * FUNCTION: PKIX_PL_GeneralName_Create
michael@0 2556 * DESCRIPTION:
michael@0 2557 *
michael@0 2558 * Creates a new GeneralName of type "nameType" using the string
michael@0 2559 * representation pointed to by "stringRep" and stores it at "pGName".
michael@0 2560 * All of the GeneralName type format values specified in pkixt.h are
michael@0 2561 * supported, with the exception of PKIX_OTHER_NAME, PKIX_EDIPARTY_NAME,
michael@0 2562 * PKIX_IP_NAME, and PKIX_X400_ADDRESS. A PKIX_ESCASCII string representation
michael@0 2563 * should be used for all supported nameTypes, with the exception of
michael@0 2564 * registeredID and directoryName. For registeredID, the string representation
michael@0 2565 * should be the same as that used by PKIX_PL_OID_Create. For directoryName,
michael@0 2566 * the string representation should be the same as that used by
michael@0 2567 * PKIX_PL_X500Name_Create. If an unsupported name type is used, an Error is
michael@0 2568 * returned. Once created, a GeneralName is immutable.
michael@0 2569 *
michael@0 2570 * GeneralName ::= CHOICE {
michael@0 2571 * otherName [0] OtherName,
michael@0 2572 * rfc822Name [1] IA5String,
michael@0 2573 * dNSName [2] IA5String,
michael@0 2574 * x400Address [3] ORAddress,
michael@0 2575 * directoryName [4] Name,
michael@0 2576 * ediPartyName [5] EDIPartyName,
michael@0 2577 * uniformResourceIdentifier [6] IA5String,
michael@0 2578 * iPAddress [7] OCTET STRING,
michael@0 2579 * registeredID [8] OBJECT IDENTIFIER }
michael@0 2580 *
michael@0 2581 *
michael@0 2582 * NOTE: This function is allowed to be called only by pkix tests programs.
michael@0 2583 *
michael@0 2584 * PARAMETERS:
michael@0 2585 * "nameType"
michael@0 2586 * Type of GeneralName to be created. This must be one of the GeneralName
michael@0 2587 * type format values specified in pkixt.h
michael@0 2588 * "stringRep"
michael@0 2589 * Address of String representation of GeneralName. Must be non-NULL.
michael@0 2590 * "pGName"
michael@0 2591 * Address where object pointer will be stored. Must be non-NULL.
michael@0 2592 * "plContext"
michael@0 2593 * Platform-specific context pointer.
michael@0 2594 * THREAD SAFETY:
michael@0 2595 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2596 * RETURNS:
michael@0 2597 * Returns NULL if the function succeeds.
michael@0 2598 * Returns a GeneralName Error if the function fails in a non-fatal way.
michael@0 2599 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2600 */
michael@0 2601 PKIX_Error *
michael@0 2602 PKIX_PL_GeneralName_Create (
michael@0 2603 PKIX_UInt32 nameType,
michael@0 2604 PKIX_PL_String *stringRep,
michael@0 2605 PKIX_PL_GeneralName **pGName,
michael@0 2606 void *plContext);
michael@0 2607 #endif /* BUILD_LIBPKIX_TESTS */
michael@0 2608
michael@0 2609 /*
michael@0 2610 * FUNCTION: PKIX_PL_CertNameConstraints_CheckNamesInNameSpace
michael@0 2611 * DESCRIPTION:
michael@0 2612 *
michael@0 2613 * This function checks whether names in "nameList" comply with
michael@0 2614 * "nameConstraints". It stores PKIX_TRUE at "pCheckPass" if the names meet the
michael@0 2615 * requirement of the NameConstraints, PKIX_FALSE otherwise.
michael@0 2616 *
michael@0 2617 * PARAMETERS
michael@0 2618 * "nameList"
michael@0 2619 * List of GeneralNames that are checked for compliance. May be empty
michael@0 2620 * or NULL.
michael@0 2621 * "nameConstraints"
michael@0 2622 * Address of CertNameConstraints that provides lists of permitted
michael@0 2623 * and excluded names. Must be non-NULL.
michael@0 2624 * "pCheckPass"
michael@0 2625 * Address where PKIX_TRUE is returned if the all names in "nameList" are
michael@0 2626 * valid. Must be non-NULL.
michael@0 2627 * "plContext" - Platform-specific context pointer.
michael@0 2628 * THREAD SAFETY:
michael@0 2629 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2630 * RETURNS:
michael@0 2631 * Returns NULL if the function succeeds.
michael@0 2632 * Returns a NameConstraints Error if the function fails in a
michael@0 2633 * non-fatal way.
michael@0 2634 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2635 */
michael@0 2636 PKIX_Error *
michael@0 2637 PKIX_PL_CertNameConstraints_CheckNamesInNameSpace(
michael@0 2638 PKIX_List *nameList, /* List of PKIX_PL_GeneralName */
michael@0 2639 PKIX_PL_CertNameConstraints *nameConstraints,
michael@0 2640 PKIX_Boolean *pCheckPass,
michael@0 2641 void *plContext);
michael@0 2642
michael@0 2643 /*
michael@0 2644 * FUNCTION: PKIX_PL_AIAMgr_Create
michael@0 2645 * DESCRIPTION:
michael@0 2646 *
michael@0 2647 * This function creates an AIAMgr to handle retrieval of Certs and CRLs
michael@0 2648 * from servers given by AIA Certificate extensions. It manages connections
michael@0 2649 * and caches. The manager created is stored at "pAIAMgr".
michael@0 2650 *
michael@0 2651 * PARAMETERS:
michael@0 2652 * "pAIAMgr"
michael@0 2653 * The address at which the result is stored. Must be non-NULL.
michael@0 2654 * THREAD SAFETY:
michael@0 2655 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2656 * RETURNS:
michael@0 2657 * Returns NULL if the function succeeds.
michael@0 2658 * Returns an AIAMgr Error if the function fails in a non-fatal way
michael@0 2659 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2660 */
michael@0 2661 PKIX_Error *
michael@0 2662 PKIX_PL_AIAMgr_Create(
michael@0 2663 PKIX_PL_AIAMgr **pAIAMgr,
michael@0 2664 void *plContext);
michael@0 2665
michael@0 2666 /*
michael@0 2667 * FUNCTION: PKIX_PL_AIAMgr_GetAIACerts
michael@0 2668 * DESCRIPTION:
michael@0 2669 *
michael@0 2670 * This function uses the AIAMgr pointed to by "aiaMgr" to retrieve the Certs
michael@0 2671 * specified by an AIA certificate extension, if any, in the Cert pointed to by
michael@0 2672 * "prevCert", storing the results at "pCerts". If the certificate has no such
michael@0 2673 * extension, this function stores NULL at "pCerts".
michael@0 2674 *
michael@0 2675 * If the request is suspended for non-blocking I/O, a platform-dependent
michael@0 2676 * context is stored at "pNBIOContext" and NULL is stored at "pCerts". This
michael@0 2677 * return is referred to as the WOULDBLOCK state. Note that the caller must
michael@0 2678 * check for a non-NULL value at "pNBIOContext", to distinguish this state from
michael@0 2679 * the "no such extension" return described in the first paragraph. (The
michael@0 2680 * alternative would be to return an empty List, but it seemed wrong to incur
michael@0 2681 * the overhead of creating and destroying an empty List for the most common
michael@0 2682 * situation.)
michael@0 2683 *
michael@0 2684 * After a WOULDBLOCK return, the user may continue the operation by calling
michael@0 2685 * pkix_AIAMgr_GetAIACerts (possibly more than once, if the function again
michael@0 2686 * returns in the WOULDBLOCK state) with the previously-returned non-NULL
michael@0 2687 * value of "pNBIOContext". When results are complete, NULL is stored at
michael@0 2688 * "pNBIOContext", and the results (which may be NULL) are stored at "pCerts".
michael@0 2689 *
michael@0 2690 * PARAMETERS:
michael@0 2691 * "aiaMgr"
michael@0 2692 * The AIAMgr which controls the retrieval of certificates. Must be
michael@0 2693 * non-NULL.
michael@0 2694 * "prevCert"
michael@0 2695 * Address of PKIX_PL_Cert which may provide an AIA or SIA extension. Must
michael@0 2696 * be non-NULL.
michael@0 2697 * "pNBIOContext"
michael@0 2698 * Address at which platform-dependent information is returned if request
michael@0 2699 * is suspended for non-blocking I/O. Must be non-NULL.
michael@0 2700 * "pCerts"
michael@0 2701 * Address at which the returned List is stored. Must be non-NULL.
michael@0 2702 * "plContext"
michael@0 2703 * Platform-specific context pointer.
michael@0 2704 * THREAD SAFETY:
michael@0 2705 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
michael@0 2706 * RETURNS:
michael@0 2707 * Returns NULL if the function succeeds.
michael@0 2708 * Returns an AIAMgr Error if the function fails in a non-fatal way
michael@0 2709 * Returns a Fatal Error if the function fails in an unrecoverable way.
michael@0 2710 */
michael@0 2711 PKIX_Error *
michael@0 2712 PKIX_PL_AIAMgr_GetAIACerts(
michael@0 2713 PKIX_PL_AIAMgr *aiaMgr,
michael@0 2714 PKIX_PL_Cert *prevCert,
michael@0 2715 void **pNBIOContext,
michael@0 2716 PKIX_List **pCerts,
michael@0 2717 void *plContext);
michael@0 2718
michael@0 2719 typedef PKIX_Error *
michael@0 2720 (*PKIX_PL_VerifyCallback)(
michael@0 2721 PKIX_PL_Object *signedObject,
michael@0 2722 PKIX_PL_Cert *signerCert, /* can be unknown */
michael@0 2723 PKIX_PL_Date *producedAt,
michael@0 2724 PKIX_ProcessingParams *procParams,
michael@0 2725 void **pNBIOContext,
michael@0 2726 void **pState,
michael@0 2727 PKIX_BuildResult **pBuildResult,
michael@0 2728 PKIX_VerifyNode **pVerifyTree,
michael@0 2729 void *plContext);
michael@0 2730
michael@0 2731 #ifdef __cplusplus
michael@0 2732 }
michael@0 2733 #endif
michael@0 2734
michael@0 2735 #endif /* _PKIX_PL_PKI_H */

mercurial