RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Context Functions

This section details the functions that manage cryptographic message contexts.

Functions

int R_CM_CTX_new (R_LIB_CTX *lib_ctx, R_RES_FLAG 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 the 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 the 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 free.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
See also:
R_CM_CTX_new().
Samples:
cm.c, cm_adv.c, cm_dgst.c, cm_env.c, cm_env_sm.c, cm_env_strm.c, cm_env_strm_membio.c, cm_open.c, cm_open_strm.c, cm_open_strm_cb.c, cm_open_strm_membio.c, cm_sign.c, cm_sign_dgst.c, cm_sign_sm.c, cm_sign_strm.c, cm_smpl.c, cm_strm.c, cm_type.c, cm_vfy_strm_cb.c, p7ssl_client.c, and p7ssl_server.c.

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 Context Information Identifiers for valid values and the data type of value.
value [Out] The data for the information identifier.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
See also:
R_CM_CTX_set_info().

int R_CM_CTX_new R_LIB_CTX   lib_ctx,
R_RES_FLAG    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] A pointer to the library context from which to create the cryptographic message context.
flag [In] The context of use flag.
See Flags for valid values.
type [In] The types of cryptographic messages to handle.
See Types for valid values.
ctx [Out] A pointer to the reference of the created cryptographic message context.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
See also:
R_CM_CTX_free().
Samples:
cm.c, cm_adv.c, cm_dgst.c, cm_env.c, cm_env_sm.c, cm_env_strm.c, cm_env_strm_membio.c, cm_open.c, cm_open_strm.c, cm_open_strm_cb.c, cm_open_strm_membio.c, cm_sign.c, cm_sign_dgst.c, cm_sign_sm.c, cm_sign_strm.c, cm_smpl.c, cm_strm.c, cm_type.c, cm_vfy_strm_cb.c, p7ssl_client.c, and p7ssl_server.c.

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 Context Information Identifiers for valid values and the data type of value.
value [In] The data to set against the context.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
See also:
R_CM_CTX_get_info().


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 072-001001-2100-001-000 - 2.1