pkix.h
来自「支持SSL v2/v3, TLS, PKCS #5, PKCS #7, PKCS」· C头文件 代码 · 共 2,998 行 · 第 1/5 页
H
2,998 行
* The private 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 * * In debug builds, the following call is available: * * nssPKIXRDNSequence_verifyPointer * *//* * 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_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_CreateFromArray( NSSArena *arenaOpt, PRUint32 count, NSSPKIXRelativeDistinguishedName *rdn1);/* * 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_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 PRStatusnssPKIXRDNSequence_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 PRInt32nssPKIXRDNSequence_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 PRStatusnssPKIXRDNSequence_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 PRStatusnssPKIXRDNSequence_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 PRStatusnssPKIXRDNSequence_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 PRStatusnssPKIXRDNSequence_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 PRStatusnssPKIXRDNSequence_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 PRInt32nssPKIXRDNSequence_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 PRBoolnssPKIXRDNSequence_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);#ifdef DEBUG/* * nssPKIXRDNSequence_verifyPointer * * This method is only present in debug builds. * * If the specified pointer is a valid pointer to an NSSPKIXRDNSequence * object, this routine will return PR_SUCCESS. Otherwise, it will * put an error on the error stack and return PR_FAILURE. * * The error may be one of the following values: * NSS_ERROR_INVALID_PKIX_RDN_SEQUENCE * * Return value: * PR_SUCCESS if the pointer is valid * PR_FAILURE if it isn't */NSS_EXTERN PRStatusnssPKIXRDNSequence_verifyPointer( NSSPKIXRDNSequence *p);#endif /* DEBUG *//* * 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 private 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. * * In debug builds, the following call is available: * * nssPKIXRelativeDistinguishedName_verifyPointer * *//* * 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 upo
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?