1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
14 * The Original Code is the PKIX-C library.
16 * The Initial Developer of the Original Code is
17 * Sun Microsystems, Inc.
18 * Portions created by the Initial Developer are
19 * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
22 * Sun Microsystems, Inc.
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 * This file defines functions associated with the PKIX_CertSelector and the
39 * PKIX_ComCertSelParams types.
43 #ifndef _PKIX_CERTSEL_H
44 #define _PKIX_CERTSEL_H
54 * Please refer to the libpkix Programmer's Guide for detailed information
55 * about how to use the libpkix library. Certain key warnings and notices from
56 * that document are repeated here for emphasis.
58 * All identifiers in this file (and all public identifiers defined in
59 * libpkix) begin with "PKIX_". Private identifiers only intended for use
60 * within the library begin with "pkix_".
62 * A function returns NULL upon success, and a PKIX_Error pointer upon failure.
64 * Unless otherwise noted, for all accessor (gettor) functions that return a
65 * PKIX_PL_Object pointer, callers should assume that this pointer refers to a
66 * shared object. Therefore, the caller should treat this shared object as
67 * read-only and should not modify this shared object. When done using the
68 * shared object, the caller should release the reference to the object by
69 * using the PKIX_PL_Object_DecRef function.
71 * While a function is executing, if its arguments (or anything referred to by
72 * its arguments) are modified, free'd, or destroyed, the function's behavior
79 * PKIX_CertSelectors provide a standard way for the caller to select
80 * certificates based on particular criteria. A CertSelector is typically used
81 * by the caller to specify the constraints they wish to impose on the target
82 * certificate in a chain. (see pkix_params.h) A CertSelector is also often
83 * used to retrieve certificates from a CertStore that match the selector's
84 * criteria. (See pkix_certstore.h) For example, the caller may wish to only
85 * select those certificates that have a particular Subject Distinguished Name
86 * and a particular value for a private certificate extension. The
87 * MatchCallback allows the caller to specify the custom matching logic to be
88 * used by a CertSelector.
90 * By default, the MatchCallback is set to point to the default implementation
91 * provided by libpkix, which understands how to process the most common
92 * parameters. If the default implementation is used, the caller should set
93 * these common parameters using PKIX_CertSelector_SetCommonCertSelectorParams.
94 * Any common parameter that is not set is assumed to be disabled, which means
95 * the default MatchCallback implementation will select all certificates
96 * without regard to that particular disabled parameter. For example, if the
97 * SerialNumber parameter is not set, MatchCallback will not filter out any
98 * certificate based on its serial number. As such, if no parameters are set,
99 * all are disabled and any certificate will match. If a parameter is
100 * disabled, its associated PKIX_ComCertSelParams_Get* function returns a
101 * default value of NULL, or -1 for PKIX_ComCertSelParams_GetBasicConstraints
102 * and PKIX_ComCertSelParams_GetVersion, or 0 for
103 * PKIX_ComCertSelParams_GetKeyUsage.
105 * If a custom implementation is desired, the default implementation can be
106 * overridden by calling PKIX_CertSelector_SetMatchCallback. In this case, the
107 * CertSelector can be initialized with a certSelectorContext, which is where
108 * the caller can specify the desired parameters the caller wishes to match
109 * against. Note that this certSelectorContext must be an Object (although any
110 * object type), allowing it to be reference-counted and allowing it to
111 * provide the standard Object functions (Equals, Hashcode, ToString, Compare,
117 * FUNCTION: PKIX_CertSelector_MatchCallback
120 * This callback function determines whether the specified Cert pointed to by
121 * "cert" matches the criteria of the CertSelector pointed to by "selector",
122 * and stores the result at "pResult". If the Cert matches the CertSelector's
123 * criteria, a value of PKIX_TRUE will be stored at "pResult"; otherwise a
124 * value of PKIX_FALSE will be stored.
128 * Address of CertSelector whose MatchCallback logic and parameters are
129 * to be used. Must be non-NULL.
131 * Address of Cert that is to be matched using "selector".
134 * Address where Boolean value will be stored. Must be non-NULL.
136 * Platform-specific context pointer.
140 * Multiple threads must be able to safely call this function without
141 * worrying about conflicts, even if they're operating on the same object.
143 * Returns NULL if the function succeeds.
144 * Returns a CertSelector Error if the function fails in a non-fatal way.
145 * Returns a Fatal Error if the function fails in an unrecoverable way.
148 (*PKIX_CertSelector_MatchCallback
)(
149 PKIX_CertSelector
*selector
,
151 PKIX_Boolean
*pResult
,
155 * FUNCTION: PKIX_CertSelector_Create
158 * Creates a new CertSelector using the Object pointed to by
159 * "certSelectorContext" (if any) and stores it at "pSelector". As noted
160 * above, by default, the MatchCallback is set to point to the default
161 * implementation provided by libpkix, which understands how to process
162 * ComCertSelParams objects. This is overridden if the MatchCallback pointed
163 * to by "callback" is not NULL, in which case the parameters are specified
164 * using the certSelectorContext.
168 * The MatchCallback function to be used.
169 * "certSelectorContext"
170 * Address of Object representing the CertSelector's context (if any).
172 * Address where object pointer will be stored. Must be non-NULL.
174 * Platform-specific context pointer.
176 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
178 * Returns NULL if the function succeeds.
179 * Returns a CertSelector Error if the function fails in a non-fatal way.
180 * Returns a Fatal Error if the function fails in an unrecoverable way.
183 PKIX_CertSelector_Create(
184 PKIX_CertSelector_MatchCallback callback
,
185 PKIX_PL_Object
*certSelectorContext
,
186 PKIX_CertSelector
**pSelector
,
190 * FUNCTION: PKIX_CertSelector_GetMatchCallback
193 * Retrieves a pointer to "selector's" Match callback function and puts it in
198 * The CertSelector whose Match callback is desired. Must be non-NULL.
200 * Address where Match callback function pointer will be stored.
203 * Platform-specific context pointer.
205 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
207 * Returns NULL if the function succeeds.
208 * Returns a CertSelector Error if the function fails in a non-fatal way.
209 * Returns a Fatal Error if the function fails in an unrecoverable way.
212 PKIX_CertSelector_GetMatchCallback(
213 PKIX_CertSelector
*selector
,
214 PKIX_CertSelector_MatchCallback
*pCallback
,
218 * FUNCTION: PKIX_CertSelector_GetCertSelectorContext
221 * Retrieves a pointer to a PKIX_PL_Object representing the context (if any)
222 * of the CertSelector pointed to by "selector" and stores it at
223 * "pCertSelectorContext".
227 * Address of CertSelector whose context is to be stored.
229 * "pCertSelectorContext"
230 * Address where object pointer will be stored. Must be non-NULL.
232 * Platform-specific context pointer.
234 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
236 * Returns NULL if the function succeeds.
237 * Returns a CertSelector Error if the function fails in a non-fatal way.
238 * Returns a Fatal Error if the function fails in an unrecoverable way.
241 PKIX_CertSelector_GetCertSelectorContext(
242 PKIX_CertSelector
*selector
,
243 PKIX_PL_Object
**pCertSelectorContext
,
247 * FUNCTION: PKIX_CertSelector_GetCommonCertSelectorParams
250 * Retrieves a pointer to the ComCertSelParams object that represent the
251 * common parameters of the CertSelector pointed to by "selector" and stores
252 * it at "pCommonCertSelectorParams". If there are no common parameters
253 * stored with the CertSelector, this function stores NULL at
254 * "pCommonCertSelectorParams".
258 * Address of CertSelector whose ComCertSelParams object is to be stored.
260 * "pCommonCertSelectorParams"
261 * Address where object pointer will be stored. Must be non-NULL.
263 * Platform-specific context pointer.
265 * Conditionally Thread Safe
266 * (see Thread Safety Definitions in Programmer's Guide)
268 * Returns NULL if the function succeeds.
269 * Returns a CertSelector Error if the function fails in a non-fatal way.
270 * Returns a Fatal Error if the function fails in an unrecoverable way.
273 PKIX_CertSelector_GetCommonCertSelectorParams(
274 PKIX_CertSelector
*selector
,
275 PKIX_ComCertSelParams
**pCommonCertSelectorParams
,
279 * FUNCTION: PKIX_CertSelector_SetCommonCertSelectorParams
282 * Sets the common parameters for the CertSelector pointed to by "selector"
283 * using the ComCertSelParams object pointed to by "commonCertSelectorParams".
287 * Address of CertSelector whose common parameters are to be set.
289 * "commonCertSelectorParams"
290 * Address of ComCertSelParams object representing the common parameters.
292 * Platform-specific context pointer.
294 * Not Thread Safe - assumes exclusive access to "selector"
295 * (see Thread Safety Definitions in Programmer's Guide)
297 * Returns NULL if the function succeeds.
298 * Returns a CertSelector Error if the function fails in a non-fatal way.
299 * Returns a Fatal Error if the function fails in an unrecoverable way.
302 PKIX_CertSelector_SetCommonCertSelectorParams(
303 PKIX_CertSelector
*selector
,
304 PKIX_ComCertSelParams
*commonCertSelectorParams
,
307 /* PKIX_ComCertSelParams
309 * PKIX_ComCertSelParams objects are X.509 parameters commonly used with
310 * CertSelectors, especially when enforcing constraints on a target
311 * certificate or determining which certificates to retrieve from a CertStore.
312 * ComCertSelParams objects are typically used with those CertSelectors that
313 * use the default implementation of MatchCallback, which understands how to
314 * process ComCertSelParams objects.
318 * FUNCTION: PKIX_ComCertSelParams_Create
321 * Creates a new ComCertSelParams object and stores it at "pParams".
325 * Address where object pointer will be stored. Must be non-NULL.
327 * Platform-specific context pointer.
329 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
331 * Returns NULL if the function succeeds.
332 * Returns a CertSelector Error if the function fails in a non-fatal way.
333 * Returns a Fatal Error if the function fails in an unrecoverable way.
336 PKIX_ComCertSelParams_Create(
337 PKIX_ComCertSelParams
**pParams
,
341 * FUNCTION: PKIX_ComCertSelParams_GetSubjAltNames
344 * Retrieves a pointer to the List of GeneralNames (if any) representing the
345 * subject alternative names criterion that is set in the ComCertSelParams
346 * object pointed to by "params" and stores it at "pNames". In order to match
347 * against this criterion, a certificate must contain all or at least one of
348 * the criterion's subject alternative names (depending on the result of
349 * PKIX_ComCertSelParams_GetMatchAllSubjAltNames). The default behavior
350 * requires a certificate to contain all of the criterion's subject
351 * alternative names in order to match.
353 * If "params" does not have this criterion set, this function stores NULL at
354 * "pNames", in which case all certificates are considered to match this
357 * Note that the List returned by this function is immutable.
361 * Address of ComCertSelParams object whose subject alternative names
362 * criterion (if any) is to be stored. Must be non-NULL.
364 * Address where object pointer will be stored. Must be non-NULL.
366 * Platform-specific context pointer.
368 * Conditionally Thread Safe
369 * (see Thread Safety Definitions in Programmer's Guide)
371 * Returns NULL if the function succeeds.
372 * Returns a CertSelector Error if the function fails in a non-fatal way.
373 * Returns a Fatal Error if the function fails in an unrecoverable way.
376 PKIX_ComCertSelParams_GetSubjAltNames(
377 PKIX_ComCertSelParams
*params
,
378 PKIX_List
**pNames
, /* list of PKIX_PL_GeneralName */
382 * FUNCTION: PKIX_ComCertSelParams_SetSubjAltNames
385 * Sets the subject alternative names criterion of the ComCertSelParams object
386 * pointed to by "params" using a List of GeneralNames pointed to by "names".
387 * In order to match against this criterion, a certificate must contain all or
388 * at least one of the criterion's subject alternative names (depending on the
389 * result of PKIX_ComCertSelParams_GetMatchAllSubjAltNames). The default
390 * behavior requires a certificate to contain all of the criterion's subject
391 * alternative names in order to match.
393 * If "names" is NULL, all certificates are considered to match this
398 * Address of ComCertSelParams object whose subject alternative
399 * names criterion is to be set. Must be non-NULL.
401 * Address of List of GeneralNames used to set the criterion
402 * (or NULL to disable the criterion).
404 * Platform-specific context pointer.
406 * Not Thread Safe - assumes exclusive access to "params"
407 * (see Thread Safety Definitions in Programmer's Guide)
409 * Returns NULL if the function succeeds.
410 * Returns a CertSelector Error if the function fails in a non-fatal way.
411 * Returns a Fatal Error if the function fails in an unrecoverable way.
414 PKIX_ComCertSelParams_SetSubjAltNames(
415 PKIX_ComCertSelParams
*params
,
416 PKIX_List
*names
, /* list of PKIX_PL_GeneralName */
420 * FUNCTION: PKIX_ComCertSelParams_AddSubjAltName
423 * Adds to the subject alternative names criterion of the ComCertSelParams
424 * object pointed to by "params" using the GeneralName pointed to by "name".
425 * In order to match against this criterion, a certificate must contain all
426 * or at least one of the criterion's subject alternative names (depending on
427 * the result of PKIX_ComCertSelParams_GetMatchAllSubjAltNames). The default
428 * behavior requires a certificate to contain all of the criterion's subject
429 * alternative names in order to match.
433 * Address of ComCertSelParams object whose subject alternative names
434 * criterion is to be added to. Must be non-NULL.
436 * Address of GeneralName to be added.
438 * Platform-specific context pointer.
440 * Not Thread Safe - assumes exclusive access to "params"
441 * (see Thread Safety Definitions in Programmer's Guide)
443 * Returns NULL if the function succeeds.
444 * Returns a CertSelector Error if the function fails in a non-fatal way.
445 * Returns a Fatal Error if the function fails in an unrecoverable way.
448 PKIX_ComCertSelParams_AddSubjAltName(
449 PKIX_ComCertSelParams
*params
,
450 PKIX_PL_GeneralName
*name
,
454 * FUNCTION: PKIX_ComCertSelParams_GetPathToNames
457 * Retrieves a pointer to the List of GeneralNames (if any) representing the
458 * path to names criterion that is set in the ComCertSelParams object pointed
459 * to by "params" and stores it at "pNames". In order to match against this
460 * criterion, a certificate must not include name constraints that would
461 * prohibit building a path to the criterion's specified names.
463 * If "params" does not have this criterion set, this function stores NULL at
464 * "pNames", in which case all certificates are considered to match this
467 * Note that the List returned by this function is immutable.
471 * Address of ComCertSelParams object whose path to names criterion
472 * (if any) is to be stored. Must be non-NULL.
474 * Address where object pointer will be stored. Must be non-NULL.
476 * Platform-specific context pointer.
478 * Conditionally Thread Safe
479 * (see Thread Safety Definitions in Programmer's Guide)
481 * Returns NULL if the function succeeds.
482 * Returns a CertSelector Error if the function fails in a non-fatal way.
483 * Returns a Fatal Error if the function fails in an unrecoverable way.
486 PKIX_ComCertSelParams_GetPathToNames(
487 PKIX_ComCertSelParams
*params
,
488 PKIX_List
**pNames
, /* list of PKIX_PL_GeneralName */
492 * FUNCTION: PKIX_ComCertSelParams_SetPathToNames
495 * Sets the path to names criterion of the ComCertSelParams object pointed to
496 * by "params" using a List of GeneralNames pointed to by "names". In order to
497 * match against this criterion, a certificate must not include name
498 * constraints that would prohibit building a path to the criterion's
501 * If "names" is NULL, all certificates are considered to match this
506 * Address of ComCertSelParams object whose path to names criterion
507 * is to be set. Must be non-NULL.
509 * Address of List of GeneralNames used to set the criterion
510 * (or NULL to disable the criterion).
512 * Platform-specific context pointer.
514 * Not Thread Safe - assumes exclusive access to "params"
515 * (see Thread Safety Definitions in Programmer's Guide)
517 * Returns NULL if the function succeeds.
518 * Returns a CertSelector Error if the function fails in a non-fatal way.
519 * Returns a Fatal Error if the function fails in an unrecoverable way.
522 PKIX_ComCertSelParams_SetPathToNames(
523 PKIX_ComCertSelParams
*params
,
524 PKIX_List
*names
, /* list of PKIX_PL_GeneralName */
528 * FUNCTION: PKIX_ComCertSelParams_AddPathToName
531 * Adds to the path to names criterion of the ComCertSelParams object pointed
532 * to by "params" using the GeneralName pointed to by "pathToName". In order
533 * to match against this criterion, a certificate must not include name
534 * constraints that would prohibit building a path to the criterion's
539 * Address of ComCertSelParams object whose path to names criterion is to
540 * be added to. Must be non-NULL.
542 * Address of GeneralName to be added.
544 * Platform-specific context pointer.
546 * Not Thread Safe - assumes exclusive access to "params"
547 * (see Thread Safety Definitions in Programmer's Guide)
549 * Returns NULL if the function succeeds.
550 * Returns a CertSelector Error if the function fails in a non-fatal way.
551 * Returns a Fatal Error if the function fails in an unrecoverable way.
554 PKIX_ComCertSelParams_AddPathToName(
555 PKIX_ComCertSelParams
*params
,
556 PKIX_PL_GeneralName
*pathToName
,
560 * FUNCTION: PKIX_ComCertSelParams_GetAuthorityKeyIdentifier
563 * Retrieves a pointer to the ByteArray (if any) representing the authority
564 * key identifier criterion that is set in the ComCertSelParams object
565 * pointed to by "params" and stores it at "pAuthKeyId". In order to match
566 * against this criterion, a certificate must contain an
567 * AuthorityKeyIdentifier extension whose value matches the criterion's
568 * authority key identifier value.
570 * If "params" does not have this criterion set, this function stores NULL at
571 * "pAuthKeyId", in which case all certificates are considered to match this
576 * Address of ComCertSelParams object whose authority key identifier
577 * criterion (if any) is to be stored. Must be non-NULL.
579 * Address where object pointer will be stored. Must be non-NULL.
581 * Platform-specific context pointer.
583 * Conditionally Thread Safe
584 * (see Thread Safety Definitions in Programmer's Guide)
586 * Returns NULL if the function succeeds.
587 * Returns a CertSelector Error if the function fails in a non-fatal way.
588 * Returns a Fatal Error if the function fails in an unrecoverable way.
591 PKIX_ComCertSelParams_GetAuthorityKeyIdentifier(
592 PKIX_ComCertSelParams
*params
,
593 PKIX_PL_ByteArray
**pAuthKeyId
,
597 * FUNCTION: PKIX_ComCertSelParams_SetAuthorityKeyIdentifier
600 * Sets the authority key identifier criterion of the ComCertSelParams object
601 * pointed to by "params" to the ByteArray pointed to by "authKeyId". In
602 * order to match against this criterion, a certificate must contain an
603 * AuthorityKeyIdentifier extension whose value matches the criterion's
604 * authority key identifier value.
608 * Address of ComCertSelParams object whose authority key identifier
609 * criterion is to be set. Must be non-NULL.
611 * Address of ByteArray used to set the criterion
613 * Platform-specific context pointer.
615 * Not Thread Safe - assumes exclusive access to "params"
616 * (see Thread Safety Definitions in Programmer's Guide)
618 * Returns NULL if the function succeeds.
619 * Returns a CertSelector Error if the function fails in a non-fatal way.
620 * Returns a Fatal Error if the function fails in an unrecoverable way.
623 PKIX_ComCertSelParams_SetAuthorityKeyIdentifier(
624 PKIX_ComCertSelParams
*params
,
625 PKIX_PL_ByteArray
*authKeyId
,
629 * FUNCTION: PKIX_ComCertSelParams_GetSubjKeyIdentifier
632 * Retrieves a pointer to the ByteArray (if any) representing the subject key
633 * identifier criterion that is set in the ComCertSelParams object pointed to
634 * by "params" and stores it at "pSubjKeyId". In order to match against this
635 * criterion, a certificate must contain a SubjectKeyIdentifier extension
636 * whose value matches the criterion's subject key identifier value.
638 * If "params" does not have this criterion set, this function stores NULL at
639 * "pSubjKeyId", in which case all certificates are considered to match this
644 * Address of ComCertSelParams object whose subject key identifier
645 * criterion (if any) is to be stored. Must be non-NULL.
647 * Address where object pointer will be stored. Must be non-NULL.
649 * Platform-specific context pointer.
651 * Conditionally Thread Safe
652 * (see Thread Safety Definitions in Programmer's Guide)
654 * Returns NULL if the function succeeds.
655 * Returns a CertSelector Error if the function fails in a non-fatal way.
656 * Returns a Fatal Error if the function fails in an unrecoverable way.
659 PKIX_ComCertSelParams_GetSubjKeyIdentifier(
660 PKIX_ComCertSelParams
*params
,
661 PKIX_PL_ByteArray
**pSubjKeyId
,
665 * FUNCTION: PKIX_ComCertSelParams_SetSubjKeyIdentifier
668 * Sets the subject key identifier criterion of the ComCertSelParams object
669 * pointed to by "params" using a ByteArray pointed to by "subjKeyId". In
670 * order to match against this criterion, a certificate must contain an
671 * SubjectKeyIdentifier extension whose value matches the criterion's subject
672 * key identifier value.
676 * Address of ComCertSelParams object whose subject key identifier
677 * criterion is to be set. Must be non-NULL.
679 * Address of ByteArray used to set the criterion
681 * Platform-specific context pointer.
683 * Not Thread Safe - assumes exclusive access to "params"
684 * (see Thread Safety Definitions in Programmer's Guide)
686 * Returns NULL if the function succeeds.
687 * Returns a CertSelector Error if the function fails in a non-fatal way.
688 * Returns a Fatal Error if the function fails in an unrecoverable way.
691 PKIX_ComCertSelParams_SetSubjKeyIdentifier(
692 PKIX_ComCertSelParams
*params
,
693 PKIX_PL_ByteArray
*subKeyId
,
697 * FUNCTION: PKIX_ComCertSelParams_GetSubjPubKey
700 * Retrieves a pointer to the PublicKey (if any) representing the subject
701 * public key criterion that is set in the ComCertSelParams object pointed to
702 * by "params" and stores it at "pPubKey". In order to match against this
703 * criterion, a certificate must contain a SubjectPublicKey that matches the
704 * criterion's public key.
706 * If "params" does not have this criterion set, this function stores NULL at
707 * "pPubKey", in which case all certificates are considered to match this
712 * Address of ComCertSelParams object whose subject public key criterion
713 * (if any) is to be stored. Must be non-NULL.
715 * Address where object pointer will be stored. Must be non-NULL.
717 * Platform-specific context pointer.
719 * Conditionally Thread Safe
720 * (see Thread Safety Definitions in Programmer's Guide)
722 * Returns NULL if the function succeeds.
723 * Returns a CertSelector Error if the function fails in a non-fatal way.
724 * Returns a Fatal Error if the function fails in an unrecoverable way.
727 PKIX_ComCertSelParams_GetSubjPubKey(
728 PKIX_ComCertSelParams
*params
,
729 PKIX_PL_PublicKey
**pPubKey
,
733 * FUNCTION: PKIX_ComCertSelParams_SetSubjPubKey
736 * Sets the subject public key criterion of the ComCertSelParams object
737 * pointed to by "params" using a PublicKey pointed to by "pubKey". In order
738 * to match against this criterion, a certificate must contain a
739 * SubjectPublicKey that matches the criterion's public key.
743 * Address of ComCertSelParams object whose subject public key
744 * criterion is to be set. Must be non-NULL.
746 * Address of PublicKey used to set the criterion
748 * Platform-specific context pointer.
750 * Not Thread Safe - assumes exclusive access to "params"
751 * (see Thread Safety Definitions in Programmer's Guide)
753 * Returns NULL if the function succeeds.
754 * Returns a CertSelector Error if the function fails in a non-fatal way.
755 * Returns a Fatal Error if the function fails in an unrecoverable way.
758 PKIX_ComCertSelParams_SetSubjPubKey(
759 PKIX_ComCertSelParams
*params
,
760 PKIX_PL_PublicKey
*pubKey
,
764 * FUNCTION: PKIX_ComCertSelParams_GetSubjPKAlgId
767 * Retrieves a pointer to the OID (if any) representing the subject public key
768 * algorithm identifier criterion that is set in the ComCertSelParams object
769 * pointed to by "params" and stores it at "pPubKey". In order to match
770 * against this criterion, a certificate must contain a SubjectPublicKey with
771 * an algorithm that matches the criterion's algorithm.
773 * If "params" does not have this criterion set, this function stores NULL at
774 * "pAlgId", in which case all certificates are considered to match this
779 * Address of ComCertSelParams object whose subject public key algorithm
780 * identifier (if any) is to be stored. Must be non-NULL.
782 * Address where object pointer will be stored. Must be non-NULL.
784 * Platform-specific context pointer.
786 * Conditionally Thread Safe
787 * (see Thread Safety Definitions in Programmer's Guide)
789 * Returns NULL if the function succeeds.
790 * Returns a CertSelector Error if the function fails in a non-fatal way.
791 * Returns a Fatal Error if the function fails in an unrecoverable way.
794 PKIX_ComCertSelParams_GetSubjPKAlgId(
795 PKIX_ComCertSelParams
*params
,
796 PKIX_PL_OID
**pAlgId
,
800 * FUNCTION: PKIX_ComCertSelParams_SetSubjPKAlgId
803 * Sets the subject public key algorithm identifier criterion of the
804 * ComCertSelParams object pointed to by "params" using an OID pointed to by
805 * "algId". In order to match against this criterion, a certificate must
806 * contain a SubjectPublicKey with an algorithm that matches the criterion's
809 * If "algId" is NULL, all certificates are considered to match this
814 * Address of ComCertSelParams object whose subject public key
815 * algorithm identifier criterion is to be set. Must be non-NULL.
817 * Address of OID used to set criterion
818 * (or NULL to disable the criterion).
820 * Platform-specific context pointer.
822 * Not Thread Safe - assumes exclusive access to "params"
823 * (see Thread Safety Definitions in Programmer's Guide)
825 * Returns NULL if the function succeeds.
826 * Returns a CertSelector Error if the function fails in a non-fatal way.
827 * Returns a Fatal Error if the function fails in an unrecoverable way.
830 PKIX_ComCertSelParams_SetSubjPKAlgId(
831 PKIX_ComCertSelParams
*params
,
836 * FUNCTION: PKIX_ComCertSelParams_GetBasicConstraints
839 * Retrieves a pointer to the minimum path length (if any) representing the
840 * basic constraints criterion that is set in the ComCertSelParams object
841 * pointed to by "params" and stores it at "pMinPathLength". In order to
842 * match against this criterion, there are several possibilities.
844 * 1) If the criterion's minimum path length is greater than or equal to zero,
845 * a certificate must include a BasicConstraints extension with a pathLen of
846 * at least this value.
848 * 2) If the criterion's minimum path length is -2, a certificate must be an
849 * end-entity certificate.
851 * 3) If the criterion's minimum path length is -1, no basic constraints check
852 * is done and all certificates are considered to match this criterion.
854 * The semantics of other values of the criterion's minimum path length are
855 * undefined but may be defined in future versions of the API.
857 * If "params" does not have this criterion set, this function stores -1 at
858 * "pMinPathLength", in which case all certificates are considered to match
863 * Address of ComCertSelParams object whose basic constraints criterion
864 * (if any) is to be stored. Must be non-NULL.
866 * Address where PKIX_Int32 will be stored. Must be non-NULL.
868 * Platform-specific context pointer.
870 * Conditionally Thread Safe
871 * (see Thread Safety Definitions in Programmer's Guide)
873 * Returns NULL if the function succeeds.
874 * Returns a CertSelector Error if the function fails in a non-fatal way.
875 * Returns a Fatal Error if the function fails in an unrecoverable way.
878 PKIX_ComCertSelParams_GetBasicConstraints(
879 PKIX_ComCertSelParams
*params
,
880 PKIX_Int32
*pMinPathLength
,
884 * FUNCTION: PKIX_ComCertSelParams_SetBasicConstraints
887 * Sets the basic constraints criterion of the ComCertSelParams object
888 * pointed to by "params" using the integer value of "minPathLength". In
889 * order to match against this criterion, there are several possibilities.
891 * 1) If the criterion's minimum path length is greater than or equal to zero,
892 * a certificate must include a BasicConstraints extension with a pathLen of
893 * at least this value.
895 * 2) If the criterion's minimum path length is -2, a certificate must be an
896 * end-entity certificate.
898 * 3) If the criterion's minimum path length is -1, no basic constraints check
899 * is done and all certificates are considered to match this criterion.
901 * The semantics of other values of the criterion's minimum path length are
902 * undefined but may be defined in future versions of the API.
906 * Address of ComCertSelParams object whose basic constraints
907 * criterion is to be set. Must be non-NULL.
909 * Value of PKIX_Int32 used to set the criterion
910 * (or -1 to disable the criterion).
912 * Platform-specific context pointer.
914 * Not Thread Safe - assumes exclusive access to "params"
915 * (see Thread Safety Definitions in Programmer's Guide)
917 * Returns NULL if the function succeeds.
918 * Returns a CertSelector Error if the function fails in a non-fatal way.
919 * Returns a Fatal Error if the function fails in an unrecoverable way.
922 PKIX_ComCertSelParams_SetBasicConstraints(
923 PKIX_ComCertSelParams
*params
,
924 PKIX_Int32 minPathLength
,
928 * FUNCTION: PKIX_ComCertSelParams_GetCertificate
931 * Retrieves a pointer to the Cert (if any) representing the certificate
932 * criterion that is set in the ComCertSelParams object pointed to by
933 * "params" and stores it at "pCert". In order to match against this
934 * criterion, a certificate must be equal to the criterion's certificate. If
935 * this criterion is specified, it is usually not necessary to specify any
936 * other criteria, since this criterion requires an exact certificate match.
938 * If "params" does not have this criterion set, this function stores NULL at
939 * "pCert", in which case all certificates are considered to match this
944 * Address of ComCertSelParams object whose certificate criterion
945 * (if any) is to be stored. Must be non-NULL.
947 * Address where object pointer will be stored. Must be non-NULL.
949 * Platform-specific context pointer.
951 * Conditionally Thread Safe
952 * (see Thread Safety Definitions in Programmer's Guide)
954 * Returns NULL if the function succeeds.
955 * Returns a CertSelector Error if the function fails in a non-fatal way.
956 * Returns a Fatal Error if the function fails in an unrecoverable way.
959 PKIX_ComCertSelParams_GetCertificate(
960 PKIX_ComCertSelParams
*params
,
961 PKIX_PL_Cert
**pCert
,
965 * FUNCTION: PKIX_ComCertSelParams_SetCertificate
968 * Sets the certificate criterion of the ComCertSelParams object pointed to by
969 * "params" using a Cert pointed to by "cert". In order to match against this
970 * criterion, a certificate must be equal to the criterion's certificate.
971 * If this criterion is specified, it is usually not necessary to specify
972 * any other criteria, since this criterion requires an exact certificate
975 * If "cert" is NULL, all certificates are considered to match this criterion.
979 * Address of ComCertSelParams object whose certificate criterion is to be
980 * set. Must be non-NULL.
982 * Address of Cert used to set the criterion
983 * (or NULL to disable the criterion).
985 * Platform-specific context pointer.
987 * Not Thread Safe - assumes exclusive access to "params"
988 * (see Thread Safety Definitions in Programmer's Guide)
990 * Returns NULL if the function succeeds.
991 * Returns a CertSelector Error if the function fails in a non-fatal way.
992 * Returns a Fatal Error if the function fails in an unrecoverable way.
995 PKIX_ComCertSelParams_SetCertificate(
996 PKIX_ComCertSelParams
*params
,
1001 * FUNCTION: PKIX_ComCertSelParams_GetCertificateValid
1004 * Retrieves a pointer to the Date (if any) representing the certificate
1005 * validity criterion that is set in the ComCertSelParams object pointed to by
1006 * "params" and stores it at "pDate". In order to match against this
1007 * criterion, a certificate's validity period must include the criterion's
1010 * If "params" does not have this criterion set, this function stores NULL at
1011 * "pDate", in which case all certificates are considered to match this
1016 * Address of ComCertSelParams object whose certificate validity criterion
1017 * (if any) is to be stored. Must be non-NULL.
1019 * Address where object pointer will be stored. Must be non-NULL.
1021 * Platform-specific context pointer.
1023 * Conditionally Thread Safe
1024 * (see Thread Safety Definitions in Programmer's Guide)
1026 * Returns NULL if the function succeeds.
1027 * Returns a CertSelector Error if the function fails in a non-fatal way.
1028 * Returns a Fatal Error if the function fails in an unrecoverable way.
1031 PKIX_ComCertSelParams_GetCertificateValid(
1032 PKIX_ComCertSelParams
*params
,
1033 PKIX_PL_Date
**pDate
,
1037 * FUNCTION: PKIX_ComCertSelParams_SetCertificateValid
1040 * Sets the certificate validity criterion of the ComCertSelParams object
1041 * pointed to by "params" using a Date pointed to by "date". In order to
1042 * match against this criterion, a certificate's validity period must include
1043 * the criterion's Date.
1045 * If "date" is NULL, all certificates are considered to match this criterion.
1049 * Address of ComCertSelParams object whose certificate validity criterion
1050 * is to be set. Must be non-NULL.
1052 * Address of Date used to set the criterion
1053 * (or NULL to disable the criterion).
1055 * Platform-specific context pointer.
1057 * Not Thread Safe - assumes exclusive access to "params"
1058 * (see Thread Safety Definitions in Programmer's Guide)
1060 * Returns NULL if the function succeeds.
1061 * Returns a CertSelector Error if the function fails in a non-fatal way.
1062 * Returns a Fatal Error if the function fails in an unrecoverable way.
1065 PKIX_ComCertSelParams_SetCertificateValid(
1066 PKIX_ComCertSelParams
*params
,
1071 * FUNCTION: PKIX_ComCertSelParams_GetSerialNumber
1074 * Retrieves a pointer to the BigInt (if any) representing the serial number
1075 * criterion that is set in the ComCertSelParams object pointed to by
1076 * "params" and stores it at "pSerialNumber". In order to match against this
1077 * criterion, a certificate must have a serial number equal to the
1078 * criterion's serial number.
1080 * If "params" does not have this criterion set, this function stores NULL at
1081 * "pSerialNumber", in which case all certificates are considered to match
1086 * Address of ComCertSelParams object whose serial number criterion
1087 * (if any) is to be stored. Must be non-NULL.
1089 * Address where object pointer will be stored. Must be non-NULL.
1091 * Platform-specific context pointer.
1093 * Conditionally Thread Safe
1094 * (see Thread Safety Definitions in Programmer's Guide)
1096 * Returns NULL if the function succeeds.
1097 * Returns a CertSelector Error if the function fails in a non-fatal way.
1098 * Returns a Fatal Error if the function fails in an unrecoverable way.
1101 PKIX_ComCertSelParams_GetSerialNumber(
1102 PKIX_ComCertSelParams
*params
,
1103 PKIX_PL_BigInt
**pSerialNumber
,
1107 * FUNCTION: PKIX_ComCertSelParams_SetSerialNumber
1110 * Sets the serial number criterion of the ComCertSelParams object pointed to
1111 * by "params" using a BigInt pointed to by "serialNumber". In order to match
1112 * against this criterion, a certificate must have a serial number equal to
1113 * the criterion's serial number.
1115 * If "serialNumber" is NULL, all certificates are considered to match this
1120 * Address of ComCertSelParams object whose serial number criterion is to
1121 * be set. Must be non-NULL.
1123 * Address of BigInt used to set the criterion
1124 * (or NULL to disable the criterion).
1126 * Platform-specific context pointer.
1128 * Not Thread Safe - assumes exclusive access to "params"
1129 * (see Thread Safety Definitions in Programmer's Guide)
1131 * Returns NULL if the function succeeds.
1132 * Returns a CertSelector Error if the function fails in a non-fatal way.
1133 * Returns a Fatal Error if the function fails in an unrecoverable way.
1136 PKIX_ComCertSelParams_SetSerialNumber(
1137 PKIX_ComCertSelParams
*params
,
1138 PKIX_PL_BigInt
*serialNumber
,
1142 * FUNCTION: PKIX_ComCertSelParams_GetVersion
1145 * Retrieves a PKIX_UInt32 (if any) representing the version criterion that is
1146 * set in the ComCertSelParams object pointed to by "params" and stores it at
1147 * "pVersion". In order to match against this criterion, a certificate's
1148 * version must be equal to the criterion's version.
1150 * The version number will either be 0, 1, or 2 (corresponding to
1151 * v1, v2, or v3, respectively).
1153 * If "params" does not have this criterion set, this function stores
1154 * 0xFFFFFFFF at "pVersion", in which case all certificates are considered
1155 * to match this criterion.
1159 * Address of ComCertSelParams object whose version criterion (if any) is
1160 * to be stored. Must be non-NULL.
1162 * Address where PKIX_Int32 will be stored. Must be non-NULL.
1164 * Platform-specific context pointer.
1166 * Conditionally Thread Safe
1167 * (see Thread Safety Definitions in Programmer's Guide)
1169 * Returns NULL if the function succeeds.
1170 * Returns a CertSelector Error if the function fails in a non-fatal way.
1171 * Returns a Fatal Error if the function fails in an unrecoverable way.
1174 PKIX_ComCertSelParams_GetVersion(
1175 PKIX_ComCertSelParams
*params
,
1176 PKIX_UInt32
*pVersion
,
1180 * FUNCTION: PKIX_ComCertSelParams_SetVersion
1183 * Sets the version criterion of the ComCertSelParams object pointed to by
1184 * "params" using the integer value of "version". In order to match against
1185 * this criterion, a certificate's version must be equal to the criterion's
1186 * version. If the criterion's version is -1, no version check is done and
1187 * all certificates are considered to match this criterion.
1191 * Address of ComCertSelParams object whose version criterion is to be
1192 * set. Must be non-NULL.
1194 * Value of PKIX_Int32 used to set the criterion
1195 * (or -1 to disable the criterion).
1197 * Platform-specific context pointer.
1199 * Not Thread Safe - assumes exclusive access to "params"
1200 * (see Thread Safety Definitions in Programmer's Guide)
1202 * Returns NULL if the function succeeds.
1203 * Returns a CertSelector Error if the function fails in a non-fatal way.
1204 * Returns a Fatal Error if the function fails in an unrecoverable way.
1207 PKIX_ComCertSelParams_SetVersion(
1208 PKIX_ComCertSelParams
*params
,
1214 * FUNCTION: PKIX_ComCertSelParams_GetKeyUsage
1217 * Retrieves a PKIX_UInt32 (if any) representing the key usage criterion that
1218 * is set in the ComCertSelParams object pointed to by "params" and stores it
1219 * at "pKeyUsage". In order to match against this criterion, a certificate
1220 * must allow the criterion's key usage values. Note that a certificate that
1221 * has no KeyUsage extension implicity allows all key usages. Note also that
1222 * this functions supports a maximum of 32 key usage bits.
1224 * If "params" does not have this criterion set, this function stores zero at
1225 * "pKeyUsage", in which case all certificates are considered to match this
1230 * Address of ComCertSelParams object whose key usage criterion (if any)
1231 * is to be stored. Must be non-NULL.
1233 * Address where PKIX_UInt32 will be stored. Must not be non-NULL.
1235 * Platform-specific context pointer.
1237 * Conditionally Thread Safe
1238 * (see Thread Safety Definitions in Programmer's Guide)
1240 * Returns NULL if the function succeeds.
1241 * Returns a CertSelector Error if the function fails in a non-fatal way.
1242 * Returns a Fatal Error if the function fails in an unrecoverable way.
1245 PKIX_ComCertSelParams_GetKeyUsage(
1246 PKIX_ComCertSelParams
*params
,
1247 PKIX_UInt32
*pKeyUsage
,
1251 * FUNCTION: PKIX_ComCertSelParams_SetKeyUsage
1254 * Sets the key usage criterion of the ComCertSelParams object pointed to by
1255 * "params" using the integer value of "keyUsage". In order to match against
1256 * this criterion, a certificate must allow the criterion's key usage values.
1257 * Note that a certificate that has no KeyUsage extension implicity allows
1258 * all key usages. Note also that this functions supports a maximum of 32 key
1261 * If the criterion's key usage value is zero, no key usage check is done and
1262 * all certificates are considered to match this criterion.
1266 * Address of ComCertSelParams object whose key usage criterion is to be
1267 * set. Must be non-NULL.
1269 * Value of PKIX_Int32 used to set the criterion
1270 * (or zero to disable the criterion).
1272 * Platform-specific context pointer.
1274 * Not Thread Safe - assumes exclusive access to "params"
1275 * (see Thread Safety Definitions in Programmer's Guide)
1277 * Returns NULL if the function succeeds.
1278 * Returns a CertSelector Error if the function fails in a non-fatal way.
1279 * Returns a Fatal Error if the function fails in an unrecoverable way.
1282 PKIX_ComCertSelParams_SetKeyUsage(
1283 PKIX_ComCertSelParams
*params
,
1284 PKIX_UInt32 keyUsage
,
1288 * FUNCTION: PKIX_ComCertSelParams_GetExtendedKeyUsage
1291 * Retrieves a pointer to the List of OIDs (if any) representing the extended
1292 * key usage criterion that is set in the ComCertSelParams object pointed to
1293 * by "params" and stores it at "pExtKeyUsage". In order to match against this
1294 * criterion, a certificate's ExtendedKeyUsage extension must allow the
1295 * criterion's extended key usages. Note that a certificate that has no
1296 * ExtendedKeyUsage extension implicity allows all key purposes.
1298 * If "params" does not have this criterion set, this function stores NULL at
1299 * "pExtKeyUsage", in which case all certificates are considered to match
1302 * Note that the List returned by this function is immutable.
1306 * Address of ComCertSelParams object whose extended key usage criterion
1307 * (if any) is to be stored. Must be non-NULL.
1309 * Address where object pointer will be stored. Must be non-NULL.
1311 * Platform-specific context pointer.
1313 * Conditionally Thread Safe
1314 * (see Thread Safety Definitions in Programmer's Guide)
1316 * Returns NULL if the function succeeds.
1317 * Returns a CertSelector Error if the function fails in a non-fatal way.
1318 * Returns a Fatal Error if the function fails in an unrecoverable way.
1321 PKIX_ComCertSelParams_GetExtendedKeyUsage(
1322 PKIX_ComCertSelParams
*params
,
1323 PKIX_List
**pExtKeyUsage
, /* list of PKIX_PL_OID */
1327 * FUNCTION: PKIX_ComCertSelParams_SetExtendedKeyUsage
1330 * Sets the extended key usage criterion of the ComCertSelParams object
1331 * pointed to by "params" using a List of OIDs pointed to by "extKeyUsage".
1332 * In order to match against this criterion, a certificate's ExtendedKeyUsage
1333 * extension must allow the criterion's extended key usages. Note that a
1334 * certificate that has no ExtendedKeyUsage extension implicitly allows all
1337 * If "extKeyUsage" is NULL, all certificates are considered to match this
1342 * Address of ComCertSelParams object whose extended key usage criterion
1343 * is to be set. Must be non-NULL.
1345 * Address of List of OIDs used to set the criterion
1346 * (or NULL to disable the criterion).
1348 * Platform-specific context pointer.
1350 * Not Thread Safe - assumes exclusive access to "params"
1351 * (see Thread Safety Definitions in Programmer's Guide)
1353 * Returns NULL if the function succeeds.
1354 * Returns a CertSelector Error if the function fails in a non-fatal way.
1355 * Returns a Fatal Error if the function fails in an unrecoverable way.
1358 PKIX_ComCertSelParams_SetExtendedKeyUsage(
1359 PKIX_ComCertSelParams
*params
,
1360 PKIX_List
*extKeyUsage
, /* list of PKIX_PL_OID */
1364 * FUNCTION: PKIX_ComCertSelParams_GetPolicy
1367 * Retrieves a pointer to the List of OIDs (if any) representing the policy
1368 * criterion that is set in the ComCertSelParams object pointed to by
1369 * "params" and stores it at "pPolicy". In order to match against this
1370 * criterion, a certificate's CertificatePolicies extension must include at
1371 * least one of the criterion's policies. If "params" has this criterion set,
1372 * but the List of OIDs is empty, then a certificate's CertificatePolicies
1373 * extension must include at least some policy.
1375 * If "params" does not have this criterion set, this function stores NULL at
1376 * "pPolicy", in which case all certificates are considered to match this
1379 * Note that the List returned by this function is immutable.
1383 * Address of ComCertSelParams object whose policy criterion (if any) is
1384 * to be stored. Must be non-NULL.
1386 * Address where object pointer will be stored. Must be non-NULL.
1388 * Platform-specific context pointer.
1390 * Conditionally Thread Safe
1391 * (see Thread Safety Definitions in Programmer's Guide)
1393 * Returns NULL if the function succeeds.
1394 * Returns a CertSelector Error if the function fails in a non-fatal way.
1395 * Returns a Fatal Error if the function fails in an unrecoverable way.
1398 PKIX_ComCertSelParams_GetPolicy(
1399 PKIX_ComCertSelParams
*params
,
1400 PKIX_List
**pPolicy
, /* list of PKIX_PL_OID */
1404 * FUNCTION: PKIX_ComCertSelParams_SetPolicy
1407 * Sets the policy criterion of the ComCertSelParams object pointed to by
1408 * "params" using a List of OIDs pointed to by "policy". In order to match
1409 * against this criterion, a certificate's CertificatePolicies extension must
1410 * include at least one of the criterion's policies. If "params" has this
1411 * criterion set, but the List of OIDs is empty, then a certificate's
1412 * CertificatePolicies extension must include at least some policy.
1414 * If "policy" is NULL, all certificates are considered to match this
1419 * Address of ComCertSelParams object whose policy criterion is to be set.
1422 * Address of List of OIDs used to set the criterion
1423 * (or NULL to disable the criterion).
1425 * Platform-specific context pointer.
1427 * Not Thread Safe - assumes exclusive access to "params"
1428 * (see Thread Safety Definitions in Programmer's Guide)
1430 * Returns NULL if the function succeeds.
1431 * Returns a CertSelector Error if the function fails in a non-fatal way.
1432 * Returns a Fatal Error if the function fails in an unrecoverable way.
1435 PKIX_ComCertSelParams_SetPolicy(
1436 PKIX_ComCertSelParams
*params
,
1437 PKIX_List
*policy
, /* list of PKIX_PL_OID */
1441 * FUNCTION: PKIX_ComCertSelParams_GetIssuer
1444 * Retrieves a pointer to the X500Name (if any) representing the issuer
1445 * criterion that is set in the ComCertSelParams object pointed to by
1446 * "params" and stores it at "pIssuer". In order to match against this
1447 * criterion, a certificate's IssuerName must match the criterion's issuer
1450 * If "params" does not have this criterion set, this function stores NULL at
1451 * "pIssuer", in which case all certificates are considered to match this
1456 * Address of ComCertSelParams object whose issuer criterion (if any) is
1457 * to be stored. Must be non-NULL.
1459 * Address where object pointer will be stored. Must be non-NULL.
1461 * Platform-specific context pointer.
1463 * Conditionally Thread Safe
1464 * (see Thread Safety Definitions in Programmer's Guide)
1466 * Returns NULL if the function succeeds.
1467 * Returns a CertSelector Error if the function fails in a non-fatal way.
1468 * Returns a Fatal Error if the function fails in an unrecoverable way.
1471 PKIX_ComCertSelParams_GetIssuer(
1472 PKIX_ComCertSelParams
*params
,
1473 PKIX_PL_X500Name
**pIssuer
,
1477 * FUNCTION: PKIX_ComCertSelParams_SetIssuer
1480 * Sets the issuer criterion of the ComCertSelParams object pointed to by
1481 * "params" using an X500Name pointed to by "issuer". In order to match
1482 * against this criterion, a certificate's IssuerName must match the
1483 * criterion's issuer name.
1485 * If "issuer" is NULL, all certificates are considered to match this
1490 * Address of ComCertSelParams object whose issuer criterion is to be set.
1493 * Address of X500Name used to set the criterion
1494 * (or NULL to disable the criterion).
1496 * Platform-specific context pointer.
1498 * Not Thread Safe - assumes exclusive access to "params"
1499 * (see Thread Safety Definitions in Programmer's Guide)
1501 * Returns NULL if the function succeeds.
1502 * Returns a CertSelector Error if the function fails in a non-fatal way.
1503 * Returns a Fatal Error if the function fails in an unrecoverable way.
1506 PKIX_ComCertSelParams_SetIssuer(
1507 PKIX_ComCertSelParams
*params
,
1508 PKIX_PL_X500Name
*issuer
,
1512 * FUNCTION: PKIX_ComCertSelParams_GetSubject
1515 * Retrieves a pointer to the X500Name (if any) representing the subject
1516 * criterion that is set in the ComCertSelParams object pointed to by
1517 * "params" and stores it at "pSubject". In order to match against this
1518 * criterion, a certificate's SubjectName must match the criterion's subject
1521 * If "params" does not have this criterion set, this function stores NULL at
1522 * "pSubject", in which case all certificates are considered to match this
1527 * Address of ComCertSelParams object whose subject criterion (if any) is
1528 * to be stored. Must be non-NULL.
1530 * Address where object pointer will be stored. Must be non-NULL.
1532 * Platform-specific context pointer.
1534 * Conditionally Thread Safe
1535 * (see Thread Safety Definitions in Programmer's Guide)
1537 * Returns NULL if the function succeeds.
1538 * Returns a CertSelector Error if the function fails in a non-fatal way.
1539 * Returns a Fatal Error if the function fails in an unrecoverable way.
1542 PKIX_ComCertSelParams_GetSubject(
1543 PKIX_ComCertSelParams
*params
,
1544 PKIX_PL_X500Name
**pSubject
,
1548 * FUNCTION: PKIX_ComCertSelParams_SetSubject
1551 * Sets the subject criterion of the ComCertSelParams object pointed to by
1552 * "params" using an X500Name pointed to by "subject". In order to match
1553 * against this criterion, a certificate's SubjectName must match the
1554 * criterion's subject name.
1556 * If "subject" is NULL, all certificates are considered to match this
1561 * Address of ComCertSelParams object whose subject criterion is to be
1562 * set. Must be non-NULL.
1564 * Address of X500Name used to set the criterion
1565 * (or NULL to disable the criterion).
1567 * Platform-specific context pointer.
1569 * Not Thread Safe - assumes exclusive access to "params"
1570 * (see Thread Safety Definitions in Programmer's Guide)
1572 * Returns NULL if the function succeeds.
1573 * Returns a CertSelector Error if the function fails in a non-fatal way.
1574 * Returns a Fatal Error if the function fails in an unrecoverable way.
1577 PKIX_ComCertSelParams_SetSubject(
1578 PKIX_ComCertSelParams
*params
,
1579 PKIX_PL_X500Name
*subject
,
1583 * FUNCTION: PKIX_ComCertSelParams_GetSubjectAsByteArray
1586 * Retrieves a pointer to the ByteArray (if any) representing the subject
1587 * criterion that is set in the ComCertSelParams object pointed to by
1588 * "params" and stores it at "pSubject". In order to match against this
1589 * criterion, a certificate's SubjectName must match the criterion's subject
1592 * If "params" does not have this criterion set, this function stores NULL at
1593 * "pSubject", in which case all certificates are considered to match this
1598 * Address of ComCertSelParams object whose subject criterion (if any) is
1599 * to be stored. Must be non-NULL.
1601 * Address where object pointer will be stored. Must be non-NULL.
1603 * Platform-specific context pointer.
1605 * Conditionally Thread Safe
1606 * (see Thread Safety Definitions in Programmer's Guide)
1608 * Returns NULL if the function succeeds.
1609 * Returns a CertSelector Error if the function fails in a non-fatal way.
1610 * Returns a Fatal Error if the function fails in an unrecoverable way.
1613 PKIX_ComCertSelParams_GetSubjectAsByteArray(
1614 PKIX_ComCertSelParams
*params
,
1615 PKIX_PL_ByteArray
**pSubject
,
1619 * FUNCTION: PKIX_ComCertSelParams_SetSubjectAsByteArray
1622 * Sets the subject criterion of the ComCertSelParams object pointed to by
1623 * "params" using a ByteArray pointed to by "subject". In order to match
1624 * against this criterion, a certificate's SubjectName must match the
1625 * criterion's subject name.
1627 * If "subject" is NULL, all certificates are considered to match this
1632 * Address of ComCertSelParams object whose subject criterion is to be
1633 * set. Must be non-NULL.
1635 * Address of ByteArray used to set the criterion
1636 * (or NULL to disable the criterion).
1638 * Platform-specific context pointer.
1640 * Not Thread Safe - assumes exclusive access to "params"
1641 * (see Thread Safety Definitions in Programmer's Guide)
1643 * Returns NULL if the function succeeds.
1644 * Returns a CertSelector Error if the function fails in a non-fatal way.
1645 * Returns a Fatal Error if the function fails in an unrecoverable way.
1648 PKIX_ComCertSelParams_SetSubjectAsByteArray(
1649 PKIX_ComCertSelParams
*params
,
1650 PKIX_PL_ByteArray
*subject
,
1654 * FUNCTION: PKIX_ComCertSelParams_GetNameConstraints
1657 * Retrieves a pointer to the X500Name (if any) representing the name
1658 * constraints criterion that is set in the ComCertSelParams object pointed
1659 * to by "params" and stores it at "pConstraints". In order to match against
1660 * this criterion, a certificate's subject and subject alternative names must
1661 * be allowed by the criterion's name constraints.
1663 * If "params" does not have this criterion set, this function stores NULL at
1664 * "pConstraints", in which case all certificates are considered to match
1669 * Address of ComCertSelParams object whose name constraints criterion
1670 * (if any) is to be stored. Must be non-NULL.
1672 * Address where object pointer will be stored. Must be non-NULL.
1674 * Platform-specific context pointer.
1676 * Conditionally Thread Safe
1677 * (see Thread Safety Definitions in Programmer's Guide)
1679 * Returns NULL if the function succeeds.
1680 * Returns a CertSelector Error if the function fails in a non-fatal way.
1681 * Returns a Fatal Error if the function fails in an unrecoverable way.
1684 PKIX_ComCertSelParams_GetNameConstraints(
1685 PKIX_ComCertSelParams
*params
,
1686 PKIX_PL_CertNameConstraints
**pConstraints
,
1690 * FUNCTION: PKIX_ComCertSelParams_SetNameConstraints
1693 * Sets the name constraints criterion of the ComCertSelParams object pointed
1694 * to by "params" using the CertNameConstraints pointed to by "constraints".
1695 * In order to match against this criterion, a certificate's subject and
1696 * subject alternative names must be allowed by the criterion's name
1699 * If "constraints" is NULL, all certificates are considered to match this
1704 * Address of ComCertSelParams object whose name constraints criterion is
1705 * to be set. Must be non-NULL.
1707 * Address of CertNameConstraints used to set the criterion
1708 * (or NULL to disable the criterion).
1710 * Platform-specific context pointer.
1712 * Not Thread Safe - assumes exclusive access to "params"
1713 * (see Thread Safety Definitions in Programmer's Guide)
1715 * Returns NULL if the function succeeds.
1716 * Returns a CertSelector Error if the function fails in a non-fatal way.
1717 * Returns a Fatal Error if the function fails in an unrecoverable way.
1720 PKIX_ComCertSelParams_SetNameConstraints(
1721 PKIX_ComCertSelParams
*params
,
1722 PKIX_PL_CertNameConstraints
*constraints
,
1726 * FUNCTION: PKIX_ComCertSelParams_GetMatchAllSubjAltNames
1729 * Checks whether the ComCertSelParams object pointed to by "params" indicate
1730 * that all subject alternative names are to be matched and stores the Boolean
1731 * result at "pMatch". This Boolean value determines the behavior of the
1732 * subject alternative names criterion.
1734 * In order to match against the subject alternative names criterion, if the
1735 * Boolean value at "pMatch" is PKIX_TRUE, a certificate must contain all of
1736 * the criterion's subject alternative names. If the Boolean value at
1737 * "pMatch" is PKIX_FALSE, a certificate must contain at least one of the
1738 * criterion's subject alternative names. The default behavior is as if the
1739 * Boolean value at "pMatch" is PKIX_TRUE.
1743 * Address of ComCertSelParams object used to determine whether all
1744 * subject alternative names must be matched. Must be non-NULL.
1746 * Address where object pointer will be stored. Must be non-NULL.
1748 * Platform-specific context pointer.
1750 * Conditionally Thread Safe
1751 * (see Thread Safety Definitions in Programmer's Guide)
1753 * Returns NULL if the function succeeds.
1754 * Returns a CertSelector Error if the function fails in a non-fatal way.
1755 * Returns a Fatal Error if the function fails in an unrecoverable way.
1758 PKIX_ComCertSelParams_GetMatchAllSubjAltNames(
1759 PKIX_ComCertSelParams
*params
,
1760 PKIX_Boolean
*pMatch
,
1764 * FUNCTION: PKIX_ComCertSelParams_SetMatchAllSubjAltNames
1767 * Sets the match flag of the ComCertSelParams object pointed to by "params"
1768 * using the Boolean value of "match". This Boolean value determines the
1769 * behavior of the subject alternative names criterion.
1771 * In order to match against the subject alternative names criterion, if the
1772 * "match" is PKIX_TRUE, a certificate must contain all of the criterion's
1773 * subject alternative names. If the "match" is PKIX_FALSE, a certificate
1774 * must contain at least one of the criterion's subject alternative names.
1775 * The default behavior is as if "match" is PKIX_TRUE.
1779 * Address of ComCertSelParams object whose match flag is to be set.
1782 * Boolean value used to set the match flag.
1784 * Platform-specific context pointer.
1786 * Not Thread Safe - assumes exclusive access to "params"
1787 * (see Thread Safety Definitions in Programmer's Guide)
1789 * Returns NULL if the function succeeds.
1790 * Returns a CertSelector Error if the function fails in a non-fatal way.
1791 * Returns a Fatal Error if the function fails in an unrecoverable way.
1794 PKIX_ComCertSelParams_SetMatchAllSubjAltNames(
1795 PKIX_ComCertSelParams
*params
,
1803 #endif /* _PKIX_CERTSEL_H */