X509_NAME_get_index_by_NID.3 (206048) | X509_NAME_get_index_by_NID.3 (215698) |
---|---|
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.37 | 1.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) |
2.\" 3.\" Standard preamble: 4.\" ======================================================================== | 2.\" 3.\" Standard preamble: 4.\" ======================================================================== |
5.de Sh \" Subsection heading 6.br 7.if t .Sp 8.ne 5 9.PP 10\fB\\$1\fR 11.PP 12.. | |
13.de Sp \" Vertical space (when we can't use .PP) 14.if t .sp .5v 15.if n .sp 16.. 17.de Vb \" Begin verbatim text 18.ft CW 19.nf 20.ne \\$1 21.. 22.de Ve \" End verbatim text 23.ft R 24.fi 25.. 26.\" Set up some character translations and predefined strings. \*(-- will 27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | 5.de Sp \" Vertical space (when we can't use .PP) 6.if t .sp .5v 7.if n .sp 8.. 9.de Vb \" Begin verbatim text 10.ft CW 11.nf 12.ne \\$1 13.. 14.de Ve \" End verbatim text 15.ft R 16.fi 17.. 18.\" Set up some character translations and predefined strings. \*(-- will 19.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
28.\" double quote, and \*(R" will give a right double quote. | will give a 29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to 30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' 31.\" expand to `' in nroff, nothing in troff, for use with C<>. 32.tr \(*W-|\(bv\*(Tr | 20.\" double quote, and \*(R" will give a right double quote. \*(C+ will 21.\" give a nicer C++. Capital omega is used to do unbreakable dashes and 22.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, 23.\" nothing in troff, for use with C<>. 24.tr \(*W- |
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 34.ie n \{\ 35. ds -- \(*W- 36. ds PI pi 37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 39. ds L" "" 40. ds R" "" 41. ds C` "" 42. ds C' "" 43'br\} 44.el\{\ 45. ds -- \|\(em\| 46. ds PI \(*p 47. ds L" `` 48. ds R" '' 49'br\} 50.\" | 25.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' 26.ie n \{\ 27. ds -- \(*W- 28. ds PI pi 29. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch 30. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch 31. ds L" "" 32. ds R" "" 33. ds C` "" 34. ds C' "" 35'br\} 36.el\{\ 37. ds -- \|\(em\| 38. ds PI \(*p 39. ds L" `` 40. ds R" '' 41'br\} 42.\" |
43.\" Escape single quotes in literal strings from groff's Unicode transform. 44.ie \n(.g .ds Aq \(aq 45.el .ds Aq ' 46.\" |
|
51.\" If the F register is turned on, we'll generate index entries on stderr for | 47.\" If the F register is turned on, we'll generate index entries on stderr for |
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | 48.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
53.\" entries marked with X<> in POD. Of course, you'll have to process the 54.\" output yourself in some meaningful fashion. | 49.\" entries marked with X<> in POD. Of course, you'll have to process the 50.\" output yourself in some meaningful fashion. |
55.if \nF \{\ | 51.ie \nF \{\ |
56. de IX 57. tm Index:\\$1\t\\n%\t"\\$2" 58.. 59. nr % 0 60. rr F 61.\} | 52. de IX 53. tm Index:\\$1\t\\n%\t"\\$2" 54.. 55. nr % 0 56. rr F 57.\} |
58.el \{\ 59. de IX 60.. 61.\} |
|
62.\" | 62.\" |
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes 64.\" way too many mistakes in technical documents. 65.hy 0 66.if n .na 67.\" | |
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 69.\" Fear. Run. Save yourself. No user-serviceable parts. 70. \" fudge factors for nroff and troff 71.if n \{\ 72. ds #H 0 73. ds #V .8m 74. ds #F .3m 75. ds #[ \f1 --- 48 unchanged lines hidden (view full) --- 124. ds Th \o'LP' 125. ds ae ae 126. ds Ae AE 127.\} 128.rm #[ #] #H #V #F C 129.\" ======================================================================== 130.\" 131.IX Title "X509_NAME_get_index_by_NID 3" | 63.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 64.\" Fear. Run. Save yourself. No user-serviceable parts. 65. \" fudge factors for nroff and troff 66.if n \{\ 67. ds #H 0 68. ds #V .8m 69. ds #F .3m 70. ds #[ \f1 --- 48 unchanged lines hidden (view full) --- 119. ds Th \o'LP' 120. ds ae ae 121. ds Ae AE 122.\} 123.rm #[ #] #H #V #F C 124.\" ======================================================================== 125.\" 126.IX Title "X509_NAME_get_index_by_NID 3" |
132.TH X509_NAME_get_index_by_NID 3 "2010-03-24" "0.9.8n" "OpenSSL" | 127.TH X509_NAME_get_index_by_NID 3 "2010-11-16" "0.9.8p" "OpenSSL" 128.\" For nroff, turn off justification. Always turn off hyphenation; it makes 129.\" way too many mistakes in technical documents. 130.if n .ad l 131.nh |
133.SH "NAME" 134X509_NAME_get_index_by_NID, X509_NAME_get_index_by_OBJ, X509_NAME_get_entry, 135X509_NAME_entry_count, X509_NAME_get_text_by_NID, X509_NAME_get_text_by_OBJ \- 136X509_NAME lookup and enumeration functions 137.SH "SYNOPSIS" 138.IX Header "SYNOPSIS" | 132.SH "NAME" 133X509_NAME_get_index_by_NID, X509_NAME_get_index_by_OBJ, X509_NAME_get_entry, 134X509_NAME_entry_count, X509_NAME_get_text_by_NID, X509_NAME_get_text_by_OBJ \- 135X509_NAME lookup and enumeration functions 136.SH "SYNOPSIS" 137.IX Header "SYNOPSIS" |
139int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos); 140int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, int lastpos); 141.PP 142int X509_NAME_entry_count(X509_NAME *name); 143X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); 144.PP 145int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf,int len); 146int X509_NAME_get_text_by_OBJ(X509_NAME *name, \s-1ASN1_OBJECT\s0 *obj, char *buf,int len); | 138.Vb 1 139\& #include <openssl/x509.h> 140\& 141\& int X509_NAME_get_index_by_NID(X509_NAME *name,int nid,int lastpos); 142\& int X509_NAME_get_index_by_OBJ(X509_NAME *name,ASN1_OBJECT *obj, int lastpos); 143\& 144\& int X509_NAME_entry_count(X509_NAME *name); 145\& X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); 146\& 147\& int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf,int len); 148\& int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf,int len); 149.Ve |
147.SH "DESCRIPTION" 148.IX Header "DESCRIPTION" 149These functions allow an \fBX509_NAME\fR structure to be examined. The 150\&\fBX509_NAME\fR structure is the same as the \fBName\fR type defined in 151\&\s-1RFC2459\s0 (and elsewhere) and used for example in certificate subject 152and issuer names. 153.PP 154\&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR retrieve --- 8 unchanged lines hidden (view full) --- 163internal pointer which must not be freed. 164.PP 165\&\fIX509_NAME_get_text_by_NID()\fR, \fIX509_NAME_get_text_by_OBJ()\fR retrieve 166the \*(L"text\*(R" from the first entry in \fBname\fR which matches \fBnid\fR or 167\&\fBobj\fR, if no such entry exists \-1 is returned. At most \fBlen\fR bytes 168will be written and the text written to \fBbuf\fR will be null 169terminated. The length of the output string written is returned 170excluding the terminating null. If \fBbuf\fR is <\s-1NULL\s0> then the amount | 150.SH "DESCRIPTION" 151.IX Header "DESCRIPTION" 152These functions allow an \fBX509_NAME\fR structure to be examined. The 153\&\fBX509_NAME\fR structure is the same as the \fBName\fR type defined in 154\&\s-1RFC2459\s0 (and elsewhere) and used for example in certificate subject 155and issuer names. 156.PP 157\&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR retrieve --- 8 unchanged lines hidden (view full) --- 166internal pointer which must not be freed. 167.PP 168\&\fIX509_NAME_get_text_by_NID()\fR, \fIX509_NAME_get_text_by_OBJ()\fR retrieve 169the \*(L"text\*(R" from the first entry in \fBname\fR which matches \fBnid\fR or 170\&\fBobj\fR, if no such entry exists \-1 is returned. At most \fBlen\fR bytes 171will be written and the text written to \fBbuf\fR will be null 172terminated. The length of the output string written is returned 173excluding the terminating null. If \fBbuf\fR is <\s-1NULL\s0> then the amount |
171of space needed in \fBbuf\fR (excluding the final null) is returned. | 174of space needed in \fBbuf\fR (excluding the final null) is returned. |
172.SH "NOTES" 173.IX Header "NOTES" 174\&\fIX509_NAME_get_text_by_NID()\fR and \fIX509_NAME_get_text_by_OBJ()\fR are 175legacy functions which have various limitations which make them 176of minimal use in practice. They can only find the first matching 177entry and will copy the contents of the field verbatim: this can 178be highly confusing if the target is a muticharacter string type 179like a BMPString or a UTF8String. --- 4 unchanged lines hidden (view full) --- 184various \fBX509_NAME_ENTRY\fR utility functions on the result. 185.SH "EXAMPLES" 186.IX Header "EXAMPLES" 187Process all entries: 188.PP 189.Vb 2 190\& int i; 191\& X509_NAME_ENTRY *e; | 175.SH "NOTES" 176.IX Header "NOTES" 177\&\fIX509_NAME_get_text_by_NID()\fR and \fIX509_NAME_get_text_by_OBJ()\fR are 178legacy functions which have various limitations which make them 179of minimal use in practice. They can only find the first matching 180entry and will copy the contents of the field verbatim: this can 181be highly confusing if the target is a muticharacter string type 182like a BMPString or a UTF8String. --- 4 unchanged lines hidden (view full) --- 187various \fBX509_NAME_ENTRY\fR utility functions on the result. 188.SH "EXAMPLES" 189.IX Header "EXAMPLES" 190Process all entries: 191.PP 192.Vb 2 193\& int i; 194\& X509_NAME_ENTRY *e; |
192.Ve 193.PP 194.Vb 5 | 195\& |
195\& for (i = 0; i < X509_NAME_entry_count(nm); i++) 196\& { 197\& e = X509_NAME_get_entry(nm, i); 198\& /* Do something with e */ 199\& } 200.Ve 201.PP 202Process all commonName entries: 203.PP 204.Vb 2 205\& int loc; 206\& X509_NAME_ENTRY *e; | 196\& for (i = 0; i < X509_NAME_entry_count(nm); i++) 197\& { 198\& e = X509_NAME_get_entry(nm, i); 199\& /* Do something with e */ 200\& } 201.Ve 202.PP 203Process all commonName entries: 204.PP 205.Vb 2 206\& int loc; 207\& X509_NAME_ENTRY *e; |
207.Ve 208.PP 209.Vb 9 210\& loc = -1; | 208\& 209\& loc = \-1; |
211\& for (;;) 212\& { 213\& lastpos = X509_NAME_get_index_by_NID(nm, NID_commonName, lastpos); | 210\& for (;;) 211\& { 212\& lastpos = X509_NAME_get_index_by_NID(nm, NID_commonName, lastpos); |
214\& if (lastpos == -1) | 213\& if (lastpos == \-1) |
215\& break; 216\& e = X509_NAME_get_entry(nm, lastpos); 217\& /* Do something with e */ 218\& } 219.Ve 220.SH "RETURN VALUES" 221.IX Header "RETURN VALUES" 222\&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR --- 12 unchanged lines hidden --- | 214\& break; 215\& e = X509_NAME_get_entry(nm, lastpos); 216\& /* Do something with e */ 217\& } 218.Ve 219.SH "RETURN VALUES" 220.IX Header "RETURN VALUES" 221\&\fIX509_NAME_get_index_by_NID()\fR and \fIX509_NAME_get_index_by_OBJ()\fR --- 12 unchanged lines hidden --- |