nsspkix.h

来自「支持SSL v2/v3, TLS, PKCS #5, PKCS #7, PKCS」· C头文件 代码 · 共 3,005 行 · 第 1/5 页

H
3,005
字号
/* * 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);/* * 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 PRStatusNSSPKIXRelativeDistinguishedName_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 PRInt32NSSPKIXRelativeDistinguishedName_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 PRStatusNSSPKIXRelativeDistinguishedName_SetAttributeTypeAndValues(  NSSPKIXRelativeDistinguishedName *rdn,  NSSPKIXAttributeTypeAndValue *atavs[],  PRInt32 countOpt);/* * NSSPKIXRelativeDistinguish

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?