summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/OBJ_nid2obj.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/OBJ_nid2obj.3')
-rw-r--r--src/lib/libcrypto/man/OBJ_nid2obj.332
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/libcrypto/man/OBJ_nid2obj.3 b/src/lib/libcrypto/man/OBJ_nid2obj.3
index b4149a73aa..22cc572323 100644
--- a/src/lib/libcrypto/man/OBJ_nid2obj.3
+++ b/src/lib/libcrypto/man/OBJ_nid2obj.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: OBJ_nid2obj.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: OBJ_nid2obj.3,v 1.3 2016/11/22 21:38:18 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 22 2016 $
4.Dt OBJ_NID2OBJ 3 4.Dt OBJ_NID2OBJ 3
5.Os 5.Os
6.Sh NAME 6.Sh NAME
@@ -8,16 +8,16 @@
8.Nm OBJ_nid2ln , 8.Nm OBJ_nid2ln ,
9.Nm OBJ_nid2sn , 9.Nm OBJ_nid2sn ,
10.Nm OBJ_obj2nid , 10.Nm OBJ_obj2nid ,
11.Nm OBJ_txt2nid ,
12.Nm OBJ_ln2nid , 11.Nm OBJ_ln2nid ,
13.Nm OBJ_sn2nid , 12.Nm OBJ_sn2nid ,
14.Nm OBJ_cmp , 13.Nm OBJ_txt2nid ,
15.Nm OBJ_dup ,
16.Nm OBJ_txt2obj , 14.Nm OBJ_txt2obj ,
17.Nm OBJ_obj2txt , 15.Nm OBJ_obj2txt ,
16.Nm OBJ_cmp ,
17.Nm OBJ_dup ,
18.Nm OBJ_create , 18.Nm OBJ_create ,
19.Nm OBJ_cleanup 19.Nm OBJ_cleanup
20.Nd ASN1 object utility functions 20.Nd ASN.1 object utility functions
21.Sh SYNOPSIS 21.Sh SYNOPSIS
22.In openssl/objects.h 22.In openssl/objects.h
23.Ft ASN1_OBJECT * 23.Ft ASN1_OBJECT *
@@ -78,9 +78,9 @@
78.Ft void 78.Ft void
79.Fn OBJ_cleanup void 79.Fn OBJ_cleanup void
80.Sh DESCRIPTION 80.Sh DESCRIPTION
81The ASN1 object utility functions process 81The ASN.1 object utility functions process
82.Vt ASN1_OBJECT 82.Vt ASN1_OBJECT
83structures which are a representation of the ASN1 OBJECT IDENTIFIER 83structures which are a representation of the ASN.1 OBJECT IDENTIFIER
84(OID) type. 84(OID) type.
85.Pp 85.Pp
86.Fn OBJ_nid2obj , 86.Fn OBJ_nid2obj ,
@@ -196,8 +196,8 @@ is only a single constant structure for each table object.
196Objects which are not in the table have the NID value 196Objects which are not in the table have the NID value
197.Dv NID_undef . 197.Dv NID_undef .
198.Pp 198.Pp
199Objects do not need to be in the internal tables to be processed, the 199Objects do not need to be in the internal tables to be processed:
200functions 200the functions
201.Fn OBJ_txt2obj 201.Fn OBJ_txt2obj
202and 202and
203.Fn OBJ_obj2txt 203.Fn OBJ_obj2txt
@@ -213,7 +213,7 @@ if an error occurred.
213.Fn OBJ_nid2ln 213.Fn OBJ_nid2ln
214and 214and
215.Fn OBJ_nid2sn 215.Fn OBJ_nid2sn
216returns a valid string or 216return a valid string or
217.Dv NULL 217.Dv NULL
218on error. 218on error.
219.Pp 219.Pp
@@ -228,20 +228,20 @@ on error.
228.Sh EXAMPLES 228.Sh EXAMPLES
229Create an object for 229Create an object for
230.Sy commonName : 230.Sy commonName :
231.Bd -literal 231.Bd -literal -offset indent
232ASN1_OBJECT *o; 232ASN1_OBJECT *o;
233o = OBJ_nid2obj(NID_commonName); 233o = OBJ_nid2obj(NID_commonName);
234.Ed 234.Ed
235.Pp 235.Pp
236Check if an object is 236Check if an object is
237.Sy commonName 237.Sy commonName :
238.Bd -literal 238.Bd -literal -offset indent
239if (OBJ_obj2nid(obj) == NID_commonName) 239if (OBJ_obj2nid(obj) == NID_commonName)
240 /* Do something */ 240 /* Do something */
241.Ed 241.Ed
242.Pp 242.Pp
243Create a new NID and initialize an object from it: 243Create a new NID and initialize an object from it:
244.Bd -literal 244.Bd -literal -offset indent
245int new_nid; 245int new_nid;
246ASN1_OBJECT *obj; 246ASN1_OBJECT *obj;
247new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier"); 247new_nid = OBJ_create("1.2.3.4", "NewOID", "New Object Identifier");
@@ -249,7 +249,7 @@ obj = OBJ_nid2obj(new_nid);
249.Ed 249.Ed
250.Pp 250.Pp
251Create a new object directly: 251Create a new object directly:
252.Bd -literal 252.Bd -literal -offset indent
253obj = OBJ_txt2obj("1.2.3.4", 1); 253obj = OBJ_txt2obj("1.2.3.4", 1);
254.Ed 254.Ed
255.Sh SEE ALSO 255.Sh SEE ALSO