nsspkix.h
上传用户:lyxiangda
上传日期:2007-01-12
资源大小:3042k
文件大小:512k
- /*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is the Netscape security libraries.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1994-2000 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
- * version of this file only under the terms of the GPL and not to
- * allow others to use your version of this file under the MPL,
- * indicate your decision by deleting the provisions above and
- * replace them with the notice and other provisions required by
- * the GPL. If you do not delete the provisions above, a recipient
- * may use your version of this file under either the MPL or the
- * GPL.
- */
- #ifndef NSSPKIX_H
- #define NSSPKIX_H
- #ifdef DEBUG
- static const char NSSPKIX_CVS_ID[] = "@(#) $Source: /cvsroot/mozilla/security/nss/lib/pkix/include/nsspkix.h,v $ $Revision: 1.1 $ $Date: 2000/03/31 19:02:06 $ $Name: NSS_3_1_1_RTM $";
- #endif /* DEBUG */
- /*
- * nsspkix.h
- *
- * This file contains the prototypes for the public methods defined
- * for the PKIX part-1 objects.
- */
- #ifndef NSSPKIXT_H
- #include "nsspkixt.h"
- #endif /* NSSPKIXT_H */
- PR_BEGIN_EXTERN_C
- /*
- * Attribute
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * Attribute ::= SEQUENCE {
- * type AttributeType,
- * values SET OF AttributeValue
- * -- at least one value is required -- }
- *
- * The public calls for the type:
- *
- * NSSPKIXAttribute_Decode
- * NSSPKIXAttribute_Create
- * NSSPKIXAttribute_CreateFromArray
- * NSSPKIXAttribute_Destroy
- * NSSPKIXAttribute_Encode
- * NSSPKIXAttribute_GetType
- * NSSPKIXAttribute_SetType
- * NSSPKIXAttribute_GetValueCount
- * NSSPKIXAttribute_GetValues
- * NSSPKIXAttribute_SetValues
- * NSSPKIXAttribute_GetValue
- * NSSPKIXAttribute_SetValue
- * NSSPKIXAttribute_AddValue
- * NSSPKIXAttribute_RemoveValue
- * NSSPKIXAttribute_FindValue
- * NSSPKIXAttribute_Equal
- * NSSPKIXAttribute_Duplicate
- *
- */
- /*
- * NSSPKIXAttribute_Decode
- *
- * This routine creates an NSSPKIXAttribute by decoding a BER-
- * or DER-encoded Attribute as defined in RFC 2459. This
- * routine may return NULL upon error, in which case it will
- * have created an error stack. If the optional arena argument
- * is non-NULL, that arena will be used for the required memory.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttribute upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttribute *
- NSSPKIXAttribute_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXAttribute_Create
- *
- * This routine creates an NSSPKIXAttribute from specified components.
- * This routine may return NULL upon error, in which case it will have
- * created an error stack. If the optional arena argument is non-NULL,
- * that arena will be used for the required memory. There must be at
- * least one attribute value specified. The final argument must be
- * NULL, to indicate the end of the set of attribute values.
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_OID
- * NSS_ERROR_INVALID_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttribute upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttribute *
- NSSPKIXAttribute_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXAttributeType *typeOid,
- NSSPKIXAttributeValue *value1,
- ...
- );
- /*
- * NSSPKIXAttribute_CreateFromArray
- *
- * This routine creates an NSSPKIXAttribute from specified components.
- * This routine may return NULL upon error, in which case it will have
- * created an error stack. If the optional arena argument is non-NULL,
- * that arena will be used for the required memory. There must be at
- * least one attribute value specified. The final argument must be
- * NULL, to indicate the end of the set of attribute values.
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_OID
- * NSS_ERROR_INVALID_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttribute upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttribute *
- NSSPKIXAttribute_CreateFromArray
- (
- NSSArena *arenaOpt,
- NSSPKIXAttributeType *typeOid,
- PRUint32 count,
- NSSPKIXAttributeValue values[]
- );
- /*
- * NSSPKIXAttribute_Destroy
- *
- * This routine destroys an NSSPKIXAttribute. It should be called on
- * all such objects created without an arena. It does not need to be
- * called for objects created with an arena, but it may be. This
- * routine returns a PRStatus value. Upon error, it will create an
- * error stack and return PR_FAILURE.
- *
- * The error value may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_Destroy
- (
- NSSPKIXAttribute *attribute
- );
- /*
- * NSSPKIXAttribute_Encode
- *
- * This routine returns the BER encoding of the specified
- * NSSPKIXAttribute. {usual rules about itemOpt and arenaOpt}
- * This routine indicates an error (NSS_ERROR_INVALID_DATA)
- * if there are no attribute values (i.e., the last one was removed).
- *
- * The error value may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_DATA
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXAttribute_Encode
- (
- NSSPKIXAttribute *attribute,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttribute_GetType
- *
- * This routine returns the attribute type oid of the specified
- * NSSPKIXAttribute.
- *
- * The error value may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSPKIXAttributeType pointer upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttributeType *
- NSSPKIXAttribute_GetType
- (
- NSSPKIXAttribute *attribute
- );
- /*
- * NSSPKIXAttribute_SetType
- *
- * This routine sets the attribute type oid of the indicated
- * NSSPKIXAttribute to the specified value. Since attributes
- * may be application-defined, no checking can be done on
- * either the correctness of the attribute type oid value nor
- * the suitability of the set of attribute values.
- *
- * The error value may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_OID
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_SetType
- (
- NSSPKIXAttribute *attribute,
- NSSPKIXAttributeType *attributeType
- );
- /*
- * NSSPKIXAttribute_GetValueCount
- *
- * This routine returns the number of attribute values present in
- * the specified NSSPKIXAttribute. This routine returns a PRInt32.
- * Upon error, this routine returns -1. This routine indicates an
- * error if the number of values cannot be expressed as a PRInt32.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXAttribute_GetValueCount
- (
- NSSPKIXAttribute *attribute
- );
- /*
- * NSSPKIXAttribute_GetValues
- *
- * This routine returns all of the attribute values in the specified
- * NSSPKIXAttribute. If the optional pointer to an array of NSSItems
- * is non-null, then that array will be used and returned; otherwise,
- * an array will be allocated and returned. If the limit is nonzero
- * (which is must be if the specified array is nonnull), then an
- * error is indicated if it is smaller than the value count.
- * {arenaOpt}
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_ARRAY_TOO_SMALL
- *
- * Return value:
- * A valid pointer to an array of NSSItem's upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttributeValue *
- NSSPKIXAttribute_GetValues
- (
- NSSPKIXAttribute *attribute,
- NSSPKIXAttributeValue rvOpt[],
- PRInt32 limit,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttribute_SetValues
- *
- * This routine sets all of the values of the specified
- * NSSPKIXAttribute to the values in the specified NSSItem array.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_POINTER
- * NSS_ERROR_ARRAY_TOO_SMALL
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_SetValues
- (
- NSSPKIXAttribute *attribute,
- NSSPKIXAttributeValue values[],
- PRInt32 count
- );
- /*
- * NSSPKIXAttribute_GetValue
- *
- * This routine returns the i'th attribute value of the set of
- * values in the specified NSSPKIXAttribute. Although the set
- * is unordered, an arbitrary ordering will be maintained until
- * the data in the attribute is changed. {usual comments about
- * itemOpt and arenaOpt}
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeValue *
- NSSPKIXAttribute_GetValue
- (
- NSSPKIXAttribute *attribute,
- PRInt32 i,
- NSSPKIXAttributeValue *itemOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttribute_SetValue
- *
- * This routine sets the i'th attribute value {blah blah; copies
- * memory contents over..}
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_SetValue
- (
- NSSPKIXAttribute *attribute,
- PRInt32 i,
- NSSPKIXAttributeValue *value
- );
- /*
- * NSSPKIXAttribute_AddValue
- *
- * This routine adds the specified attribute value to the set in
- * the specified NSSPKIXAttribute.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_AddValue
- (
- NSSPKIXAttribute *attribute,
- NSSPKIXAttributeValue *value
- );
- /*
- * NSSPKIXAttribute_RemoveValue
- *
- * This routine removes the i'th attribute value of the set in the
- * specified NSSPKIXAttribute. An attempt to remove the last value
- * will fail.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_AT_MINIMUM
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttribute_RemoveValue
- (
- NSSPKIXAttribute *attribute,
- PRInt32 i
- );
- /*
- * NSSPKIXAttribute_FindValue
- *
- * This routine searches the set of attribute values in the specified
- * NSSPKIXAttribute for the provided data. If an exact match is found,
- * then that value's index is returned. If an exact match is not
- * found, -1 is returned. If there is more than one exact match, one
- * index will be returned. {notes about unorderdness of SET, etc}
- * If the index may not be represented as an integer, an error is
- * indicated.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NOT_FOUND
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value
- * The index of the specified attribute value upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXAttribute_FindValue
- (
- NSSPKIXAttribute *attribute,
- NSSPKIXAttributeValue *attributeValue
- );
- /*
- * NSSPKIXAttribute_Equal
- *
- * This routine compares two NSSPKIXAttribute's for equality.
- * It returns PR_TRUE if they are equal, PR_FALSE otherwise.
- * This routine also returns PR_FALSE upon error; if you're
- * that worried about it, check for an error stack.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXAttribute_Equal
- (
- NSSPKIXAttribute *one,
- NSSPKIXAttribute *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXAttribute_Duplicate
- *
- * This routine duplicates an NSSPKIXAttribute. {arenaOpt}
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATTRIBUTE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttribute upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXAttribute *
- NSSPKIXAttribute_Duplicate
- (
- NSSPKIXAttribute *attribute,
- NSSArena *arenaOpt
- );
- /*
- * AttributeTypeAndValue
- *
- * This structure contains an attribute type (indicated by an OID),
- * and the type-specific value. RelativeDistinguishedNames consist
- * of a set of these. These are distinct from Attributes (which have
- * SET of values), from AttributeDescriptions (which have qualifiers
- * on the types), and from AttributeValueAssertions (which assert a
- * a value comparison under some matching rule).
- *
- * From RFC 2459:
- *
- * AttributeTypeAndValue ::= SEQUENCE {
- * type AttributeType,
- * value AttributeValue }
- *
- * The public calls for the type:
- *
- * NSSPKIXAttributeTypeAndValue_Decode
- * NSSPKIXAttributeTypeAndValue_CreateFromUTF8
- * NSSPKIXAttributeTypeAndValue_Create
- * NSSPKIXAttributeTypeAndValue_Destroy
- * NSSPKIXAttributeTypeAndValue_Encode
- * NSSPKIXAttributeTypeAndValue_GetUTF8Encoding
- * NSSPKIXAttributeTypeAndValue_GetType
- * NSSPKIXAttributeTypeAndValue_SetType
- * NSSPKIXAttributeTypeAndValue_GetValue
- * NSSPKIXAttributeTypeAndValue_SetValue
- * NSSPKIXAttributeTypeAndValue_Equal
- * NSSPKIXAttributeTypeAndValue_Duplicate
- */
- /*
- * NSSPKIXAttributeTypeAndValue_Decode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeTypeAndValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue *
- NSSPKIXAttributeTypeAndValue_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXAttributeTypeAndValue_CreateFromUTF8
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_STRING
- * NSS_ERROR_UNKNOWN_ATTRIBUTE
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeTypeAndValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue *
- NSSPKIXAttributeTypeAndValue_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *string
- );
- /*
- * NSSPKIXAttributeTypeAndValue_Create
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_OID
- * NSS_ERROR_INVALID_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeTypeAndValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue *
- NSSPKIXAttributeTypeAndValue_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXAttributeType *typeOid,
- NSSPKIXAttributeValue *value
- );
- /*
- * NSSPKIXAttributeTypeAndValue_Destroy
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttributeTypeAndValue_Destroy
- (
- NSSPKIXAttributeTypeAndValue *atav
- );
- /*
- * NSSPKIXAttributeTypeAndValue_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXAttributeTypeAndValue_Encode
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttributeTypeAndValue_GetUTF8Encoding
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSUTF8 pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXAttributeTypeAndValue_GetUTF8Encoding
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttributeTypeAndValue_GetType
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSPKIXAttributeType pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeType *
- NSSPKIXAttributeTypeAndValue_GetType
- (
- NSSPKIXAttributeTypeAndValue *atav
- );
- /*
- * NSSPKIXAttributeTypeAndValue_SetType
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_INVALID_OID
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttributeTypeAndValue_SetType
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSPKIXAttributeType *attributeType
- );
- /*
- * NSSPKIXAttributeTypeAndValue_GetValue
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSAttributeValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeValue *
- NSSPKIXAttributeTypeAndValue_GetValue
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSPKIXAttributeValue *itemOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXAttributeTypeAndValue_SetValue
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXAttributeTypeAndValue_SetValue
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSPKIXAttributeValue *value
- );
- /*
- * NSSPKIXAttributeTypeAndValue_Equal
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXAttributeTypeAndValue_Equal
- (
- NSSPKIXAttributeTypeAndValue *atav1,
- NSSPKIXAttributeTypeAndValue *atav2,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXAttributeTypeAndValue_Duplicate
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeTypeAndValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue *
- NSSPKIXAttributeTypeAndValue_Duplicate
- (
- NSSPKIXAttributeTypeAndValue *atav,
- NSSArena *arenaOpt
- );
- /*
- * X520Name
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520name ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-name)),
- * printableString PrintableString (SIZE (1..ub-name)),
- * universalString UniversalString (SIZE (1..ub-name)),
- * utf8String UTF8String (SIZE (1..ub-name)),
- * bmpString BMPString (SIZE(1..ub-name)) }
- *
- * ub-name INTEGER ::= 32768
- *
- * The public calls for this type:
- *
- * NSSPKIXX520Name_Decode
- * NSSPKIXX520Name_CreateFromUTF8
- * NSSPKIXX520Name_Create (?)
- * NSSPKIXX520Name_Destroy
- * NSSPKIXX520Name_Encode
- * NSSPKIXX520Name_GetUTF8Encoding
- * NSSPKIXX520Name_Equal
- * NSSPKIXX520Name_Duplicate
- *
- * The public data for this type:
- *
- * NSSPKIXX520Name_MAXIMUM_LENGTH
- *
- */
- /*
- * NSSPKIXX520Name_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Name upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520Name *
- NSSPKIXX520Name_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520Name_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_STRING
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Name upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520Name *
- NSSPKIXX520Name_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520Name_Create
- *
- * XXX fgmr: currently nssStringType is a private type. Thus,
- * this public method should not exist. I'm leaving this here
- * to remind us later what we want to decide.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_STRING_TYPE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Name upon success
- * NULL upon failure
- */
- /*
- * NSS_EXTERN NSSPKIXX520Name *
- * NSSPKIXX520Name_Create
- * (
- * NSSArena *arenaOpt,
- * nssStringType type,
- * NSSItem *data
- * );
- */
- /*
- * NSSPKIXX520Name_Destroy
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520Name_Destroy
- (
- NSSPKIXX520Name *name
- );
- /*
- * NSSPKIXX520Name_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520Name_Encode
- (
- NSSPKIXX520Name *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520Name_GetUTF8Encoding
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXX520Name_GetUTF8Encoding
- (
- NSSPKIXX520Name *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520Name_Equal
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXX520Name_Equal
- (
- NSSPKIXX520Name *name1,
- NSSPKIXX520Name *name2,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXX520Name_Duplicate
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Name upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520Name *
- NSSPKIXX520Name_Duplicate
- (
- NSSPKIXX520Name *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520Name_MAXIMUM_LENGTH
- *
- * From RFC 2459:
- *
- * ub-name INTEGER ::= 32768
- */
- extern const PRUint32 NSSPKIXX520Name_MAXIMUM_LENGTH;
- /*
- * X520CommonName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520CommonName ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-common-name)),
- * printableString PrintableString (SIZE (1..ub-common-name)),
- * universalString UniversalString (SIZE (1..ub-common-name)),
- * utf8String UTF8String (SIZE (1..ub-common-name)),
- * bmpString BMPString (SIZE(1..ub-common-name)) }
- *
- * ub-common-name INTEGER ::= 64
- *
- * The public calls for this type:
- *
- * NSSPKIXX520CommonName_Decode
- * NSSPKIXX520CommonName_CreateFromUTF8
- * NSSPKIXX520CommonName_Create (?)
- * NSSPKIXX520CommonName_Destroy
- * NSSPKIXX520CommonName_Encode
- * NSSPKIXX520CommonName_GetUTF8Encoding
- * NSSPKIXX520CommonName_Equal
- * NSSPKIXX520CommonName_Duplicate
- *
- * The public data for this type:
- *
- * NSSPKIXX520CommonName_MAXIMUM_LENGTH
- *
- */
- /*
- * NSSPKIXX520CommonName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520CommonName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520CommonName *
- NSSPKIXX520CommonName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520CommonName_Create
- *
- * XXX fgmr: currently nssStringType is a private type. Thus,
- * this public method should not exist. I'm leaving this here
- * to remind us later what we want to decide.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_STRING_TYPE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520CommonName upon success
- * NULL upon failure
- */
- /*
- * NSS_EXTERN NSSPKIXX520CommonName *
- * NSSPKIXX520CommonName_Create
- * (
- * NSSArena *arenaOpt,
- * nssStringType type,
- * NSSItem *data
- * );
- */
- /*
- * NSSPKIXX520CommonName_Destroy
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_COMMON_NAME
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520CommonName_Destroy
- (
- NSSPKIXX520CommonName *name
- );
- /*
- * NSSPKIXX520CommonName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520CommonName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520CommonName *
- NSSPKIXX520CommonName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520CommonName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_COMMON_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520CommonName_Encode
- (
- NSSPKIXX520CommonName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520CommonName_GetUTF8Encoding
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_COMMON_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXX520CommonName_GetUTF8Encoding
- (
- NSSPKIXX520CommonName *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520CommonName_Equal
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_COMMON_NAME
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXX520CommonName_Equal
- (
- NSSPKIXX520CommonName *name1,
- NSSPKIXX520CommonName *name2,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXX520CommonName_Duplicate
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_COMMON_NAME
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520CommonName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520CommonName *
- NSSPKIXX520CommonName_Duplicate
- (
- NSSPKIXX520CommonName *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXX520CommonName_MAXIMUM_LENGTH
- *
- * From RFC 2459:
- *
- * ub-common-name INTEGER ::= 64
- */
- extern const PRUint32 NSSPKIXX520CommonName_MAXIMUM_LENGTH;
- /*
- * X520LocalityName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520LocalityName ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-locality-name)),
- * printableString PrintableString (SIZE (1..ub-locality-name)),
- * universalString UniversalString (SIZE (1..ub-locality-name)),
- * utf8String UTF8String (SIZE (1..ub-locality-name)),
- * bmpString BMPString (SIZE(1..ub-locality-name)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXX520LocalityName_Decode
- * NSSPKIXX520LocalityName_CreateFromUTF8
- * NSSPKIXX520LocalityName_Encode
- *
- */
- /*
- * NSSPKIXX520LocalityName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520LocalityName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520LocalityName *
- NSSPKIXX520LocalityName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520LocalityName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520LocalityName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520LocalityName *
- NSSPKIXX520LocalityName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520LocalityName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520LocalityName_Encode
- (
- NSSPKIXX520LocalityName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520StateOrProvinceName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520StateOrProvinceName ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-state-name)),
- * printableString PrintableString (SIZE (1..ub-state-name)),
- * universalString UniversalString (SIZE (1..ub-state-name)),
- * utf8String UTF8String (SIZE (1..ub-state-name)),
- * bmpString BMPString (SIZE(1..ub-state-name)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXX520StateOrProvinceName_Decode
- * NSSPKIXX520StateOrProvinceName_CreateFromUTF8
- * NSSPKIXX520StateOrProvinceName_Encode
- *
- */
- /*
- * NSSPKIXX520StateOrProvinceName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520StateOrProvinceName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520StateOrProvinceName *
- NSSPKIXX520StateOrProvinceName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520StateOrProvinceName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520StateOrProvinceName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520StateOrProvinceName *
- NSSPKIXX520StateOrProvinceName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520StateOrProvinceName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520StateOrProvinceName_Encode
- (
- NSSPKIXX520StateOrProvinceName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520OrganizationName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520OrganizationName ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-organization-name)),
- * printableString PrintableString (SIZE (1..ub-organization-name)),
- * universalString UniversalString (SIZE (1..ub-organization-name)),
- * utf8String UTF8String (SIZE (1..ub-organization-name)),
- * bmpString BMPString (SIZE(1..ub-organization-name)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXX520OrganizationName_Decode
- * NSSPKIXX520OrganizationName_CreateFromUTF8
- * NSSPKIXX520OrganizationName_Encode
- *
- */
- /*
- * NSSPKIXX520OrganizationName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520OrganizationName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520OrganizationName *
- NSSPKIXX520OrganizationName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520OrganizationName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520OrganizationName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520OrganizationName *
- NSSPKIXX520OrganizationName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520OrganizationName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520OrganizationName_Encode
- (
- NSSPKIXX520OrganizationName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520OrganizationalUnitName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520OrganizationalUnitName ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-organizational-unit-name)),
- * printableString PrintableString
- * (SIZE (1..ub-organizational-unit-name)),
- * universalString UniversalString
- * (SIZE (1..ub-organizational-unit-name)),
- * utf8String UTF8String (SIZE (1..ub-organizational-unit-name)),
- * bmpString BMPString (SIZE(1..ub-organizational-unit-name)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXX520OrganizationalUnitName_Decode
- * NSSPKIXX520OrganizationalUnitName_CreateFromUTF8
- * NSSPKIXX520OrganizationalUnitName_Encode
- *
- */
- /*
- * NSSPKIXX520OrganizationalUnitName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520OrganizationalUnitName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520OrganizationalUnitName *
- NSSPKIXX520OrganizationalUnitName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520OrganizationalUnitName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520OrganizationalUnitName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520OrganizationalUnitName *
- NSSPKIXX520OrganizationalUnitName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520OrganizationalUnitName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520OrganizationalUnitName_Encode
- (
- NSSPKIXX520OrganizationalUnitName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520Title
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520Title ::= CHOICE {
- * teletexString TeletexString (SIZE (1..ub-title)),
- * printableString PrintableString (SIZE (1..ub-title)),
- * universalString UniversalString (SIZE (1..ub-title)),
- * utf8String UTF8String (SIZE (1..ub-title)),
- * bmpString BMPString (SIZE(1..ub-title)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXX520Title_Decode
- * NSSPKIXX520Title_CreateFromUTF8
- * NSSPKIXX520Title_Encode
- *
- */
- /*
- * NSSPKIXX520Title_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Title upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520Title *
- NSSPKIXX520Title_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520Title_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520Title upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520Title *
- NSSPKIXX520Title_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520Title_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520Title_Encode
- (
- NSSPKIXX520Title *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520dnQualifier
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520dnQualifier ::= PrintableString
- *
- * The public calls for this type:
- *
- * NSSPKIXX520dnQualifier_Decode
- * NSSPKIXX520dnQualifier_CreateFromUTF8
- * NSSPKIXX520dnQualifier_Encode
- *
- */
- /*
- * NSSPKIXX520dnQualifier_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520dnQualifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520dnQualifier *
- NSSPKIXX520dnQualifier_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520dnQualifier_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520dnQualifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520dnQualifier *
- NSSPKIXX520dnQualifier_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520dnQualifier_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520dnQualifier_Encode
- (
- NSSPKIXX520dnQualifier *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * X520countryName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * X520countryName ::= PrintableString (SIZE (2)) -- IS 3166 codes
- *
- * The public calls for this type:
- *
- * NSSPKIXX520countryName_Decode
- * NSSPKIXX520countryName_CreateFromUTF8
- * NSSPKIXX520countryName_Encode
- *
- */
- /*
- * NSSPKIXX520countryName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520countryName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520countryName *
- NSSPKIXX520countryName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXX520countryName_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXX520countryName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXX520countryName *
- NSSPKIXX520countryName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXX520countryName_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXX520countryName_Encode
- (
- NSSPKIXX520countryName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * Pkcs9email
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * Pkcs9email ::= IA5String (SIZE (1..ub-emailaddress-length))
- *
- * The public calls for this type:
- *
- * NSSPKIXPkcs9email_Decode
- * NSSPKIXPkcs9email_CreateFromUTF8
- * NSSPKIXPkcs9email_Encode
- *
- */
- /*
- * NSSPKIXPkcs9email_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXPkcs9email upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXPkcs9email *
- NSSPKIXPkcs9email_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXPkcs9email_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXPkcs9email upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXPkcs9email *
- NSSPKIXPkcs9email_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXPkcs9email_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_X520_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXPkcs9email_Encode
- (
- NSSPKIXPkcs9email *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * Name
- *
- * This structure contains a union of the possible name formats,
- * which at the moment is limited to an RDNSequence.
- *
- * From RFC 2459:
- *
- * Name ::= CHOICE { -- only one possibility for now --
- * rdnSequence RDNSequence }
- *
- * The public calls for this type:
- *
- * NSSPKIXName_Decode
- * NSSPKIXName_CreateFromUTF8
- * NSSPKIXName_Create
- * NSSPKIXName_CreateFromRDNSequence
- * NSSPKIXName_Destroy
- * NSSPKIXName_Encode
- * NSSPKIXName_GetUTF8Encoding
- * NSSPKIXName_GetChoice
- * NSSPKIXName_GetRDNSequence
- * NSSPKIXName_GetSpecifiedChoice {fgmr remove this}
- * NSSPKIXName_SetRDNSequence
- * NSSPKIXName_SetSpecifiedChoice
- * NSSPKIXName_Equal
- * NSSPKIXName_Duplicate
- *
- * (here is where I had specific attribute value gettors in pki1)
- *
- */
- /*
- * NSSPKIXName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXName_CreateFromUTF8
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_STRING
- * NSS_ERROR_UNKNOWN_ATTRIBUTE
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *string
- );
- /*
- * NSSPKIXName_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_CHOICE
- * NSS_ERROR_INVALID_ARGUMENT
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXName_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXNameChoice choice,
- void *arg
- );
- /*
- * NSSPKIXName_CreateFromRDNSequence
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXName_CreateFromRDNSequence
- (
- NSSArena *arenaOpt,
- NSSPKIXRDNSequence *rdnSequence
- );
- /*
- * NSSPKIXName_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXName_Destroy
- (
- NSSPKIXName *name
- );
- /*
- * NSSPKIXName_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXName_Encode
- (
- NSSPKIXName *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXName_GetUTF8Encoding
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSUTF8 pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXName_GetUTF8Encoding
- (
- NSSPKIXName *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXName_GetChoice
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- *
- * Return value:
- * A valid element of the NSSPKIXNameChoice enumeration upon success
- * The value NSSPKIXNameChoice_NSSinvalid (-1) upon error
- */
- NSS_EXTERN NSSPKIXNameChoice
- NSSPKIXName_GetChoice
- (
- NSSPKIXName *name
- );
- /*
- * NSSPKIXName_GetRDNSequence
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_WRONG_CHOICE
- *
- * Return value:
- * A pointer to a valid NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXName_GetRDNSequence
- (
- NSSPKIXName *name,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXName_GetSpecifiedChoice
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_WRONG_CHOICE
- *
- * Return value:
- * A valid pointer ...
- * NULL upon failure
- */
- NSS_EXTERN void *
- NSSPKIXName_GetSpecifiedChoice
- (
- NSSPKIXName *name,
- NSSPKIXNameChoice choice,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXName_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXName_Equal
- (
- NSSPKIXName *name1,
- NSSPKIXName *name2,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXName_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXName_Duplicate
- (
- NSSPKIXName *name,
- NSSArena *arenaOpt
- );
- /*
- * RDNSequence
- *
- * This structure contains a sequence of RelativeDistinguishedName
- * objects.
- *
- * From RFC 2459:
- *
- * RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
- *
- * The public calls for this type:
- *
- * NSSPKIXRDNSequence_Decode
- * NSSPKIXRDNSequence_CreateFromUTF8
- * NSSPKIXRDNSequence_Create
- * NSSPKIXRDNSequence_CreateFromArray
- * NSSPKIXRDNSequence_Destroy
- * NSSPKIXRDNSequence_Encode
- * NSSPKIXRDNSequence_GetUTF8Encoding
- * NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount
- * NSSPKIXRDNSequence_GetRelativeDistinguishedNames
- * NSSPKIXRDNSequence_SetRelativeDistinguishedNames
- * NSSPKIXRDNSequence_GetRelativeDistinguishedName
- * NSSPKIXRDNSequence_SetRelativeDistinguishedName
- * NSSPKIXRDNSequence_AppendRelativeDistinguishedName
- * NSSPKIXRDNSequence_InsertRelativeDistinguishedName
- * NSSPKIXRDNSequence_RemoveRelativeDistinguishedName
- * NSSPKIXRDNSequence_FindRelativeDistinguishedName
- * NSSPKIXRDNSequence_Equal
- * NSSPKIXRDNSequence_Duplicate
- *
- */
- /*
- * NSSPKIXRDNSequence_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXRDNSequence_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXRDNSequence_CreateFromUTF8
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_STRING
- * NSS_ERROR_UNKNOWN_ATTRIBUTE
- *
- * Return value:
- * A valid pointer to an NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXRDNSequence_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *string
- );
- /*
- * NSSPKIXRDNSequence_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * A valid pointer to an NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXRDNSequence_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXRelativeDistinguishedName *rdn1,
- ...
- );
- /*
- * NSSPKIXRDNSequence_CreateFromArray
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * A valid pointer to an NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXRDNSequence_Create
- (
- NSSArena *arenaOpt,
- PRUint32 count,
- NSSPKIXRelativeDistinguishedName *rdns[]
- );
- /*
- * NSSPKIXRDNSequence_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_Destroy
- (
- NSSPKIXRDNSequence *rdnseq
- );
- /*
- * NSSPKIXRDNSequence_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXRDNSequence_Encode
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRDNSequence_GetUTF8Encoding
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSUTF8 pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXRDNSequence_GetUTF8Encoding
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXRDNSequence_GetRelativeDistinguishedNameCount
- (
- NSSPKIXRDNSequence *rdnseq
- );
- /*
- * NSSPKIXRDNSequence_GetRelativeDistinguishedNames
- *
- * This routine returns all of the relative distinguished names in the
- * specified RDN Sequence. {...} If the array is allocated, or if the
- * specified one has extra space, the array will be null-terminated.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_ARRAY_TOO_SMALL
- *
- * Return value:
- * A valid pointer to an array of NSSPKIXRelativeDistinguishedName
- * pointers upon success
- * NULL upon failure.
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName **
- NSSPKIXRDNSequence_GetRelativeDistinguishedNames
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rvOpt[],
- PRInt32 limit,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRDNSequence_SetRelativeDistinguishedNames
- *
- * -- fgmr comments --
- * If the array pointer itself is null, the set is considered empty.
- * If the count is zero but the pointer nonnull, the array will be
- * assumed to be null-terminated.
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_SetRelativeDistinguishedNames
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdns[],
- PRInt32 countOpt
- );
- /*
- * NSSPKIXRDNSequence_GetRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRDNSequence_GetRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRDNSequence_SetRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_SetRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i,
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRDNSequence_AppendRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_AppendRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRDNSequence_InsertRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_InsertRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i,
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRDNSequence_RemoveRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRDNSequence_RemoveRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- PRInt32 i
- );
- /*
- * NSSPKIXRDNSequence_FindRelativeDistinguishedName
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_NOT_FOUND
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * The index of the specified attribute value upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXRDNSequence_FindRelativeDistinguishedName
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRDNSequence_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXRDNSequence_Equal
- (
- NSSPKIXRDNSequence *one,
- NSSPKIXRDNSequence *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXRDNSequence_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXRDNSequence upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRDNSequence *
- NSSPKIXRDNSequence_Duplicate
- (
- NSSPKIXRDNSequence *rdnseq,
- NSSArena *arenaOpt
- );
- /*
- * DistinguishedName
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * DistinguishedName ::= RDNSequence
- *
- * This is just a public typedef; no new methods are required. {fgmr-- right?}
- */
- /*
- * RelativeDistinguishedName
- *
- * This structure contains an unordered set of AttributeTypeAndValue
- * objects. RDNs are used to distinguish a set of objects underneath
- * a common object.
- *
- * Often, a single ATAV is sufficient to make a unique distinction.
- * For example, if a company assigns its people unique uid values,
- * then in the Name "uid=smith,ou=People,o=Acme,c=US" the "uid=smith"
- * ATAV by itself forms an RDN. However, sometimes a set of ATAVs is
- * needed. For example, if a company needed to distinguish between
- * two Smiths by specifying their corporate divisions, then in the
- * Name "(cn=Smith,ou=Sales),ou=People,o=Acme,c=US" the parenthesised
- * set of ATAVs forms the RDN.
- *
- * From RFC 2459:
- *
- * RelativeDistinguishedName ::=
- * SET SIZE (1 .. MAX) OF AttributeTypeAndValue
- *
- * The public calls for this type:
- *
- * NSSPKIXRelativeDistinguishedName_Decode
- * NSSPKIXRelativeDistinguishedName_CreateFromUTF8
- * NSSPKIXRelativeDistinguishedName_Create
- * NSSPKIXRelativeDistinguishedName_CreateFromArray
- * NSSPKIXRelativeDistinguishedName_Destroy
- * NSSPKIXRelativeDistinguishedName_Encode
- * NSSPKIXRelativeDistinguishedName_GetUTF8Encoding
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValues
- * NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValues
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_AddAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_RemoveAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_FindAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_Equal
- * NSSPKIXRelativeDistinguishedName_Duplicate
- *
- * fgmr: Logical additional functions include
- *
- * NSSPKIXRelativeDistinguishedName_FindAttributeTypeAndValueByType
- * returns PRInt32
- * NSSPKIXRelativeDistinguishedName_FindAttributeTypeAndValuesByType
- * returns array of PRInt32
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValueForType
- * returns NSSPKIXAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValuesForType
- * returns array of NSSPKIXAttributeTypeAndValue
- * NSSPKIXRelativeDistinguishedName_GetAttributeValueForType
- * returns NSSPKIXAttributeValue
- * NSSPKIXRelativeDistinguishedName_GetAttributeValuesForType
- * returns array of NSSPKIXAttributeValue
- *
- * NOTE: the "return array" versions are only meaningful if an RDN may
- * contain multiple ATAVs with the same type. Verify in the RFC if
- * this is possible or not. If not, nuke those three functions.
- *
- */
- /*
- * NSSPKIXRelativeDistinguishedName_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRelativeDistinguishedName_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXRelativeDistinguishedName_CreateFromUTF8
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_STRING
- * NSS_ERROR_UNKNOWN_ATTRIBUTE
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRelativeDistinguishedName_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *string
- );
- /*
- * NSSPKIXRelativeDistinguishedName_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_ATAV
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRelativeDistinguishedName_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXAttributeTypeAndValue *atav1,
- ...
- );
- /*
- * NSSPKIXRelativeDistinguishedName_CreateFromArray
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_ATAV
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRelativeDistinguishedName_CreateFromArray
- (
- NSSArena *arenaOpt,
- PRUint32 count,
- NSSPKIXAttributeTypeAndValue *atavs[]
- );
- /*
- * NSSPKIXRelativeDistinguishedName_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRelativeDistinguishedName_Destroy
- (
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRelativeDistinguishedName_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXRelativeDistinguishedName_Encode
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_GetUTF8Encoding
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSUTF8 pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKIXRelativeDistinguishedName_GetUTF8Encoding
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * Nonnegative integer upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValueCount
- (
- NSSPKIXRelativeDistinguishedName *rdn
- );
- /*
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValues
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_ARRAY_TOO_SMALL
- *
- * Return value:
- * A valid pointer to an array of NSSPKIXAttributeTypeAndValue
- * pointers upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue **
- NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValues
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSPKIXAttributeTypeAndValue *rvOpt[],
- PRInt32 limit,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValues
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_ATAV
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValues
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSPKIXAttributeTypeAndValue *atavs[],
- PRInt32 countOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValue
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXAttributeTypeAndValue upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAttributeTypeAndValue *
- NSSPKIXRelativeDistinguishedName_GetAttributeTypeAndValue
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- PRInt32 i,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValue
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValue
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- PRInt32 i,
- NSSPKIXAttributeTypeAndValue *atav
- );
- /*
- * NSSPKIXRelativeDistinguishedName_AddAttributeTypeAndValue
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRelativeDistinguishedName_AddAttributeTypeAndValue
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSPKIXAttributeTypeAndValue *atav
- );
- /*
- * NSSPKIXRelativeDistinguishedName_RemoveAttributeTypeAndValue
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- * NSS_ERROR_AT_MINIMUM
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXRelativeDistinguishedName_RemoveAttributeTypeAndValue
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- PRInt32 i
- );
- /*
- * NSSPKIXRelativeDistinguishedName_FindAttributeTypeAndValue
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_PKIX_ATAV
- * NSS_ERROR_NOT_FOUND
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * The index of the specified attribute value upon success
- * -1 upon failure.
- */
- NSS_EXTERN PRInt32
- NSSPKIXRelativeDistinguishedName_FindAttributeTypeAndValue
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSPKIXAttributeTypeAndValue *atav
- );
- /*
- * NSSPKIXRelativeDistinguishedName_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXRelativeDistinguishedName_Equal
- (
- NSSPKIXRelativeDistinguishedName *one,
- NSSPKIXRelativeDistinguishedName *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXRelativeDistinguishedName_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_RDN
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXRelativeDistinguishedName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXRelativeDistinguishedName *
- NSSPKIXRelativeDistinguishedName_Duplicate
- (
- NSSPKIXRelativeDistinguishedName *rdn,
- NSSArena *arenaOpt
- );
- /*
- * DirectoryString
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * DirectoryString ::= CHOICE {
- * teletexString TeletexString (SIZE (1..MAX)),
- * printableString PrintableString (SIZE (1..MAX)),
- * universalString UniversalString (SIZE (1..MAX)),
- * utf8String UTF8String (SIZE (1..MAX)),
- * bmpString BMPString (SIZE(1..MAX)) }
- *
- * The public calls for this type:
- *
- * NSSPKIXDirectoryString_Decode
- * NSSPKIXDirectoryString_CreateFromUTF8
- * NSSPKIXDirectoryString_Encode
- *
- */
- /*
- * NSSPKIXDirectoryString_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXDirectoryString upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXDirectoryString *
- NSSPKIXDirectoryString_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXDirectoryString_CreateFromUTF8
- *
- * { basically just enforces the length limit }
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXDirectoryString upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXDirectoryString *
- NSSPKIXDirectoryString_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXDirectoryString_Encode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_DIRECTORY_STRING
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXDirectoryString_Encode
- (
- NSSPKIXDirectoryString *name,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * Certificate
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * Certificate ::= SEQUENCE {
- * tbsCertificate TBSCertificate,
- * signatureAlgorithm AlgorithmIdentifier,
- * signature BIT STRING }
- *
- * The public calls for this type:
- *
- * NSSPKIXCertificate_Decode
- * NSSPKIXCertificate_Create
- * NSSPKIXCertificate_Destroy
- * NSSPKIXCertificate_Encode
- * NSSPKIXCertificate_GetTBSCertificate
- * NSSPKIXCertificate_SetTBSCertificate
- * NSSPKIXCertificate_GetAlgorithmIdentifier
- * NSSPKIXCertificate_SetAlgorithmIdentifier
- * NSSPKIXCertificate_GetSignature
- * NSSPKIXCertificate_SetSignature
- * NSSPKIXCertificate_Equal
- * NSSPKIXCertificate_Duplicate
- *
- * { inherit TBSCertificate gettors? }
- *
- */
- /*
- * NSSPKIXCertificate_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXCertificate *
- NSSPKIXCertificate_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXCertificate_Create
- *
- * -- fgmr comments --
- * { at this level we'll have to just accept a specified signature }
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_ALGID
- * NSS_ERROR_INVALID_PKIX_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXCertificate *
- NSSPKIXCertificate_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXAlgorithmIdentifier *algID,
- NSSItem *signature
- );
- /*
- * NSSPKIXCertificate_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXCertificate_Destroy
- (
- NSSPKIXCertificate *cert
- );
- /*
- * NSSPKIXCertificate_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXCertificate_Encode
- (
- NSSPKIXCertificate *cert,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXCertificate_GetTBSCertificate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXTBSCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXTBSCertificate *
- NSSPKIXCertificate_GetTBSCertificate
- (
- NSSPKIXCertificate *cert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXCertificate_SetTBSCertificate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXCertificate_SetTBSCertificate
- (
- NSSPKIXCertificate *cert,
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * NSSPKIXCertificate_GetAlgorithmIdentifier
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXAlgorithmIdentifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAlgorithmIdentifier *
- NSSPKIXCertificate_GetAlgorithmIdentifier
- (
- NSSPKIXCertificate *cert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXCertificate_SetAlgorithmIdentifier
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_ALGORITHM_IDENTIFIER
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXCertificate_SetAlgorithmIdentifier
- (
- NSSPKIXCertificate *cert,
- NSSPKIXAlgorithmIdentifier *algid,
- );
- /*
- * NSSPKIXCertificate_GetSignature
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSItem upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSItem *
- NSSPKIXCertificate_GetSignature
- (
- NSSPKIXCertificate *cert,
- NSSItem *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXCertificate_SetSignature
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_POINTER
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXCertificate_SetSignature
- (
- NSSPKIXCertificate *cert,
- NSSItem *signature
- );
- /*
- * NSSPKIXCertificate_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXCertificate_Equal
- (
- NSSPKIXCertificate *one,
- NSSPKIXCertificate *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXCertificate_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXCertificate *
- NSSPKIXCertificate_Duplicate
- (
- NSSPKIXCertificate *cert,
- NSSArena *arenaOpt
- );
- /*
- * TBSCertificate
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * TBSCertificate ::= SEQUENCE {
- * version [0] Version DEFAULT v1,
- * serialNumber CertificateSerialNumber,
- * signature AlgorithmIdentifier,
- * issuer Name,
- * validity Validity,
- * subject Name,
- * subjectPublicKeyInfo SubjectPublicKeyInfo,
- * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
- * -- If present, version shall be v2 or v3
- * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
- * -- If present, version shall be v2 or v3
- * extensions [3] Extensions OPTIONAL
- * -- If present, version shall be v3 -- }
- *
- * The public calls for this type:
- *
- * NSSPKIXTBSCertificate_Decode
- * NSSPKIXTBSCertificate_Create
- * NSSPKIXTBSCertificate_Destroy
- * NSSPKIXTBSCertificate_Encode
- * NSSPKIXTBSCertificate_GetVersion
- * NSSPKIXTBSCertificate_SetVersion
- * NSSPKIXTBSCertificate_GetSerialNumber
- * NSSPKIXTBSCertificate_SetSerialNumber
- * NSSPKIXTBSCertificate_GetSignature
- * NSSPKIXTBSCertificate_SetSignature
- * { inherit algid gettors? }
- * NSSPKIXTBSCertificate_GetIssuer
- * NSSPKIXTBSCertificate_SetIssuer
- * { inherit "helper" issuer gettors? }
- * NSSPKIXTBSCertificate_GetValidity
- * NSSPKIXTBSCertificate_SetValidity
- * { inherit validity accessors }
- * NSSPKIXTBSCertificate_GetSubject
- * NSSPKIXTBSCertificate_SetSubject
- * NSSPKIXTBSCertificate_GetSubjectPublicKeyInfo
- * NSSPKIXTBSCertificate_SetSubjectPublicKeyInfo
- * NSSPKIXTBSCertificate_HasIssuerUniqueID
- * NSSPKIXTBSCertificate_GetIssuerUniqueID
- * NSSPKIXTBSCertificate_SetIssuerUniqueID
- * NSSPKIXTBSCertificate_RemoveIssuerUniqueID
- * NSSPKIXTBSCertificate_HasSubjectUniqueID
- * NSSPKIXTBSCertificate_GetSubjectUniqueID
- * NSSPKIXTBSCertificate_SetSubjectUniqueID
- * NSSPKIXTBSCertificate_RemoveSubjectUniqueID
- * NSSPKIXTBSCertificate_HasExtensions
- * NSSPKIXTBSCertificate_GetExtensions
- * NSSPKIXTBSCertificate_SetExtensions
- * NSSPKIXTBSCertificate_RemoveExtensions
- * { extension accessors }
- * NSSPKIXTBSCertificate_Equal
- * NSSPKIXTBSCertificate_Duplicate
- */
- /*
- * NSSPKIXTBSCertificate_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXTBSCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXTBSCertificate *
- NSSPKIXTBSCertificate_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXTBSCertificate_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_VERSION
- * NSS_ERROR_INVALID_PKIX_CERTIFICATE_SERIAL_NUMBER
- * NSS_ERROR_INVALID_PKIX_ALGORITHM_IDENTIFIER
- * NSS_ERROR_INVALID_ISSUER_NAME
- * NSS_ERROR_INVALID_VALIDITY
- * NSS_ERROR_INVALID_SUBJECT_NAME
- * NSS_ERROR_INVALID_SUBJECT_PUBLIC_KEY_INFO
- * NSS_ERROR_INVALID_ISSUER_UNIQUE_IDENTIFIER
- * NSS_ERROR_INVALID_SUBJECT_UNIQUE_IDENTIFIER
- * NSS_ERROR_INVALID_EXTENSION
- *
- * Return value:
- */
- NSS_EXTERN NSSPKIXTBSCertificate *
- NSSPKIXTBSCertificate_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXVersion version,
- NSSPKIXCertificateSerialNumber *serialNumber,
- NSSPKIXAlgorithmIdentifier *signature,
- NSSPKIXName *issuer,
- NSSPKIXValidity *validity,
- NSSPKIXName *subject,
- NSSPKIXSubjectPublicKeyInfo *spki,
- NSSPKIXUniqueIdentifier *issuerUniqueID,
- NSSPKIXUniqueIdentifier *subjectUniqueID,
- NSSPKIXExtensions *extensions
- );
- /*
- * NSSPKIXTBSCertificate_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_Destroy
- (
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * NSSPKIXTBSCertificate_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXTBSCertificate_Encode
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_GetVersion
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * A valid element of the NSSPKIXVersion enumeration upon success
- * NSSPKIXVersion_NSSinvalid (-1) upon failure
- */
- NSS_EXTERN NSSPKIXVersion
- NSSPKIXTBSCertificate_GetVersion
- (
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * NSSPKIXTBSCertificate_SetVersion
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_VERSION
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetVersion
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXVersion version
- );
- /*
- * NSSPKIXTBSCertificate_GetSerialNumber
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXCertificateSerialNumber upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXCertificateSerialNumber *
- NSSPKIXTBSCertificate_GetSerialNumber
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXCertificateSerialNumber *snOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetSerialNumber
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetSerialNumber
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXCertificateSerialNumber *sn
- );
- /*
- * NSSPKIXTBSCertificate_GetSignature
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXAlgorithmIdentifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXAlgorithmIdentifier *
- NSSPKIXTBSCertificate_GetSignature
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetSignature
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetSignature
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXAlgorithmIdentifier *algID
- );
- /*
- * { fgmr inherit algid gettors? }
- */
- /*
- * NSSPKIXTBSCertificate_GetIssuer
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXTBSCertificate_GetIssuer
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetIssuer
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetIssuer
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXName *issuer
- );
- /*
- * { inherit "helper" issuer gettors? }
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- *
- * Return value:
- */
- /*
- * NSSPKIXTBSCertificate_GetValidity
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXValidity upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXValidity *
- NSSPKIXTBSCertificate_GetValidity
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetValidity
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetValidity
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXValidity *validity
- );
- /*
- * { fgmr inherit validity accessors }
- */
- /*
- * NSSPKIXTBSCertificate_GetSubject
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXName upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXName *
- NSSPKIXTBSCertificate_GetSubject
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetSubject
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_NAME
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetSubject
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXName *subject
- );
- /*
- * NSSPKIXTBSCertificate_GetSubjectPublicKeyInfo
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXSubjectPublicKeyInfo upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXSubjectPublicKeyInfo *
- NSSPKIXTBSCertificate_GetSubjectPublicKeyInfo
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetSubjectPublicKeyInfo
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_SUBJECT_PUBLIC_KEY_INFO
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetSubjectPublicKeyInfo
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXSubjectPublicKeyInfo *spki
- );
- /*
- * NSSPKIXTBSCertificate_HasIssuerUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- *
- * Return value:
- * PR_TRUE if it has one
- * PR_FALSE if it doesn't
- * PR_FALSE upon failure
- */
- NSS_EXTERN PRBool
- NSSPKIXTBSCertificate_HasIssuerUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTBSCertificate_GetIssuerUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_CERT_HAS_NO_ISSUER_UNIQUE_ID
- *
- * Return value:
- * A valid pointer to an NSSPKIXUniqueIdentifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXUniqueIdentifier *
- NSSPKIXTBSCertificate_GetIssuerUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXUniqueIdentifier *uidOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetIssuerUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetIssuerUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXUniqueIdentifier *uid
- );
- /*
- * NSSPKIXTBSCertificate_RemoveIssuerUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_CERT_HAS_NO_ISSUER_UNIQUE_ID
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_RemoveIssuerUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * NSSPKIXTBSCertificate_HasSubjectUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- *
- * Return value:
- * PR_TRUE if it has one
- * PR_FALSE if it doesn't
- * PR_FALSE upon failure
- */
- NSS_EXTERN PRBool
- NSSPKIXTBSCertificate_HasSubjectUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTBSCertificate_GetSubjectUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_CERT_HAS_NO_SUBJECT_UNIQUE_ID
- *
- * Return value:
- * A valid pointer to an NSSPKIXUniqueIdentifier upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXUniqueIdentifier *
- NSSPKIXTBSCertificate_GetSubjectUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXUniqueIdentifier *uidOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetSubjectUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ITEM
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetSubjectUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXUniqueIdentifier *uid
- );
- /*
- * NSSPKIXTBSCertificate_RemoveSubjectUniqueID
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_CERT_HAS_NO_SUBJECT_UNIQUE_ID
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_RemoveSubjectUniqueID
- (
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * NSSPKIXTBSCertificate_HasExtensions
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- *
- * Return value:
- * PR_TRUE if it has one
- * PR_FALSE if it doesn't
- * PR_FALSE upon failure
- */
- NSS_EXTERN PRBool
- NSSPKIXTBSCertificate_HasExtensions
- (
- NSSPKIXTBSCertificate *tbsCert,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTBSCertificate_GetExtensions
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_CERT_HAS_NO_EXTENSIONS
- *
- * Return value:
- * A valid pointer to an NSSPKIXExtensions upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXExtensions *
- NSSPKIXTBSCertificate_GetExtensions
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTBSCertificate_SetExtensions
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_PKIX_EXTENSIONS
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_SetExtensions
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSPKIXExtensions *extensions
- );
- /*
- * NSSPKIXTBSCertificate_RemoveExtensions
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_CERT_HAS_NO_EXTENSIONS
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXTBSCertificate_RemoveExtensions
- (
- NSSPKIXTBSCertificate *tbsCert
- );
- /*
- * { extension accessors }
- */
- /*
- * NSSPKIXTBSCertificate_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXTBSCertificate_Equal
- (
- NSSPKIXTBSCertificate *one,
- NSSPKIXTBSCertificate *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTBSCertificate_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_TBS_CERTIFICATE
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXTBSCertificate upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXTBSCertificate *
- NSSPKIXTBSCertificate_Duplicate
- (
- NSSPKIXTBSCertificate *tbsCert,
- NSSArena *arenaOpt
- );
- /*
- * CertificateSerialNumber
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * CertificateSerialNumber ::= INTEGER
- *
- * This is just a typedef'd NSSBER; no methods are required.
- * {fgmr -- the asn.1 stuff should have routines to convert
- * integers to natural types when possible and vv. we can
- * refer to them here..}
- */
- /*
- * Validity
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * Validity ::= SEQUENCE {
- * notBefore Time,
- * notAfter Time }
- *
- * The public calls for the type:
- *
- * NSSPKIXValidity_Decode
- * NSSPKIXValidity_Create
- * NSSPKIXValidity_Encode
- * NSSPKIXValidity_Destroy
- * NSSPKIXValidity_GetNotBefore
- * NSSPKIXValidity_SetNotBefore
- * NSSPKIXValidity_GetNotAfter
- * NSSPKIXValidity_SetNotAfter
- * NSSPKIXValidity_Equal
- * NSSPKIXValidity_Compare
- * NSSPKIXValidity_Duplicate
- *
- */
- /*
- * NSSPKIXValidity_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXValidity upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXValidity *
- NSSPKIXValidity_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXValidity_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_TIME
- *
- * Return value:
- * A valid pointer to an NSSPKIXValidity upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXValidity *
- NSSPKIXValidity_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXTime notBefore,
- NSSPKIXTime notAfter
- );
- /*
- * NSSPKIXValidity_Destroy
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXValidity_Destroy
- (
- NSSPKIXValidity *validity
- );
- /*
- * NSSPKIXValidity_Encode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid NSSBER pointer upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSBER *
- NSSPKIXValidity_Encode
- (
- NSSPKIXValidity *validity,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXValidity_GetNotBefore
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * A valid NSSPKIXTime upon success
- * {we need to rethink NSSPKIXTime}
- */
- NSS_EXTERN NSSPKIXTime
- NSSPKIXValidity_GetNotBefore
- (
- NSSPKIXValidity *validity
- );
- /*
- * NSSPKIXValidity_SetNotBefore
- *
- * -- fgmr comments --
- * {do we require that it be before the "notAfter" value?}
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_VALUE_TOO_LARGE
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXValidity_SetNotBefore
- (
- NSSPKIXValidity *validity,
- NSSPKIXTime notBefore
- );
- /*
- * NSSPKIXValidity_GetNotAfter
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_VALUE_OUT_OF_RANGE
- *
- * Return value:
- * A valid NSSPKIXTime upon success
- * {we need to rethink NSSPKIXTime}
- */
- NSS_EXTERN NSSPKIXTime
- NSSPKIXValidity_GetNotAfter
- (
- NSSPKIXValidity *validity
- );
- /*
- * NSSPKIXValidity_SetNotAfter
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_VALUE_TOO_SMALL
- *
- * Return value:
- * PR_SUCCESS upon success
- * PR_FAILURE upon failure
- */
- NSS_EXTERN PRStatus
- NSSPKIXValidity_SetNotAfter
- (
- NSSPKIXValidity *validity,
- NSSPKIXTime notAfter
- );
- /*
- * NSSPKIXValidity_Equal
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- *
- * Return value:
- * PR_TRUE if the two objects have equal values
- * PR_FALSE otherwise
- * PR_FALSE upon error
- */
- NSS_EXTERN PRBool
- NSSPKIXValidity_Equal
- (
- NSSPKIXValidity *one,
- NSSPKIXValidity *two,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXValidity_Compare
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- *
- * Return value:
- * 1 if the second is "greater" or later than the first
- * 0 if they are equal
- * -1 if the first is "greater" or later than the first
- * -2 upon failure
- */
- NSS_EXTERN PRIntn
- NSSPKIXValidity_Compare
- (
- NSSPKIXValidity *one,
- NSSPKIXValidity *two
- );
- /*
- * NSSPKIXValidity_Duplicate
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_PKIX_VALIDITY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_NO_MEMORY
- *
- * Return value:
- * A valid pointer to an NSSPKIXValidity upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXValidity *
- NSSPKIXValidity_Duplicate
- (
- NSSPKIXValidity *validity,
- NSSArena *arenaOpt
- );
- /*
- * Time
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * Time ::= CHOICE {
- * utcTime UTCTime,
- * generalTime GeneralizedTime }
- *
- * The public calls for the type:
- *
- * NSSPKIXTime_Decode
- * NSSPKIXTime_CreateFromPRTime
- * NSSPKIXTime_CreateFromUTF8
- * NSSPKIXTime_Destroy
- * NSSPKIXTime_Encode
- * NSSPKIXTime_GetPRTime
- * NSSPKIXTime_GetUTF8Encoding
- * NSSPKIXTime_Equal
- * NSSPKIXTime_Duplicate
- * NSSPKIXTime_Compare
- *
- */
- /*
- * NSSPKIXTime_Decode
- *
- *
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXTime upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXTime *
- NSSPKIXTime_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXTime_CreateFromPRTime
- *
- */
- NSS_EXTERN NSSPKIXTime *
- NSSPKIXTime_CreateFromPRTime
- (
- NSSArena *arenaOpt,
- PRTime prTime
- );
- /*
- * NSSPKIXTime_CreateFromUTF8
- *
- */
- NSS_EXTERN NSSPKIXTime *
- NSSPKIXTime_CreateFromUTF8
- (
- NSSArena *arenaOpt,
- NSSUTF8 *utf8
- );
- /*
- * NSSPKIXTime_Destroy
- *
- */
- NSS_EXTERN PR_STATUS
- NSSPKIXTime_Destroy
- (
- NSSPKIXTime *time
- );
- /*
- * NSSPKIXTime_Encode
- *
- */
- NSS_EXTERN NSSBER *
- NSSPKIXTime_Encode
- (
- NSSPKIXTime *time,
- NSSASN1EncodingType encoding,
- NSSBER *rvOpt,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTime_GetPRTime
- *
- * Returns a zero on error
- */
- NSS_EXTERN PRTime
- NSSPKIXTime_GetPRTime
- (
- NSSPKIXTime *time,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTime_GetUTF8Encoding
- *
- */
- NSS_EXTERN NSSUTF8 *
- NSSPKXITime_GetUTF8Encoding
- (
- NSSPKIXTime *time,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTime_Equal
- *
- */
- NSS_EXTERN PRBool
- NSSPKXITime_Equal
- (
- NSSPKXITime *time1,
- NSSPKXITime *time2,
- PRStatus *statusOpt
- );
- /*
- * NSSPKIXTime_Duplicate
- *
- */
- NSS_EXTERN NSSPKIXTime *
- NSSPKXITime_Duplicate
- (
- NSSPKIXTime *time,
- NSSArena *arenaOpt
- );
- /*
- * NSSPKIXTime_Compare
- *
- * Usual result: -1, 0, 1
- * Returns 0 on error
- */
- NSS_EXTERN PRInt32
- NSSPKIXTime_Compare
- (
- NSSPKIXTime *time1,
- NSSPKIXTime *tiem2,
- PRStatus *statusOpt
- );
- /*
- * UniqueIdentifier
- *
- * -- fgmr comments --
- * Should we distinguish bitstrings from "regular" items/BERs?
- * It could be another typedef, but with a separate type to help
- * remind users about the factor of 8. OR we could make it a
- * hard type, and require the use of some (trivial) converters.
- *
- * From RFC 2459:
- *
- * UniqueIdentifier ::= BIT STRING
- *
- */
- /*
- * SubjectPublicKeyInfo
- *
- * -- fgmr comments --
- *
- * From RFC 2459:
- *
- * SubjectPublicKeyInfo ::= SEQUENCE {
- * algorithm AlgorithmIdentifier,
- * subjectPublicKey BIT STRING }
- *
- * The public calls for the type:
- *
- * NSSPKIXSubjectPublicKeyInfo_Decode
- * NSSPKIXSubjectPublicKeyInfo_Create
- * NSSPKIXSubjectPublicKeyInfo_Encode
- * NSSPKIXSubjectPublicKeyInfo_Destroy
- * NSSPKIXSubjectPublicKeyInfo_GetAlgorithm
- * NSSPKIXSubjectPublicKeyInfo_SetAlgorithm
- * NSSPKIXSubjectPublicKeyInfo_GetSubjectPublicKey
- * NSSPKIXSubjectPublicKeyInfo_SetSubjectPublicKey
- * NSSPKIXSubjectPublicKeyInfo_Equal
- * NSSPKIXSubjectPublicKeyInfo_Duplicate
- *
- */
- /*
- * NSSPKIXSubjectPublicKeyInfo_Decode
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_INVALID_BER
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- *
- * Return value:
- * A valid pointer to an NSSPKIXSubjectPublicKeyInfo upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXSubjectPublicKeyInfo *
- NSSPKIXSubjectPublicKeyInfo_Decode
- (
- NSSArena *arenaOpt,
- NSSBER *ber
- );
- /*
- * NSSPKIXSubjectPublicKeyInfo_Create
- *
- * -- fgmr comments --
- *
- * The error may be one of the following values:
- * NSS_ERROR_NO_MEMORY
- * NSS_ERROR_INVALID_ARENA
- * NSS_ERROR_INVALID_PKIX_ALGORITHM_IDENTIFIER
- * NSS_ERROR_INVALID_ITEM
- *
- * Return value:
- * A valid pointer to an NSSPKIXSubjectPublicKeyInfo upon success
- * NULL upon failure
- */
- NSS_EXTERN NSSPKIXSubjectPublicKeyInfo *
- NSSPKIXSubjectPublicKeyInfo_Create
- (
- NSSArena *arenaOpt,
- NSSPKIXAlgorithmIdentifier *algid,
- NSSItem *subjectPublicKey
- );