Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
OBJ_nid2obj, OBJ_nid2ln, OBJ_nid2sn, OBJ_obj2nid, OBJ_ln2nid, OBJ_sn2nid, OBJ_txt2nid, OBJ_txt2obj, OBJ_obj2txt, OBJ_cmp, OBJ_dup, i2t_ASN1_OBJECT, i2a_ASN1_OBJECT — inspect and create ASN.1 object identifiersSYNOPSIS
#include <openssl/objects.h>OBJ_nid2obj(int n);
OBJ_nid2ln(int n);
OBJ_nid2sn(int n);
OBJ_obj2nid(const ASN1_OBJECT *o);
OBJ_ln2nid(const char *ln);
OBJ_sn2nid(const char *sn);
OBJ_txt2nid(const char *s);
OBJ_txt2obj(const char *s, int no_name);
OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
OBJ_dup(const ASN1_OBJECT *o);
i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
i2a_ASN1_OBJECT(BIO *out_bio, const ASN1_OBJECT *a);
DESCRIPTION
The ASN.1 object utility functions process ASN1_OBJECT structures which are a representation of the ASN.1 OBJECT IDENTIFIER (OID) type. For convenience, OIDs are usually represented in source code as numeric identifiers, or NIDs. OpenSSL has an internal table of OIDs that are generated when the library is built, and their corresponding NIDs are available as defined constants. For the functions below, application code should treat all returned values — OIDs, NIDs, or names — as constants.#define SN_commonName "CN" #define LN_commonName "commonName" #define NID_commonName 13
RETURN VALUES
OBJ_nid2obj(), OBJ_txt2obj(), and OBJ_dup() return an ASN1_OBJECT object or NULL if an error occurs.EXAMPLES
Create an object for commonName:ASN1_OBJECT *o; o = OBJ_nid2obj(NID_commonName);
if (OBJ_obj2nid(obj) == NID_commonName) /* Do something */
obj = OBJ_txt2obj("1.2.3.4", 1);