cmtcmn.h

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

H
1,671
字号
 * successfully accepted the data and updated its internal state.  Any other  * return value indicates an error and the state of the hashing context is * undefined from this point forward. */CMTStatus CMT_HASH_Update(PCMT_CONTROL control, CMUint32 connectionID,                           const unsigned char * buf, CMUint32 len);/* * FUNCTION: CMT_HASH_End * ---------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    connectionID *        The resource ID of a hashing context on the psm server. *    result *        A pre-allocated buffer where the library can place the hash of *        the data that was fed to the hashing context. *    resultlen *        A pointer to a pre-allocated CMUint32 where the library can place *        the length of the hash returned via the parameter result. *    maxLen *        The alocated length of the buffer "result" that is passed in.  The  *        library will not write the hash out to "result" if the length of *        the hash of the data is greater than this parameter. * * NOTES * This function tells the psm server that no more data will be fed to  * the hashing context.  The hashing context finishes its hashing operation * and places the final hash of the processed data in the buffer result and * places the length of the resultant hash at *result. * * RETURN * A return value of CMTSuccess indicates the hashing context successfully  * finished the hashing operation and placed the resulting hash in the buffer * "result" as well as the hash's length at *resultLen.  Any other return  * value indicates an error and the values in buffer and *resultLen should  * ignored. */CMTStatus CMT_HASH_End(PCMT_CONTROL control, CMUint32 connectionID,                        unsigned char * result, CMUint32 * resultlen,                        CMUint32 maxLen);/* Resources *//* * FUNCTION: CMT_GetNumericAttribute * --------------------------------- *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server which the  *        application wants to retrieve an attribute for. *    fieldID *        The numerical representation of the attribute the application wants *        to retrieve. *    value *        A pointer to a pre-allocated CMUint32 where the library can place *        a copy of the numeric attribute retrieved from the resource on the *        psm server * * NOTES * This function requests that the psm server query a resource for a numeric  * attribute.  The fieldID should be one of the enumerations defined by  * the enumeration SSMAttributeID.  Each resource has a set of attributes * that can be retrieved from the psm server.  Refer to the function where * a resource is created for a list of attributes that a given resource has. * * RETURN * A return value of CMTSuccess indicates the resource on the psm server  * returned the requested numeric attribute and the corresponding attribute  * value can be found at *value.  Any other return value indicates an error * and the value at *value should be ignored. */CMTStatus CMT_GetNumericAttribute(PCMT_CONTROL control, CMUint32 resourceID,                                   CMUint32 fieldID, CMInt32* value);/* * FUNCTION: CMT_GetStringAttribute * -------------------------------- *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server which the  *        application wants to retrieve an attribute for. *    fieldID *        The numerical representation of the attribute the application wants *        to retrieve. *    value *        A pinter to a CMTItem that the library can store the string attribute  *        retrieved from the resource on the psm server. * * NOTES * This function requests that the psm server query a resource for a string  * attribute.  The fieldID should be one of the enumerations defined by  * the enumeration SSMAttributeID.  Each resource has a set of attributes * that can be retrieved from the psm server.  Refer to the function where * a resource is created for a list of attributes that a given resource has. * * RETURN * A return value of CMTSuccess indicates the resource on the psm server  * returned the requested string attribute and the corresponding attribute  * value can be found at *value.  Any other return value indicates an error * and the value at *value should be ignored. */CMTStatus CMT_GetStringAttribute(PCMT_CONTROL control, CMUint32 resourceID,                                  CMUint32 fieldID, CMTItem *value);/* * FUNCTION: CMT_SetStringAttribute * -------------------------------- *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server which the  *        application wants to set an attribute for. *    fieldID *        The numerical representation of the attribute the application wants *        to set. *    value *        A pointer to a CMTItem containing the string (binary or ASCII) that *        the application wants to set as the attribute value. * * NOTES * This function requests that the psm server set a string attribute for  * a resource.  The fieldID should be one of the enumerations defined by * then enumeration SSMAttributeID.  Each resource has a set of attributes * that can be set on the psm server.  Refer to the function where a  * resource is created for a list of attributes that a given resource has. * * RETURN * A return value of CMTSuccess indicates the psm server successfully set * requested string attribute for the resource.  Any other return value * indicates an error in setting the resource. */CMTStatus CMT_SetStringAttribute(PCMT_CONTROL control, CMUint32 resourceID,                                 CMUint32 fieldID, CMTItem *value);/* * FUNCTION: CMT_SetNumericAttribute * --------------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server which the  *        application wants to set an attribute for. *    fieldID *        The numerical representation of the attribute the application wants *        to set. *    value *        A pointer to a CMTItem containing the string (binary or ASCII) that *        the application wants to set as the attribute value. * * NOTES * This function requests that the psm server set a numeric attribute for  * a resource.  The fieldID should be one of the enumerations defined by * then enumeration SSMAttributeID.  Each resource has a set of attributes * that can be set on the psm server.  Refer to the function where a  * resource is created for a list of attributes that a given resource has. * * RETURN * A return value of CMTSuccess indicates the psm server successfully set * requested numeric attribute for the resource.  Any other return value * indicates an error in setting the resource. */CMTStatus CMT_SetNumericAttribute(PCMT_CONTROL control, CMUint32 resourceID,                                  CMUint32 fieldID, CMInt32 value);/* * FUNCTION: CMT_GetRIDAttribute * ----------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server the application *        wants to retrieve an attributre from. *    fieldID *        The numerical representation of the attribute the application wants *        to retrieve. *    value *        A pointer to a pre-allocated CMUint32 where the library can place  *        a copy of the desired RID attribute value retrieved from the  *        resource. * * NOTES * This function sends a message to the psm server requesting an attribute  * from the resource with ID "resourceID" that in turn is a resource ID. * The parameter fieldID should be one of the values defined by the enumeration * SSMAttributeID.  Refer to the function where a resource is created for a * list of attributes that a given resource has.  The application should * use this function to retrieve attributes that are resource ID's instead * of CMT_GetNumericAttribute because this funcion will increase the reference * count on the resource corresponding to the retrieved resource ID so that * the resource does not disappear while the application can reference it. * * RETURN * A return value of CMTSuccess indicates the psm server successfully  * retrieved the desired attribute and place it's value at *value. Any * other return value indicates an error and the value at *value should * be ignored. */CMTStatus CMT_GetRIDAttribute(PCMT_CONTROL control, CMUint32 resourceID,                               CMUint32 fieldID, CMUint32 *value);/* * FUNCTION: CMT_DestroyResource * ----------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server the application *        wants to destroy. *    resourceType *        The type of resource the application is trying to destroy. This value *        should be one defined by the enumeration SSMResourceType. * * NOTES * This function sends a message to the psm server release its reference on * the resource passed in. */CMTStatus CMT_DestroyResource(PCMT_CONTROL control, CMUint32 resourceID,                               CMUint32 resourceType);/* * FUNCTION: CMT_PickleResource * ---------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource on the psm server the application *        wants to destroy. *    pickledResource *        A pointer to a CMTItem where the library can place  *        the pickled resource on successful return. * NOTES * This function sends a message to the psm server requesting the resource  * passed in be converted to a binary stream that can be re-instantiated  * at a later time by a call to CMT_UnpickleResource (during the same * execution of the application). * * RETURN * A return value of CMTSuccess indicates the resource was pickled successfully * and the resulting stream is located at *pickledResource.  After the pickled * resource is no longer needed, the application should free the pickled  * resource by calling CMT_FreeItem.  Any other return value indicates an  * error and the value at *pickledResource should be ignored. */CMTStatus CMT_PickleResource(PCMT_CONTROL control, CMUint32 resourceID,                              CMTItem * pickledResource);/* * FUNCTION: CMT_UnpickleResource * ------------------------------ * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceType *        A value defined by the enumeration SSMResourceType which is the *        type of the resource to unpickle. *    pickledResource *        The pickled resource as returned by CMT_PickleResource. *    resourceID *        A pointer to a pre-allocated CMUint32 where the library can *        place the resource ID of the re-instantiated resource. * NOTES * This function sends a message to the psm server requesting a pickled * resource be unpickled and re-instantiated.   * * RETURN * A return value of CMTSuccess indicates the psm server successfully  * re-instantiated a resource and the ID of the re-instantiated resource can * be found at *resourceID. Any other return value indicates an error * and the value at *resourceID should be ignored. */CMTStatus CMT_UnpickleResource(PCMT_CONTROL control, CMUint32 resourceType,                                CMTItem  pickledResource,                                CMUint32 * resourceID);/* * FUNCTION: CMT_DuplicateResource * ------------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    resourceID *        The resource ID of the resource to duplicate. *    newResID *        A pointer  to a pre-allocated CMUint32 where the library can place *        a copy of the duplicated resource's ID. * * NOTES * This function requests the resource passed in be duplicated and returns * the resource ID of the duplicated resource. * * RETURN * A return value of CMTSuccess indicates the resource was duplicated and * the application can refer to the resource stored at *newResID.  The  * application must also call CMT_DestroyResource when the new resource is * no longer needed.  Any other return value indicates an error and the * value at *newResID should be ignored. */CMTStatus CMT_DuplicateResource(PCMT_CONTROL control, CMUint32 resourceID,                                CMUint32 *newResID);/* * FUNCTION: CMT_DestroyDataConnection * ----------------------------------- * INPUTS: *    control *        A control connection that has established a connection with the *        psm server. *    sock *        The File socket the application is using *        to read data from the psm server. * NOTES * This function destroys a data connection between the psm server and  * the application.  A Data Connection is created when an * SSL connection is established with the ps

⌨️ 快捷键说明

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