nsspki1.h
来自「支持SSL v2/v3, TLS, PKCS #5, PKCS #7, PKCS」· C头文件 代码 · 共 2,342 行 · 第 1/5 页
H
2,342 行
* The error may be one fo the following values: * NSS_ERROR_INVALID_CHOICE * NSS_ERROR_INVALID_ARGUMENT * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A pointer to an NSSGeneralName upon success */NSS_EXTERN NSSGeneralName *NSSGeneralName_Create( NSSGeneralNameChoice choice, void *arg);/* * NSSGeneralName_Destroy * * This routine will destroy a General Name object. It should * eventually be called on all General Names created without an arena. * While it is not necessary to call it on General Names created within * an arena, it is not an error to do so. This routine returns a * PRStatus value; if successful, it will return PR_SUCCESS. If * usuccessful, it will create an error stack and return PR_FAILURE. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * * Return value: * PR_FAILURE upon failure * PR_SUCCESS upon success */NSS_EXTERN PRStatusNSSGeneralName_Destroy( NSSGeneralName *generalName);/* * NSSGeneralName_GetDEREncoding * * This routine will DER-encode a name object. If the optional arena * argument is non-null, the memory used will be obtained from that * arena; otherwise, the memory will be obtained from the heap. This * routine may return null upon error, in which case it will have * created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * The DER encoding of this NSSGeneralName */NSS_EXTERN NSSDER *NSSGeneralName_GetDEREncoding( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetUTF8Encoding * * This routine returns a UTF8 string containing a string * representation of the General Name in the format specified by the * underlying name choice. If the optional arena argument is * non-null, the memory used will be obtained from that arena; * otherwise, the memory will be obtained from the heap. This routine * may return NULL upon error, in which case it will have created an * error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A pointer to a UTF8 string */NSS_EXTERN NSSUTF8 *NSSGeneralName_GetUTF8Encoding( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetChoice * * This routine returns the type of choice underlying the specified * general name. The return value will be a member of the * NSSGeneralNameChoice enumeration. This routine may return * NSSGeneralNameChoiceInvalid upon error, in which case it will have * created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * * Return value: * NSSGeneralNameChoiceInvalid upon error * An other member of the NSSGeneralNameChoice enumeration */NSS_EXTERN NSSGeneralNameChoiceNSSGeneralName_GetChoice( NSSGeneralName *generalName);/* * NSSGeneralName_GetOtherName * * If the choice underlying the specified NSSGeneralName is that of an * Other Name, this routine will return a pointer to that Other name. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSOtherName */NSS_EXTERN NSSOtherName *NSSGeneralName_GetOtherName( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetRfc822Name * * If the choice underlying the specified NSSGeneralName is that of an * RFC 822 Name, this routine will return a pointer to that name. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSRFC822Name */NSS_EXTERN NSSRFC822Name *NSSGeneralName_GetRfc822Name( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetDNSName * * If the choice underlying the specified NSSGeneralName is that of a * DNS Name, this routine will return a pointer to that DNS name. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSDNSName */NSS_EXTERN NSSDNSName *NSSGeneralName_GetDNSName( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetX400Address * * If the choice underlying the specified NSSGeneralName is that of an * X.400 Address, this routine will return a pointer to that Address. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSX400Address */NSS_EXTERN NSSX400Address *NSSGeneralName_GetX400Address( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetDirectoryName * * If the choice underlying the specified NSSGeneralName is that of a * (directory) Name, this routine will return a pointer to that name. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSName */NSS_EXTERN NSSName *NSSGeneralName_GetName( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetEdiPartyName * * If the choice underlying the specified NSSGeneralName is that of an * EDI Party Name, this routine will return a pointer to that name. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSEdiPartyName */NSS_EXTERN NSSEdiPartyName *NSSGeneralName_GetEdiPartyName( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetUniformResourceIdentifier * * If the choice underlying the specified NSSGeneralName is that of a * URI, this routine will return a pointer to that URI. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSURI */NSS_EXTERN NSSURI *NSSGeneralName_GetUniformResourceIdentifier( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetIPAddress * * If the choice underlying the specified NSSGeneralName is that of an * IP Address , this routine will return a pointer to that address. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSIPAddress */NSS_EXTERN NSSIPAddress *NSSGeneralName_GetIPAddress( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetRegisteredID * * If the choice underlying the specified NSSGeneralName is that of a * Registered ID, this routine will return a pointer to that ID. * Otherwise, this routine will place an error on the error stack, and * return NULL. If the optional arena argument is non-null, the memory * required will be obtained from that arena; otherwise, the memory * will be obtained from the heap. The caller owns the returned * pointer. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer to an NSSRegisteredID */NSS_EXTERN NSSRegisteredID *NSSGeneralName_GetRegisteredID( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetSpecifiedChoice * * If the choice underlying the specified NSSGeneralName matches the * specified choice, a caller-owned pointer to that underlying object * will be returned. Otherwise, an error will be placed on the error * stack and NULL will be returned. If the optional arena argument * is non-null, the memory required will be obtained from that arena; * otherwise, the memory will be obtained from the heap. The caller * owns the returned pointer. This routine may return NULL upon * error, in which caes it will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_WRONG_CHOICE * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A caller-owned pointer, which must be typecast */NSS_EXTERN void *NSSGeneralName_GetSpecifiedChoice( NSSGeneralName *generalName, NSSGeneralNameChoice choice, NSSArena *arenaOpt);/* * NSSGeneralName_Compare * * This routine compares two General Names for equality. For two * General Names to be equal, they must have the same choice of * underlying types, and the underlying values must be equal. The * result of the comparison will be stored at the location pointed * to by the "equalp" variable, which must point to a valid PRBool. * This routine may return PR_FAILURE upon error, in which case it * will have created an error stack. * * The error may be one of the following value: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_INVALID_ARGUMENT * * Return value: * PR_FAILURE upon error * PR_SUCCESS upon a successful comparison (equal or not) */NSS_EXTERN PRStatusNSSGeneralName_Compare( NSSGeneralName *generalName1, NSSGeneralName *generalName2, PRBool *equalp);/* * NSSGeneralName_Duplicate * * This routine duplicates the specified General Name. If the optional * arena argument is non-null, the memory required will be obtained * from that arena; otherwise, the memory will be obtained from the * heap. This routine may return NULL upon error, in which case it * will have created an error stack. * * The error may be one of the following values: * NSS_ERROR_INVALID_GENERAL_NAME * NSS_ERROR_NO_MEMORY * * Return value: * NULL upon error * A pointer to a new NSSGeneralName */NSS_EXTERN NSSGeneralName *NSSGeneralName_Duplicate( NSSGeneralName *generalName, NSSArena *arenaOpt);/* * NSSGeneralName_GetUID * * This routine will attempt to derive a user identifier from the * specified general name, if the choices and content of the name * permit.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?