sl@0
|
1 |
/* a_strnid.c */
|
sl@0
|
2 |
/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
|
sl@0
|
3 |
* project 1999.
|
sl@0
|
4 |
*/
|
sl@0
|
5 |
/* ====================================================================
|
sl@0
|
6 |
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
|
sl@0
|
7 |
*
|
sl@0
|
8 |
* Redistribution and use in source and binary forms, with or without
|
sl@0
|
9 |
* modification, are permitted provided that the following conditions
|
sl@0
|
10 |
* are met:
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* 1. Redistributions of source code must retain the above copyright
|
sl@0
|
13 |
* notice, this list of conditions and the following disclaimer.
|
sl@0
|
14 |
*
|
sl@0
|
15 |
* 2. Redistributions in binary form must reproduce the above copyright
|
sl@0
|
16 |
* notice, this list of conditions and the following disclaimer in
|
sl@0
|
17 |
* the documentation and/or other materials provided with the
|
sl@0
|
18 |
* distribution.
|
sl@0
|
19 |
*
|
sl@0
|
20 |
* 3. All advertising materials mentioning features or use of this
|
sl@0
|
21 |
* software must display the following acknowledgment:
|
sl@0
|
22 |
* "This product includes software developed by the OpenSSL Project
|
sl@0
|
23 |
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
sl@0
|
24 |
*
|
sl@0
|
25 |
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
sl@0
|
26 |
* endorse or promote products derived from this software without
|
sl@0
|
27 |
* prior written permission. For written permission, please contact
|
sl@0
|
28 |
* licensing@OpenSSL.org.
|
sl@0
|
29 |
*
|
sl@0
|
30 |
* 5. Products derived from this software may not be called "OpenSSL"
|
sl@0
|
31 |
* nor may "OpenSSL" appear in their names without prior written
|
sl@0
|
32 |
* permission of the OpenSSL Project.
|
sl@0
|
33 |
*
|
sl@0
|
34 |
* 6. Redistributions of any form whatsoever must retain the following
|
sl@0
|
35 |
* acknowledgment:
|
sl@0
|
36 |
* "This product includes software developed by the OpenSSL Project
|
sl@0
|
37 |
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
sl@0
|
38 |
*
|
sl@0
|
39 |
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
sl@0
|
40 |
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
sl@0
|
41 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
sl@0
|
42 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
sl@0
|
43 |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
sl@0
|
44 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
sl@0
|
45 |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
sl@0
|
46 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
sl@0
|
47 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
sl@0
|
48 |
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
sl@0
|
49 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
sl@0
|
50 |
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
sl@0
|
51 |
* ====================================================================
|
sl@0
|
52 |
*
|
sl@0
|
53 |
* This product includes cryptographic software written by Eric Young
|
sl@0
|
54 |
* (eay@cryptsoft.com). This product includes software written by Tim
|
sl@0
|
55 |
* Hudson (tjh@cryptsoft.com).
|
sl@0
|
56 |
*
|
sl@0
|
57 |
*/
|
sl@0
|
58 |
/*
|
sl@0
|
59 |
© Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
|
sl@0
|
60 |
*/
|
sl@0
|
61 |
#if (defined(SYMBIAN) && (defined(__WINSCW__) || defined(__WINS__)))
|
sl@0
|
62 |
#include "libcrypto_wsd.h"
|
sl@0
|
63 |
#include "libcrypto_wsd_macros.h"
|
sl@0
|
64 |
#endif
|
sl@0
|
65 |
|
sl@0
|
66 |
|
sl@0
|
67 |
#include <stdio.h>
|
sl@0
|
68 |
#include <ctype.h>
|
sl@0
|
69 |
#include "cryptlib.h"
|
sl@0
|
70 |
#include <openssl/asn1.h>
|
sl@0
|
71 |
#include <openssl/objects.h>
|
sl@0
|
72 |
|
sl@0
|
73 |
|
sl@0
|
74 |
#ifndef EMULATOR
|
sl@0
|
75 |
static STACK_OF(ASN1_STRING_TABLE) *stable = NULL;
|
sl@0
|
76 |
#else //EMULATOR
|
sl@0
|
77 |
GET_STATIC_VAR_FROM_TLS(stable,a_strnid,STACK_OF(ASN1_STRING_TABLE)*)
|
sl@0
|
78 |
#define stable (*GET_WSD_VAR_NAME(stable,a_strnid, s)())
|
sl@0
|
79 |
#endif //EMULATOR
|
sl@0
|
80 |
|
sl@0
|
81 |
static void st_free(ASN1_STRING_TABLE *tbl);
|
sl@0
|
82 |
static int sk_table_cmp(const ASN1_STRING_TABLE * const *a,
|
sl@0
|
83 |
const ASN1_STRING_TABLE * const *b);
|
sl@0
|
84 |
static int table_cmp(const void *a, const void *b);
|
sl@0
|
85 |
|
sl@0
|
86 |
|
sl@0
|
87 |
/* This is the global mask for the mbstring functions: this is use to
|
sl@0
|
88 |
* mask out certain types (such as BMPString and UTF8String) because
|
sl@0
|
89 |
* certain software (e.g. Netscape) has problems with them.
|
sl@0
|
90 |
*/
|
sl@0
|
91 |
|
sl@0
|
92 |
#ifndef EMULATOR
|
sl@0
|
93 |
static unsigned long global_mask = 0xFFFFFFFFL;
|
sl@0
|
94 |
#else
|
sl@0
|
95 |
GET_STATIC_VAR_FROM_TLS(global_mask,a_strnid, unsigned long)
|
sl@0
|
96 |
#define global_mask (*GET_WSD_VAR_NAME(global_mask,a_strnid, s)())
|
sl@0
|
97 |
#endif
|
sl@0
|
98 |
|
sl@0
|
99 |
EXPORT_C void ASN1_STRING_set_default_mask(unsigned long mask)
|
sl@0
|
100 |
{
|
sl@0
|
101 |
global_mask = mask;
|
sl@0
|
102 |
}
|
sl@0
|
103 |
|
sl@0
|
104 |
EXPORT_C unsigned long ASN1_STRING_get_default_mask(void)
|
sl@0
|
105 |
{
|
sl@0
|
106 |
return global_mask;
|
sl@0
|
107 |
}
|
sl@0
|
108 |
|
sl@0
|
109 |
/* This function sets the default to various "flavours" of configuration.
|
sl@0
|
110 |
* based on an ASCII string. Currently this is:
|
sl@0
|
111 |
* MASK:XXXX : a numerical mask value.
|
sl@0
|
112 |
* nobmp : Don't use BMPStrings (just Printable, T61).
|
sl@0
|
113 |
* pkix : PKIX recommendation in RFC2459.
|
sl@0
|
114 |
* utf8only : only use UTF8Strings (RFC2459 recommendation for 2004).
|
sl@0
|
115 |
* default: the default value, Printable, T61, BMP.
|
sl@0
|
116 |
*/
|
sl@0
|
117 |
|
sl@0
|
118 |
EXPORT_C int ASN1_STRING_set_default_mask_asc(char *p)
|
sl@0
|
119 |
{
|
sl@0
|
120 |
unsigned long mask;
|
sl@0
|
121 |
char *end;
|
sl@0
|
122 |
if(!strncmp(p, "MASK:", 5)) {
|
sl@0
|
123 |
if(!p[5]) return 0;
|
sl@0
|
124 |
mask = strtoul(p + 5, &end, 0);
|
sl@0
|
125 |
if(*end) return 0;
|
sl@0
|
126 |
} else if(!strcmp(p, "nombstr"))
|
sl@0
|
127 |
mask = ~((unsigned long)(B_ASN1_BMPSTRING|B_ASN1_UTF8STRING));
|
sl@0
|
128 |
else if(!strcmp(p, "pkix"))
|
sl@0
|
129 |
mask = ~((unsigned long)B_ASN1_T61STRING);
|
sl@0
|
130 |
else if(!strcmp(p, "utf8only")) mask = B_ASN1_UTF8STRING;
|
sl@0
|
131 |
else if(!strcmp(p, "default"))
|
sl@0
|
132 |
mask = 0xFFFFFFFFL;
|
sl@0
|
133 |
else return 0;
|
sl@0
|
134 |
ASN1_STRING_set_default_mask(mask);
|
sl@0
|
135 |
return 1;
|
sl@0
|
136 |
}
|
sl@0
|
137 |
|
sl@0
|
138 |
/* The following function generates an ASN1_STRING based on limits in a table.
|
sl@0
|
139 |
* Frequently the types and length of an ASN1_STRING are restricted by a
|
sl@0
|
140 |
* corresponding OID. For example certificates and certificate requests.
|
sl@0
|
141 |
*/
|
sl@0
|
142 |
|
sl@0
|
143 |
EXPORT_C ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
|
sl@0
|
144 |
int inlen, int inform, int nid)
|
sl@0
|
145 |
{
|
sl@0
|
146 |
ASN1_STRING_TABLE *tbl;
|
sl@0
|
147 |
ASN1_STRING *str = NULL;
|
sl@0
|
148 |
unsigned long mask;
|
sl@0
|
149 |
int ret;
|
sl@0
|
150 |
if(!out) out = &str;
|
sl@0
|
151 |
tbl = ASN1_STRING_TABLE_get(nid);
|
sl@0
|
152 |
if(tbl) {
|
sl@0
|
153 |
mask = tbl->mask;
|
sl@0
|
154 |
if(!(tbl->flags & STABLE_NO_MASK)) mask &= global_mask;
|
sl@0
|
155 |
ret = ASN1_mbstring_ncopy(out, in, inlen, inform, mask,
|
sl@0
|
156 |
tbl->minsize, tbl->maxsize);
|
sl@0
|
157 |
} else ret = ASN1_mbstring_copy(out, in, inlen, inform, DIRSTRING_TYPE & global_mask);
|
sl@0
|
158 |
if(ret <= 0) return NULL;
|
sl@0
|
159 |
return *out;
|
sl@0
|
160 |
}
|
sl@0
|
161 |
|
sl@0
|
162 |
/* Now the tables and helper functions for the string table:
|
sl@0
|
163 |
*/
|
sl@0
|
164 |
|
sl@0
|
165 |
/* size limits: this stuff is taken straight from RFC3280 */
|
sl@0
|
166 |
|
sl@0
|
167 |
#define ub_name 32768
|
sl@0
|
168 |
#define ub_common_name 64
|
sl@0
|
169 |
#define ub_locality_name 128
|
sl@0
|
170 |
#define ub_state_name 128
|
sl@0
|
171 |
#define ub_organization_name 64
|
sl@0
|
172 |
#define ub_organization_unit_name 64
|
sl@0
|
173 |
#define ub_title 64
|
sl@0
|
174 |
#define ub_email_address 128
|
sl@0
|
175 |
#define ub_serial_number 64
|
sl@0
|
176 |
|
sl@0
|
177 |
|
sl@0
|
178 |
/* This table must be kept in NID order */
|
sl@0
|
179 |
#ifndef EMULATOR
|
sl@0
|
180 |
static ASN1_STRING_TABLE tbl_standard[] = {
|
sl@0
|
181 |
{NID_commonName, 1, ub_common_name, DIRSTRING_TYPE, 0},
|
sl@0
|
182 |
{NID_countryName, 2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
183 |
{NID_localityName, 1, ub_locality_name, DIRSTRING_TYPE, 0},
|
sl@0
|
184 |
{NID_stateOrProvinceName, 1, ub_state_name, DIRSTRING_TYPE, 0},
|
sl@0
|
185 |
{NID_organizationName, 1, ub_organization_name, DIRSTRING_TYPE, 0},
|
sl@0
|
186 |
{NID_organizationalUnitName, 1, ub_organization_unit_name, DIRSTRING_TYPE, 0},
|
sl@0
|
187 |
{NID_pkcs9_emailAddress, 1, ub_email_address, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
sl@0
|
188 |
{NID_pkcs9_unstructuredName, 1, -1, PKCS9STRING_TYPE, 0},
|
sl@0
|
189 |
{NID_pkcs9_challengePassword, 1, -1, PKCS9STRING_TYPE, 0},
|
sl@0
|
190 |
{NID_pkcs9_unstructuredAddress, 1, -1, DIRSTRING_TYPE, 0},
|
sl@0
|
191 |
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
192 |
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
193 |
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
194 |
{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
195 |
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
|
sl@0
|
196 |
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
197 |
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
198 |
{NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
sl@0
|
199 |
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
|
sl@0
|
200 |
};
|
sl@0
|
201 |
#else //EMULATOR
|
sl@0
|
202 |
const ASN1_STRING_TABLE tbl_standard[] = {
|
sl@0
|
203 |
{NID_commonName, 1, ub_common_name, DIRSTRING_TYPE, 0},
|
sl@0
|
204 |
{NID_countryName, 2, 2, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
205 |
{NID_localityName, 1, ub_locality_name, DIRSTRING_TYPE, 0},
|
sl@0
|
206 |
{NID_stateOrProvinceName, 1, ub_state_name, DIRSTRING_TYPE, 0},
|
sl@0
|
207 |
{NID_organizationName, 1, ub_organization_name, DIRSTRING_TYPE, 0},
|
sl@0
|
208 |
{NID_organizationalUnitName, 1, ub_organization_unit_name, DIRSTRING_TYPE, 0},
|
sl@0
|
209 |
{NID_pkcs9_emailAddress, 1, ub_email_address, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
sl@0
|
210 |
{NID_pkcs9_unstructuredName, 1, -1, PKCS9STRING_TYPE, 0},
|
sl@0
|
211 |
{NID_pkcs9_challengePassword, 1, -1, PKCS9STRING_TYPE, 0},
|
sl@0
|
212 |
{NID_pkcs9_unstructuredAddress, 1, -1, DIRSTRING_TYPE, 0},
|
sl@0
|
213 |
{NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
214 |
{NID_surname, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
215 |
{NID_initials, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
216 |
{NID_serialNumber, 1, ub_serial_number, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
217 |
{NID_friendlyName, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK},
|
sl@0
|
218 |
{NID_name, 1, ub_name, DIRSTRING_TYPE, 0},
|
sl@0
|
219 |
{NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK},
|
sl@0
|
220 |
{NID_domainComponent, 1, -1, B_ASN1_IA5STRING, STABLE_NO_MASK},
|
sl@0
|
221 |
{NID_ms_csp_name, -1, -1, B_ASN1_BMPSTRING, STABLE_NO_MASK}
|
sl@0
|
222 |
};
|
sl@0
|
223 |
#endif //EMULATOR
|
sl@0
|
224 |
|
sl@0
|
225 |
static int sk_table_cmp(const ASN1_STRING_TABLE * const *a,
|
sl@0
|
226 |
const ASN1_STRING_TABLE * const *b)
|
sl@0
|
227 |
{
|
sl@0
|
228 |
return (*a)->nid - (*b)->nid;
|
sl@0
|
229 |
}
|
sl@0
|
230 |
|
sl@0
|
231 |
static int table_cmp(const void *a, const void *b)
|
sl@0
|
232 |
{
|
sl@0
|
233 |
const ASN1_STRING_TABLE *sa = a, *sb = b;
|
sl@0
|
234 |
return sa->nid - sb->nid;
|
sl@0
|
235 |
}
|
sl@0
|
236 |
|
sl@0
|
237 |
EXPORT_C ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid)
|
sl@0
|
238 |
{
|
sl@0
|
239 |
int idx;
|
sl@0
|
240 |
ASN1_STRING_TABLE *ttmp;
|
sl@0
|
241 |
ASN1_STRING_TABLE fnd;
|
sl@0
|
242 |
fnd.nid = nid;
|
sl@0
|
243 |
ttmp = (ASN1_STRING_TABLE *) OBJ_bsearch((char *)&fnd,
|
sl@0
|
244 |
(char *)tbl_standard,
|
sl@0
|
245 |
sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE),
|
sl@0
|
246 |
sizeof(ASN1_STRING_TABLE), table_cmp);
|
sl@0
|
247 |
if(ttmp) return ttmp;
|
sl@0
|
248 |
if(!stable) return NULL;
|
sl@0
|
249 |
idx = sk_ASN1_STRING_TABLE_find(stable, &fnd);
|
sl@0
|
250 |
if(idx < 0) return NULL;
|
sl@0
|
251 |
return sk_ASN1_STRING_TABLE_value(stable, idx);
|
sl@0
|
252 |
}
|
sl@0
|
253 |
|
sl@0
|
254 |
EXPORT_C int ASN1_STRING_TABLE_add(int nid,
|
sl@0
|
255 |
long minsize, long maxsize, unsigned long mask,
|
sl@0
|
256 |
unsigned long flags)
|
sl@0
|
257 |
{
|
sl@0
|
258 |
ASN1_STRING_TABLE *tmp;
|
sl@0
|
259 |
char new_nid = 0;
|
sl@0
|
260 |
flags &= ~STABLE_FLAGS_MALLOC;
|
sl@0
|
261 |
if(!stable) stable = sk_ASN1_STRING_TABLE_new(sk_table_cmp);
|
sl@0
|
262 |
if(!stable) {
|
sl@0
|
263 |
ASN1err(ASN1_F_ASN1_STRING_TABLE_ADD, ERR_R_MALLOC_FAILURE);
|
sl@0
|
264 |
return 0;
|
sl@0
|
265 |
}
|
sl@0
|
266 |
if(!(tmp = ASN1_STRING_TABLE_get(nid))) {
|
sl@0
|
267 |
tmp = OPENSSL_malloc(sizeof(ASN1_STRING_TABLE));
|
sl@0
|
268 |
if(!tmp) {
|
sl@0
|
269 |
ASN1err(ASN1_F_ASN1_STRING_TABLE_ADD,
|
sl@0
|
270 |
ERR_R_MALLOC_FAILURE);
|
sl@0
|
271 |
return 0;
|
sl@0
|
272 |
}
|
sl@0
|
273 |
tmp->flags = flags | STABLE_FLAGS_MALLOC;
|
sl@0
|
274 |
tmp->nid = nid;
|
sl@0
|
275 |
new_nid = 1;
|
sl@0
|
276 |
} else tmp->flags = (tmp->flags & STABLE_FLAGS_MALLOC) | flags;
|
sl@0
|
277 |
if(minsize != -1) tmp->minsize = minsize;
|
sl@0
|
278 |
if(maxsize != -1) tmp->maxsize = maxsize;
|
sl@0
|
279 |
tmp->mask = mask;
|
sl@0
|
280 |
if(new_nid) sk_ASN1_STRING_TABLE_push(stable, tmp);
|
sl@0
|
281 |
return 1;
|
sl@0
|
282 |
}
|
sl@0
|
283 |
|
sl@0
|
284 |
EXPORT_C void ASN1_STRING_TABLE_cleanup(void)
|
sl@0
|
285 |
{
|
sl@0
|
286 |
STACK_OF(ASN1_STRING_TABLE) *tmp;
|
sl@0
|
287 |
tmp = stable;
|
sl@0
|
288 |
if(!tmp) return;
|
sl@0
|
289 |
stable = NULL;
|
sl@0
|
290 |
sk_ASN1_STRING_TABLE_pop_free(tmp, st_free);
|
sl@0
|
291 |
}
|
sl@0
|
292 |
|
sl@0
|
293 |
static void st_free(ASN1_STRING_TABLE *tbl)
|
sl@0
|
294 |
{
|
sl@0
|
295 |
if(tbl->flags & STABLE_FLAGS_MALLOC) OPENSSL_free(tbl);
|
sl@0
|
296 |
}
|
sl@0
|
297 |
|
sl@0
|
298 |
|
sl@0
|
299 |
IMPLEMENT_STACK_OF(ASN1_STRING_TABLE)
|
sl@0
|
300 |
|
sl@0
|
301 |
#ifdef STRING_TABLE_TEST
|
sl@0
|
302 |
|
sl@0
|
303 |
main()
|
sl@0
|
304 |
{
|
sl@0
|
305 |
ASN1_STRING_TABLE *tmp;
|
sl@0
|
306 |
int i, last_nid = -1;
|
sl@0
|
307 |
|
sl@0
|
308 |
for (tmp = tbl_standard, i = 0;
|
sl@0
|
309 |
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
sl@0
|
310 |
{
|
sl@0
|
311 |
if (tmp->nid < last_nid)
|
sl@0
|
312 |
{
|
sl@0
|
313 |
last_nid = 0;
|
sl@0
|
314 |
break;
|
sl@0
|
315 |
}
|
sl@0
|
316 |
last_nid = tmp->nid;
|
sl@0
|
317 |
}
|
sl@0
|
318 |
|
sl@0
|
319 |
if (last_nid != 0)
|
sl@0
|
320 |
{
|
sl@0
|
321 |
printf("Table order OK\n");
|
sl@0
|
322 |
exit(0);
|
sl@0
|
323 |
}
|
sl@0
|
324 |
|
sl@0
|
325 |
for (tmp = tbl_standard, i = 0;
|
sl@0
|
326 |
i < sizeof(tbl_standard)/sizeof(ASN1_STRING_TABLE); i++, tmp++)
|
sl@0
|
327 |
printf("Index %d, NID %d, Name=%s\n", i, tmp->nid,
|
sl@0
|
328 |
OBJ_nid2ln(tmp->nid));
|
sl@0
|
329 |
|
sl@0
|
330 |
}
|
sl@0
|
331 |
|
sl@0
|
332 |
#endif
|