RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Object Identifier Functions

This section details the functions that manage ASN.1 Object Identifiers (OIDs).

Functions

int R_OID_init_with_constant (R_OID *oid, char *constant)
 Initializes an R_OID with an R_OID_* constant. More...

int R_CDECL R_OID_new (R_LIB_CTX *lib_ctx, R_OID **oid)
 Returns a new OID. More...

int R_CDECL R_OID_free (R_OID *oid)
 Frees an OID. More...

int R_CDECL R_OID_init (R_OID *oid, int flag, unsigned char *data, unsigned int len)
 Initializes an OID. More...

int R_CDECL R_OID_to_string (R_OID *oid, R_OID_FORMAT format, unsigned int max_str_len, char *str)
 Returns a string representation for the specified ASN.1 Object Identifier (OID) for the Distinguished Name (DN) elements. More...

int R_CDECL R_OID_from_string (R_LIB_CTX *lib_ctx, R_OID_FORMAT format, char *str, R_OID **oid)
 Returns an ASN.1 OID for the OID name string str. More...


Function Documentation

int R_CDECL R_OID_free R_OID   oid ;
 

Frees an OID.

Parameters:
oid [In] The OID to free.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.

int R_CDECL R_OID_from_string R_LIB_CTX   lib_ctx,
R_OID_FORMAT    format,
char *    str,
R_OID **    oid
;
 

Returns an ASN.1 OID for the OID name string str.

Parameters:
lib_ctx [In] The library context.
format [In] The name format identifier. One of:
R_OID_FORMAT_LONG_NAME Indicates long name.
R_OID_FORMAT_SHORT_NAME Indicates short name.
R_OID_FORMAT_DOTTED_NUMBER Indicates dotted number form.
str [In] The OID name string.
oid [Out] The certificate-related OID.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
note.gif
This function only handles X.500/X.509 OIDs.

int R_CDECL R_OID_init R_OID   oid,
int    flag,
unsigned char *    data,
unsigned int    len
;
 

Initializes an OID.

Parameters:
oid [In] The OID.
flag [In] The copy mode for data.
See Copy Flag Identifiers for valid values.
data [In] The OID contents.
len [In] The length of the OID contents.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.

int R_OID_init_with_constant R_OID   oid,
char *    constant
;
 

Initializes an R_OID with an R_OID_* constant.

Parameters:
oid [In] The OID.
constant [In] The OID's numerical reference.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
Samples:
ocsp_resp_vfy.c.

int R_CDECL R_OID_new R_LIB_CTX   lib_ctx,
R_OID **    oid
;
 

Returns a new OID.

Parameters:
lib_ctx [In] The library context.
oid [Out] The new OID.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.

int R_CDECL R_OID_to_string R_OID   oid,
R_OID_FORMAT    format,
unsigned int    max_str_len,
char *    str
;
 

Returns a string representation for the specified ASN.1 Object Identifier (OID) for the Distinguished Name (DN) elements.

Parameters:
oid [In] The certificate-related OID.
format [In] The name format identifier. One of:
R_OID_FORMAT_LONG_NAME Indicates long name.
R_OID_FORMAT_SHORT_NAME Indicates short name.
R_OID_FORMAT_DOTTED_NUMBER Indicates dotted number form.
max_str_len [In] The amount of memory allocated to str.
str [Out] The character string to write the OID to.
Returns:
R_ERROR_NONE indicates success.
See Identifiers for valid values.
note.gif
This function only handles X.500/X.509 OIDs.


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