RSA BSAFE Cert-C Micro Edition

The power of PKI for the smallest of devices

Context Functions

This section lists the functions that facilitate public key contexts.

Functions

int R_PKEY_CTX_new (R_LIB_CTX *lib_ctx, R_RES_FLAG flag, R_PKEY_TYPE pkeytype, R_PKEY_CTX **pkey_ctx)
 Creates a new R_PKEY_CTX structure. More...

int R_PKEY_CTX_free (R_PKEY_CTX *ctx)
 Removes all allocated memory for the R_PKEY_CTX structure ctx. More...

int R_PKEY_CTX_get_info (R_PKEY_CTX *pkey_ctx, int id, void *param)
 Retrieves information identified by the identifier id from an R_PKEY_CTX. More...

int R_PKEY_CTX_set_info (R_PKEY_CTX *pkey_ctx, int id, void *param)
 Sets information identified by the identifier id against an R_PKEY_CTX. More...

R_LIB_CTXR_PKEY_CTX_get_LIB_CTX (R_PKEY_CTX *ctx)
 Returns the R_LIB_CTX for the R_PKEY_CTX structure ctx. More...


Function Documentation

int R_PKEY_CTX_free R_PKEY_CTX   ctx ;
 

Removes all allocated memory for the R_PKEY_CTX structure ctx.

Parameters:
ctx [In] The public key context.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_PKEY_CTX_new().

int R_PKEY_CTX_get_info R_PKEY_CTX   pkey_ctx,
int    id,
void *    param
;
 

Retrieves information identified by the identifier id from an R_PKEY_CTX.

Parameters:
pkey_ctx [In] The R_PKEY context reference.
id [In] The identifier describing the information to retrieve.
See Context Information Identifiers for valid values.
param [Out] The data to retrieve from pkey_ctx.
Returns:
R_ERROR_NONE indicates success.
See Error Identifiers for valid values.
See also:
R_PKEY_CTX_new(), R_PKEY_CTX_free() and R_PKEY_CTX_set_info().

R_LIB_CTX* R_PKEY_CTX_get_LIB_CTX R_PKEY_CTX   ctx ;
 

Returns the R_LIB_CTX for the R_PKEY_CTX structure ctx. The R_LIB_CTX structure is the library context which is used to access common state and logic.

Parameters:
ctx [In] The public key context.
Returns:
The library context of the R_PKEY_CTX structure.
NULL indicates error.

int R_PKEY_CTX_new R_LIB_CTX   lib_ctx,
R_RES_FLAG    flag,
R_PKEY_TYPE    pkeytype,
R_PKEY_CTX **    ctx
;
 

Creates a new R_PKEY_CTX structure.

Parameters:
lib_ctx [In] The library context from which to create the public key context.
ctx [Out] The created public key context.
pkeytype [In] The key type. One of:
  • R_PKEY_TYPE_RSA.
  • R_PKEY_TYPE_DH.
  • R_PKEY_TYPE_DSA.
  • flag [Out] The creation flag.
    Only R_RES_FLAG_DEF is supported.
    Returns:
    R_ERROR_NONE indicates success.
    See Error Identifiers for valid values.
    See also:
    R_PKEY_CTX_free().