RSA BSAFE Cert-C Micro Edition

The power of PKI for the smallest of devices

Cryptographic Message Context Functions

This section details the functions that manage cryptographic message contexts.

Functions

int R_CM_CTX_new (R_LIB_CTX *lib_ctx, int flag, R_CM_TYPE type, R_CM_CTX **ctx)
 Creates a cryptographic message context by requesting the cryptographic message resource from the library module and initializing the context. More...

int R_CM_CTX_free (R_CM_CTX *ctx)
 Deallocates the memory for the cryptographic message context ctx and changes any state it holds. More...

int R_CM_CTX_get_info (R_CM_CTX *ctx, R_CM_CTX_INFO info_id, void *value)
 Returns information from the cryptographic message context. More...

int R_CM_CTX_set_info (R_CM_CTX *ctx, R_CM_CTX_INFO info_id, void *value)
 Sets information into the cryptographic message context. More...


Function Documentation

int R_CM_CTX_free R_CM_CTX   ctx ;
 

Deallocates the memory for the cryptographic message context ctx and changes any state it holds. Any data associated with the context object is deallocated and no longer available for use.

Parameters:
ctx [In] The cryptographic message context to be freed.
Returns:
R_ERROR_NONE for success.
See R_ERROR Identifiers for other values.
Note:
The cryptographic objects created from the deallocated context should not be used after the context has been freed.
See also:
R_CM_CTX_new().

int R_CM_CTX_get_info R_CM_CTX   ctx,
R_CM_CTX_INFO    info_id,
void *    value
;
 

Returns information from the cryptographic message context.

Parameters:
ctx [In] The cryptographic message context.
info_id [In] The information identifier.
See Cryptographic Message Context Info Identifiers for valid values and the data type to pass into value.
value [Out] The data for the information.
Returns:
R_ERROR_NONE for success.
See R_ERROR Identifiers for other values.
See also:
R_CM_CTX_set_info().

int R_CM_CTX_new R_LIB_CTX   lib_ctx,
int    flag,
R_CM_TYPE    type,
R_CM_CTX **    ctx
;
 

Creates a cryptographic message context by requesting the cryptographic message resource from the library module and initializing the context.

Parameters:
lib_ctx [In] The pointer to the library context from which to create the cryptographic message context.
flag [In] Context of use flag.
See Resource Flags for possible values.
type [In] The types of cryptographic messages to handle.
See Cryptographic Message Types for valid values.
ctx [Out] The pointer to the reference of the created cryptographic message context.
Returns:
R_ERROR_NONE for success.
See R_ERROR Identifiers for other values.
See also:
R_CM_CTX_free().

int R_CM_CTX_set_info R_CM_CTX   ctx,
R_CM_CTX_INFO    info_id,
void *    value
;
 

Sets information into the cryptographic message context.

Parameters:
ctx [In] The cryptographic message context.
info_id [In] The information identifier.
See Cryptographic Message Context Info Identifiers for valid values and the data type specified value.
value [In] The data to set against the context.
Returns:
R_ERROR_NONE for success.
See R_ERROR Identifiers for other values.
See also:
R_CM_CTX_get_info().


Copyright (c) 1999-2002 RSA Security Inc. All rights reserved. 061-001007-100-001-000-3405 A1 - 1.0