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 Netscape security libraries.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
19 * the Initial Developer. All Rights Reserved.
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 * These functions provide support for a number of other functions
39 * by creating and manipulating data structures used by those functions.
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_Loggers provide a standard way for the caller to insert custom logging
80 * facilities. These are used by libpkix to log errors, debug information,
81 * status, etc. The LogCallback allows custom logging to take place.
82 * Additionally, a Logger can be initialized with a loggerContext, which is
83 * where the caller can specify configuration data such as the name of a
84 * logfile or database. Note that this loggerContext must be a PKIX_PL_Object,
85 * allowing it to be reference-counted and allowing it to provide the standard
86 * PKIX_PL_Object functions (Equals, Hashcode, ToString, Compare, Duplicate).
88 * Once the caller has created the Logger object(s) (and set the loggerContext
89 * (if any) and the Log callback), the caller then registers these Loggers
90 * with the system by calling PKIX_SetLoggers or PKIX_AddLogger. All log
91 * entries will then be logged using the specified Loggers. If multiple
92 * Loggers are specified, every log entry will be logged with each of them.
94 * XXX Maybe give some guidance somewhere on how much detail each logging
95 * level should have and where component boundaries should be. Maybe in
96 * Implementor's Guide or Programmer's Guide.
99 #define PKIX_LOGGER_LEVEL_TRACE 5
100 #define PKIX_LOGGER_LEVEL_DEBUG 4
101 #define PKIX_LOGGER_LEVEL_WARNING 3
102 #define PKIX_LOGGER_LEVEL_ERROR 2
103 #define PKIX_LOGGER_LEVEL_FATALERROR 1
105 #define PKIX_LOGGER_LEVEL_MAX 5
108 * FUNCTION: PKIX_Logger_LogCallback
111 * This callback function logs a log entry containing the String pointed to
112 * by "message", the integer value of logLevel, and the String pointed to by
113 * "logComponent". A log entry can be associated with a particular log
114 * level (i.e. level 3) and a particular log component (i.e. "CertStore").
115 * For example, someone reading the log may only be interested in very general
116 * log entries so they look only for log level 1. Similarly, they may only be
117 * interested in log entries pertaining to the CertStore component so they
118 * look only for that log component. This function can be used before calling
123 * Address of logger whose LogCallback is to be used. Must be non-NULL.
125 * Address of String that is to be logged used "logger". Must be non-NULL.
127 * Integer value representing the log level for this entry. The higher the
128 * level, the more detail. Must be non-NULL.
130 * PKIXERRORNUM value (defined in pkixt.h) designating the log component
133 * Platform-specific context pointer.
137 * Multiple threads must be able to safely call this function without
138 * worrying about conflicts, even if they're operating on the same objects.
140 * Returns NULL if the function succeeds.
141 * Returns a Logger Error if the function fails in a non-fatal way.
142 * Returns a Fatal Error if the function fails in an unrecoverable way.
145 (*PKIX_Logger_LogCallback
)(
147 PKIX_PL_String
*message
,
148 PKIX_UInt32 logLevel
,
149 PKIX_ERRORNUM logComponent
,
153 * FUNCTION: PKIX_Logger_Create
156 * Creates a new Logger using the Object pointed to by "loggerContext"
157 * (if any) and stores it at "pLogger". The new Logger uses the LogCallback
158 * pointed to by "callback". The Logger's maximum logging level is initially
159 * set to a very high level and its logging component is set to NULL (all
164 * The LogCallback function to be used. Must be non-NULL.
166 * Address of Object representing the Logger's context (if any).
168 * Address where object pointer will be stored. Must be non-NULL.
170 * Platform-specific context pointer.
172 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
174 * Returns NULL if the function succeeds.
175 * Returns a Logger Error if the function fails in a non-fatal way.
176 * Returns a Fatal Error if the function fails in an unrecoverable way.
180 PKIX_Logger_LogCallback callback
,
181 PKIX_PL_Object
*loggerContext
,
182 PKIX_Logger
**pLogger
,
186 * FUNCTION: PKIX_Logger_GetLogCallback
189 * Retrieves a pointer to "logger's" Log callback function and puts it in
194 * Address of Logger whose Log callback is desired. Must be non-NULL.
196 * Address where Log callback function pointer will be stored.
199 * Platform-specific context pointer.
201 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
203 * Returns NULL if the function succeeds.
204 * Returns a Logger Error if the function fails in a non-fatal way.
205 * Returns a Fatal Error if the function fails in an unrecoverable way.
208 PKIX_Logger_GetLogCallback(
210 PKIX_Logger_LogCallback
*pCallback
,
214 * FUNCTION: PKIX_Logger_GetLoggerContext
217 * Retrieves a pointer to a PKIX_PL_Object representing the context (if any)
218 * of the Logger pointed to by "logger" and stores it at "pLoggerContext".
222 * Address of Logger whose context is to be stored. Must be non-NULL.
224 * Address where object pointer will be stored. Must be non-NULL.
226 * Platform-specific context pointer.
228 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
230 * Returns NULL if the function succeeds.
231 * Returns a Logger Error if the function fails in a non-fatal way.
232 * Returns a Fatal Error if the function fails in an unrecoverable way.
235 PKIX_Logger_GetLoggerContext(
237 PKIX_PL_Object
**pLoggerContext
,
241 * FUNCTION: PKIX_Logger_GetMaxLoggingLevel
244 * Retrieves a pointer to a PKIX_UInt32 representing the maximum logging
245 * level of the Logger pointed to by "logger" and stores it at "pLevel". Only
246 * log entries whose log level is less than or equal to this maximum logging
247 * level will be logged.
251 * Address of Logger whose maximum logging level is to be stored.
254 * Address where PKIX_UInt32 will be stored. Must be non-NULL.
256 * Platform-specific context pointer.
258 * Conditionally Thread Safe
259 * (see Thread Safety Definitions in Programmer's Guide)
261 * Returns NULL if the function succeeds.
262 * Returns a Logger Error if the function fails in a non-fatal way.
263 * Returns a Fatal Error if the function fails in an unrecoverable way.
266 PKIX_Logger_GetMaxLoggingLevel(
272 * FUNCTION: PKIX_Logger_SetMaxLoggingLevel
275 * Sets the maximum logging level of the Logger pointed to by "logger" with
276 * the integer value of "level".
280 * Address of Logger whose maximum logging level is to be set.
283 * Maximum logging level to be set
285 * Platform-specific context pointer.
287 * Not Thread Safe - assumes exclusive access to "logger"
288 * (see Thread Safety Definitions in Programmer's Guide)
290 * Returns NULL if the function succeeds.
291 * Returns a Logger Error if the function fails in a non-fatal way.
292 * Returns a Fatal Error if the function fails in an unrecoverable way.
295 PKIX_Logger_SetMaxLoggingLevel(
301 * FUNCTION: PKIX_Logger_GetLoggingComponent
304 * Retrieves a pointer to a String representing the logging component of the
305 * Logger pointed to by "logger" and stores it at "pComponent". Only log
306 * entries whose log component matches the specified logging component will
311 * Address of Logger whose logging component is to be stored.
314 * Address where PKIXERRORNUM will be stored. Must be non-NULL.
316 * Platform-specific context pointer.
318 * Conditionally Thread Safe
319 * (see Thread Safety Definitions in Programmer's Guide)
321 * Returns NULL if the function succeeds.
322 * Returns a Logger Error if the function fails in a non-fatal way.
323 * Returns a Fatal Error if the function fails in an unrecoverable way.
326 PKIX_Logger_GetLoggingComponent(
328 PKIX_ERRORNUM
*pComponent
,
332 * FUNCTION: PKIX_Logger_SetLoggingComponent
335 * Sets the logging component of the Logger pointed to by "logger" with the
336 * PKIXERRORNUM pointed to by "component". To match a small set of components,
337 * create a Logger for each.
341 * Address of Logger whose logging component is to be set.
344 * PKIXERRORNUM value representing logging component to be set.
346 * Platform-specific context pointer.
348 * Not Thread Safe - assumes exclusive access to "logger"
349 * (see Thread Safety Definitions in Programmer's Guide)
351 * Returns NULL if the function succeeds.
352 * Returns a Logger Error if the function fails in a non-fatal way.
353 * Returns a Fatal Error if the function fails in an unrecoverable way.
356 PKIX_Logger_SetLoggingComponent(
358 PKIX_ERRORNUM component
,
362 * FUNCTION: PKIX_GetLoggers
365 * Retrieves a pointer to the List of Loggers (if any) being used for logging
366 * by libpkix and stores it at "pLoggers". If no loggers are being used, this
367 * function stores an empty List at "pLoggers".
369 * Note that the List returned by this function is immutable.
373 * Address where object pointer will be stored. Must be non-NULL.
375 * Platform-specific context pointer.
377 * Conditionally Thread Safe
378 * (see Thread Safety Definitions in Programmer's Guide)
380 * Returns NULL if the function succeeds.
381 * Returns a Logger Error if the function fails in a non-fatal way.
382 * Returns a Fatal Error if the function fails in an unrecoverable way.
386 PKIX_List
**pLoggers
, /* list of PKIX_Logger */
390 * FUNCTION: PKIX_SetLoggers
393 * Sets the Loggers to be used by libpkix to the List of Loggers pointed to
394 * by "loggers". If "loggers" is NULL, no Loggers will be used.
398 * Address of List of Loggers to be set. NULL for no Loggers.
400 * Platform-specific context pointer.
403 * (see Thread Safety Definitions in Programmer's Guide)
405 * Returns NULL if the function succeeds.
406 * Returns a Logger Error if the function fails in a non-fatal way.
407 * Returns a Fatal Error if the function fails in an unrecoverable way.
411 PKIX_List
*loggers
, /* list of PKIX_Logger */
415 * FUNCTION: PKIX_AddLogger
418 * Adds the Logger pointed to by "logger" to the List of Loggers used by
423 * Address of Logger to be added. Must be non-NULL.
425 * Platform-specific context pointer.
428 * (see Thread Safety Definitions in Programmer's Guide)
430 * Returns NULL if the function succeeds.
431 * Returns a Logger Error if the function fails in a non-fatal way.
432 * Returns a Fatal Error if the function fails in an unrecoverable way.
439 /* Functions pertaining to the PKIX_Error type */
443 * An Error object is returned by a function upon encountering some error
444 * condition. Each Error is associated with an errorCode specified in pkixt.h.
445 * The remaining components of an Error are optional. An Error's description
446 * specifies a text message describing the Error. An Error's supplementary info
447 * specifies additional information that might be useful. Finally, an Error's
448 * cause specifies the underlying Error (if any) that resulted in this Error
449 * being returned, thereby allowing Errors to be chained so that an entire
450 * "error stack trace" can be represented. Once created, an Error is immutable.
452 * Note that the Error's supplementary info must be an Object (although any
453 * object type), allowing it to be reference-counted and allowing it to
454 * provide the standard Object functions (Equals, Hashcode, ToString, Compare,
457 * Errors are classified as either being fatal or non-fatal. If a function
458 * fails in an unrecoverable way, it returns an Error whose errorCode is
459 * PKIX_FATAL_ERROR. If such an error is encountered, the caller should
460 * not attempt to recover since something seriously wrong has happened
461 * (e.g. corrupted memory, memory finished, etc.). All other errorCodes
462 * are considered non-fatal errors and can be handled by the caller as they
467 * FUNCTION: PKIX_Error_Create
470 * Creates a new Error using the value of "errorCode", the Error pointed to by
471 * "cause" (if any), the Object pointed to by "info" (if any), and the String
472 * pointed to by "desc" and stores it at "pError". If any error occurs during
473 * error allocation, it will be returned without chaining, since new errors
474 * cannot be created. Once created, an Error is immutable.
478 * Value of error code.
480 * Address of Error representing error's cause.
481 * NULL if none or unspecified.
483 * Address of Object representing error's supplementary information.
486 * Address of String representing error's description. NULL if none.
488 * Address where object pointer will be stored. Must be non-NULL.
490 * Platform-specific context pointer.
492 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
494 * Returns NULL if the function succeeds.
495 * Returns an Error Error if the function fails in a non-fatal way.
496 * Returns a Fatal Error if the function fails in an unrecoverable way.
500 PKIX_UInt32 errorCode
,
502 PKIX_PL_Object
*info
,
503 PKIX_PL_String
*desc
,
508 * FUNCTION: PKIX_Error_GetErrorCode
511 * Retrieves the error code of the Error pointed to by "error" and stores it
512 * at "pCode". Supported error codes are defined in pkixt.h.
516 * Address of Error whose error code is desired. Must be non-NULL.
518 * Address where PKIX_UInt32 will be stored. Must be non-NULL.
520 * Platform-specific context pointer.
522 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
524 * Returns NULL if the function succeeds.
525 * Returns an Error Error if the function fails in a non-fatal way.
526 * Returns a Fatal Error if the function fails in an unrecoverable way.
529 PKIX_Error_GetErrorCode(
535 * FUNCTION: PKIX_Error_GetCause
538 * Retrieves the cause of the Error pointed to by "error" and stores it at
539 * "pCause". If no cause was specified, NULL will be stored at "pCause".
543 * Address of Error whose cause is desired. Must be non-NULL.
545 * Address where object pointer will be stored. Must be non-NULL.
547 * Platform-specific context pointer.
549 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
551 * Returns NULL if the function succeeds.
552 * Returns an Error Error if the function fails in a non-fatal way.
553 * Returns a Fatal Error if the function fails in an unrecoverable way.
562 * FUNCTION: PKIX_Error_GetSupplementaryInfo
565 * Retrieves the supplementary info of the Error pointed to by "error" and
566 * stores it at "pInfo".
570 * Address of Error whose info is desired. Must be non-NULL.
572 * Address where info pointer will be stored. Must be non-NULL.
574 * Platform-specific context pointer.
576 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
578 * Returns NULL if the function succeeds.
579 * Returns an Error Error if the function fails in a non-fatal way.
580 * Returns a Fatal Error if the function fails in an unrecoverable way.
583 PKIX_Error_GetSupplementaryInfo(
585 PKIX_PL_Object
**pInfo
,
589 * FUNCTION: PKIX_Error_GetDescription
592 * Retrieves the description of the Error pointed to by "error" and stores it
593 * at "pDesc". If no description was specified, NULL will be stored at
598 * Address of Error whose description is desired. Must be non-NULL.
600 * Address where object pointer will be stored. Must be non-NULL.
602 * Platform-specific context pointer.
604 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
606 * Returns NULL if the function succeeds.
607 * Returns an Error Error if the function fails in a non-fatal way.
608 * Returns a Fatal Error if the function fails in an unrecoverable way.
611 PKIX_Error_GetDescription(
613 PKIX_PL_String
**pDesc
,
618 * Represents a collection of items. NULL is considered a valid item.
622 * FUNCTION: PKIX_List_Create
625 * Creates a new List and stores it at "pList". The List is initially empty
626 * and holds no items. To initially add items to the List, use
627 * PKIX_List_AppendItem
631 * Address where object pointer will be stored. Must be non-NULL.
633 * Platform-specific context pointer.
635 * Thread Safe (see Thread Safety Definitions in Programmer's Guide)
637 * Returns NULL if the function succeeds.
638 * Returns a Fatal Error if the function fails in an unrecoverable way.
646 * FUNCTION: PKIX_List_SetImmutable
649 * Sets the List pointed to by "list" to be immutable. If a caller tries to
650 * change a List after it has been marked immutable (i.e. by calling
651 * PKIX_List_AppendItem, PKIX_List_InsertItem, PKIX_List_SetItem, or
652 * PKIX_List_DeleteItem), an Error is returned.
656 * Address of List to be marked immutable. Must be non-NULL.
658 * Platform-specific context pointer.
660 * Not Thread Safe - assumes exclusive access to "list"
661 * (see Thread Safety Definitions in Programmer's Guide)
663 * Returns NULL if the function succeeds.
664 * Returns a Fatal Error if the function fails in an unrecoverable way.
667 PKIX_List_SetImmutable(
672 * FUNCTION: PKIX_List_IsImmutable
675 * Checks whether the List pointed to by "list" is immutable and stores
676 * the Boolean result at "pImmutable". If a caller tries to change a List
677 * after it has been marked immutable (i.e. by calling PKIX_List_AppendItem,
678 * PKIX_List_InsertItem, PKIX_List_SetItem, or PKIX_List_DeleteItem), an
683 * Address of List whose immutability is to be determined.
686 * Address where PKIX_Boolean will be stored. Must be non-NULL.
688 * Platform-specific context pointer.
690 * Conditionally Thread Safe
691 * (see Thread Safety Definitions in Programmer's Guide)
693 * Returns NULL if the function succeeds.
694 * Returns a Fatal Error if the function fails in an unrecoverable way.
697 PKIX_List_IsImmutable(
699 PKIX_Boolean
*pImmutable
,
703 * FUNCTION: PKIX_List_GetLength
706 * Retrieves the length of the List pointed to by "list" and stores it at
711 * Address of List whose length is desired. Must be non-NULL.
713 * Address where PKIX_UInt32 will be stored. Must be non-NULL.
715 * Platform-specific context pointer.
717 * Conditionally Thread Safe
718 * (see Thread Safety Definitions in Programmer's Guide)
720 * Returns NULL if the function succeeds.
721 * Returns a Fatal Error if the function fails in an unrecoverable way.
726 PKIX_UInt32
*pLength
,
730 * FUNCTION: PKIX_List_IsEmpty
733 * Checks whether the List pointed to by "list" is empty and stores
734 * the Boolean result at "pEmpty".
738 * Address of List whose emptiness is to be determined. Must be non-NULL.
740 * Address where PKIX_Boolean will be stored. Must be non-NULL.
742 * Platform-specific context pointer.
744 * Conditionally Thread Safe
745 * (see Thread Safety Definitions in Programmer's Guide)
747 * Returns NULL if the function succeeds.
748 * Returns a Fatal Error if the function fails in an unrecoverable way.
753 PKIX_Boolean
*pEmpty
,
757 * FUNCTION: PKIX_List_AppendItem
760 * Appends the Object pointed to by "item" after the last non-NULL item in
761 * List pointed to by "list", if any. Note that a List may validly contain
762 * NULL items. Appending "c" into the List ("a", NULL, "b", NULL) will result
763 * in ("a", NULL, "b", "c").
767 * Address of List to append to. Must be non-NULL.
769 * Address of new item to append.
771 * Platform-specific context pointer.
773 * Not Thread Safe - assumes exclusive access to "list"
774 * (see Thread Safety Definitions in Programmer's Guide)
776 * Returns NULL if the function succeeds.
777 * Returns a Fatal Error if the function fails in an unrecoverable way.
780 PKIX_List_AppendItem(
782 PKIX_PL_Object
*item
,
786 * FUNCTION: PKIX_List_InsertItem
789 * Inserts the Object pointed to by "item" into the List pointed to by "list"
790 * at the given "index". The index counts from zero and must be less than the
791 * List's length. Existing list entries at or after this index will be moved
792 * to the next highest index.
794 * XXX why not allow equal to length which would be equivalent to AppendItem?
798 * Address of List to insert into. Must be non-NULL.
800 * Position to insert into. Must be less than List's length.
802 * Address of new item to append.
804 * Platform-specific context pointer.
806 * Not Thread Safe - assumes exclusive access to "list"
807 * (see Thread Safety Definitions in Programmer's Guide)
809 * Returns NULL if the function succeeds.
810 * Returns a Fatal Error if the function fails in an unrecoverable way.
813 PKIX_List_InsertItem(
816 PKIX_PL_Object
*item
,
820 * FUNCTION: PKIX_List_GetItem
823 * Copies the "list"'s item at "index" into "pItem". The index counts from
824 * zero and must be less than the list's length. Increments the reference
825 * count on the returned object, if non-NULL.
829 * Address of List to get item from. Must be non-NULL.
831 * Index of list to get item from. Must be less than List's length.
833 * Address where object pointer will be stored. Must be non-NULL.
835 * Platform-specific context pointer.
837 * Conditionally Thread Safe
838 * (see Thread Safety Definitions in Programmer's Guide)
840 * Returns NULL if the function succeeds.
841 * Returns a Fatal Error if the function fails in an unrecoverable way.
847 PKIX_PL_Object
**pItem
,
851 * FUNCTION: PKIX_List_SetItem
854 * Sets the item at "index" of the List pointed to by "list" with the Object
855 * pointed to by "item". The index counts from zero and must be less than the
856 * List's length. The previous entry at this index will have its reference
857 * count decremented and the new entry will have its reference count
862 * Address of List to modify. Must be non-NULL.
864 * Position in List to set. Must be less than List's length.
866 * Address of Object to set at "index".
868 * Platform-specific context pointer.
870 * Not Thread Safe - assumes exclusive access to "list"
871 * (see Thread Safety Definitions in Programmer's Guide)
873 * Returns NULL if the function succeeds.
874 * Returns a Fatal Error if the function fails in an unrecoverable way.
880 PKIX_PL_Object
*item
,
884 * FUNCTION: PKIX_List_DeleteItem
886 * Deletes the item at "index" from the List pointed to by "list". The index
887 * counts from zero and must be less than the List's length. Note that this
888 * function does not destroy the List. It simply decrements the reference
889 * count of the item at "index" in the List, deletes that item from the list
890 * and moves all subsequent entries to a lower index in the list. If there is
891 * only a single element in the List and that element is deleted, then the
892 * List will be empty.
896 * Address of List to delete from. Must be non-NULL.
898 * Position in List to delete. Must be less than List's length.
900 * Platform-specific context pointer.
902 * Not Thread Safe - assumes exclusive access to "list"
903 * (see Thread Safety Definitions in Programmer's Guide)
905 * Returns NULL if the function succeeds.
906 * Returns a Fatal Error if the function fails in an unrecoverable way.
909 PKIX_List_DeleteItem(
915 * FUNCTION: PKIX_List_ReverseList
918 * Creates a new List whose elements are in the reverse order as the elements
919 * of the Object pointed to by "list" and stores the copy at "pReversedList".
920 * If "list" is empty, the new reversed List will be a copy of "list".
921 * Changes to the new object will not affect the original and vice versa.
925 * Address of List whose elements are to be reversed. Must be non-NULL.
927 * Address where object pointer will be stored. Must be non-NULL.
929 * Platform-specific context pointer.
931 * Conditionally Thread Safe
932 * (see Thread Safety Definitions in Programmer's Guide)
934 * Returns NULL if the function succeeds.
935 * Returns a Fatal Error if the function fails in an unrecoverable way.
938 PKIX_List_ReverseList(
940 PKIX_List
**pReversedList
,
947 #endif /* _PKIX_UTIL_H */