/src/openssl30/crypto/core_namemap.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. |
3 | | * |
4 | | * Licensed under the Apache License 2.0 (the "License"). You may not use |
5 | | * this file except in compliance with the License. You can obtain a copy |
6 | | * in the file LICENSE in the source distribution or at |
7 | | * https://www.openssl.org/source/license.html |
8 | | */ |
9 | | |
10 | | #include "internal/namemap.h" |
11 | | #include <openssl/lhash.h> |
12 | | #include "crypto/lhash.h" /* ossl_lh_strcasehash */ |
13 | | #include "internal/tsan_assist.h" |
14 | | #include "internal/sizes.h" |
15 | | |
16 | | /*- |
17 | | * The namenum entry |
18 | | * ================= |
19 | | */ |
20 | | typedef struct { |
21 | | char *name; |
22 | | int number; |
23 | | } NAMENUM_ENTRY; |
24 | | |
25 | | DEFINE_LHASH_OF(NAMENUM_ENTRY); |
26 | | |
27 | | /*- |
28 | | * The namemap itself |
29 | | * ================== |
30 | | */ |
31 | | |
32 | | struct ossl_namemap_st { |
33 | | /* Flags */ |
34 | | unsigned int stored:1; /* If 1, it's stored in a library context */ |
35 | | |
36 | | CRYPTO_RWLOCK *lock; |
37 | | LHASH_OF(NAMENUM_ENTRY) *namenum; /* Name->number mapping */ |
38 | | |
39 | | TSAN_QUALIFIER int max_number; /* Current max number */ |
40 | | }; |
41 | | |
42 | | /* LHASH callbacks */ |
43 | | |
44 | | static unsigned long namenum_hash(const NAMENUM_ENTRY *n) |
45 | 272M | { |
46 | 272M | return ossl_lh_strcasehash(n->name); |
47 | 272M | } |
48 | | |
49 | | static int namenum_cmp(const NAMENUM_ENTRY *a, const NAMENUM_ENTRY *b) |
50 | 203M | { |
51 | 203M | return OPENSSL_strcasecmp(a->name, b->name); |
52 | 203M | } |
53 | | |
54 | | static void namenum_free(NAMENUM_ENTRY *n) |
55 | 8.43k | { |
56 | 8.43k | if (n != NULL) |
57 | 8.43k | OPENSSL_free(n->name); |
58 | 8.43k | OPENSSL_free(n); |
59 | 8.43k | } |
60 | | |
61 | | /* OSSL_LIB_CTX_METHOD functions for a namemap stored in a library context */ |
62 | | |
63 | | static void *stored_namemap_new(OSSL_LIB_CTX *libctx) |
64 | 7 | { |
65 | 7 | OSSL_NAMEMAP *namemap = ossl_namemap_new(); |
66 | | |
67 | 7 | if (namemap != NULL) |
68 | 7 | namemap->stored = 1; |
69 | | |
70 | 7 | return namemap; |
71 | 7 | } |
72 | | |
73 | | static void stored_namemap_free(void *vnamemap) |
74 | 7 | { |
75 | 7 | OSSL_NAMEMAP *namemap = vnamemap; |
76 | | |
77 | 7 | if (namemap != NULL) { |
78 | | /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */ |
79 | 7 | namemap->stored = 0; |
80 | 7 | ossl_namemap_free(namemap); |
81 | 7 | } |
82 | 7 | } |
83 | | |
84 | | static const OSSL_LIB_CTX_METHOD stored_namemap_method = { |
85 | | OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY, |
86 | | stored_namemap_new, |
87 | | stored_namemap_free, |
88 | | }; |
89 | | |
90 | | /*- |
91 | | * API functions |
92 | | * ============= |
93 | | */ |
94 | | |
95 | | int ossl_namemap_empty(OSSL_NAMEMAP *namemap) |
96 | 285M | { |
97 | | #ifdef TSAN_REQUIRES_LOCKING |
98 | | /* No TSAN support */ |
99 | | int rv; |
100 | | |
101 | | if (namemap == NULL) |
102 | | return 1; |
103 | | |
104 | | if (!CRYPTO_THREAD_read_lock(namemap->lock)) |
105 | | return -1; |
106 | | rv = namemap->max_number == 0; |
107 | | CRYPTO_THREAD_unlock(namemap->lock); |
108 | | return rv; |
109 | | #else |
110 | | /* Have TSAN support */ |
111 | 285M | return namemap == NULL || tsan_load(&namemap->max_number) == 0; |
112 | 285M | #endif |
113 | 285M | } |
114 | | |
115 | | typedef struct doall_names_data_st { |
116 | | int number; |
117 | | const char **names; |
118 | | int found; |
119 | | } DOALL_NAMES_DATA; |
120 | | |
121 | | static void do_name(const NAMENUM_ENTRY *namenum, DOALL_NAMES_DATA *data) |
122 | 1.09G | { |
123 | 1.09G | if (namenum->number == data->number) |
124 | 13.1M | data->names[data->found++] = namenum->name; |
125 | 1.09G | } |
126 | | |
127 | | IMPLEMENT_LHASH_DOALL_ARG_CONST(NAMENUM_ENTRY, DOALL_NAMES_DATA); |
128 | | |
129 | | /* |
130 | | * Call the callback for all names in the namemap with the given number. |
131 | | * A return value 1 means that the callback was called for all names. A |
132 | | * return value of 0 means that the callback was not called for any names. |
133 | | */ |
134 | | int ossl_namemap_doall_names(const OSSL_NAMEMAP *namemap, int number, |
135 | | void (*fn)(const char *name, void *data), |
136 | | void *data) |
137 | 2.92M | { |
138 | 2.92M | DOALL_NAMES_DATA cbdata; |
139 | 2.92M | size_t num_names; |
140 | 2.92M | int i; |
141 | | |
142 | 2.92M | cbdata.number = number; |
143 | 2.92M | cbdata.found = 0; |
144 | | |
145 | 2.92M | if (namemap == NULL) |
146 | 0 | return 0; |
147 | | |
148 | | /* |
149 | | * We collect all the names first under a read lock. Subsequently we call |
150 | | * the user function, so that we're not holding the read lock when in user |
151 | | * code. This could lead to deadlocks. |
152 | | */ |
153 | 2.92M | if (!CRYPTO_THREAD_read_lock(namemap->lock)) |
154 | 0 | return 0; |
155 | | |
156 | 2.92M | num_names = lh_NAMENUM_ENTRY_num_items(namemap->namenum); |
157 | 2.92M | if (num_names == 0) { |
158 | 0 | CRYPTO_THREAD_unlock(namemap->lock); |
159 | 0 | return 0; |
160 | 0 | } |
161 | 2.92M | cbdata.names = OPENSSL_malloc(sizeof(*cbdata.names) * num_names); |
162 | 2.92M | if (cbdata.names == NULL) { |
163 | 0 | CRYPTO_THREAD_unlock(namemap->lock); |
164 | 0 | return 0; |
165 | 0 | } |
166 | 2.92M | lh_NAMENUM_ENTRY_doall_DOALL_NAMES_DATA(namemap->namenum, do_name, |
167 | 2.92M | &cbdata); |
168 | 2.92M | CRYPTO_THREAD_unlock(namemap->lock); |
169 | | |
170 | 16.0M | for (i = 0; i < cbdata.found; i++) |
171 | 13.1M | fn(cbdata.names[i], data); |
172 | | |
173 | 2.92M | OPENSSL_free(cbdata.names); |
174 | 2.92M | return 1; |
175 | 2.92M | } |
176 | | |
177 | | static int namemap_name2num_n(const OSSL_NAMEMAP *namemap, |
178 | | const char *name, size_t name_len) |
179 | 231M | { |
180 | 231M | NAMENUM_ENTRY *namenum_entry, namenum_tmpl; |
181 | | |
182 | 231M | if ((namenum_tmpl.name = OPENSSL_strndup(name, name_len)) == NULL) |
183 | 0 | return 0; |
184 | 231M | namenum_tmpl.number = 0; |
185 | 231M | namenum_entry = |
186 | 231M | lh_NAMENUM_ENTRY_retrieve(namemap->namenum, &namenum_tmpl); |
187 | 231M | OPENSSL_free(namenum_tmpl.name); |
188 | 231M | return namenum_entry != NULL ? namenum_entry->number : 0; |
189 | 231M | } |
190 | | |
191 | | int ossl_namemap_name2num_n(const OSSL_NAMEMAP *namemap, |
192 | | const char *name, size_t name_len) |
193 | 231M | { |
194 | 231M | int number; |
195 | | |
196 | 231M | #ifndef FIPS_MODULE |
197 | 231M | if (namemap == NULL) |
198 | 0 | namemap = ossl_namemap_stored(NULL); |
199 | 231M | #endif |
200 | | |
201 | 231M | if (namemap == NULL) |
202 | 0 | return 0; |
203 | | |
204 | 231M | if (!CRYPTO_THREAD_read_lock(namemap->lock)) |
205 | 0 | return 0; |
206 | 231M | number = namemap_name2num_n(namemap, name, name_len); |
207 | 231M | CRYPTO_THREAD_unlock(namemap->lock); |
208 | | |
209 | 231M | return number; |
210 | 231M | } |
211 | | |
212 | | int ossl_namemap_name2num(const OSSL_NAMEMAP *namemap, const char *name) |
213 | 231M | { |
214 | 231M | if (name == NULL) |
215 | 8.56k | return 0; |
216 | | |
217 | 231M | return ossl_namemap_name2num_n(namemap, name, strlen(name)); |
218 | 231M | } |
219 | | |
220 | | struct num2name_data_st { |
221 | | size_t idx; /* Countdown */ |
222 | | const char *name; /* Result */ |
223 | | }; |
224 | | |
225 | | static void do_num2name(const char *name, void *vdata) |
226 | 0 | { |
227 | 0 | struct num2name_data_st *data = vdata; |
228 | |
|
229 | 0 | if (data->idx > 0) |
230 | 0 | data->idx--; |
231 | 0 | else if (data->name == NULL) |
232 | 0 | data->name = name; |
233 | 0 | } |
234 | | |
235 | | const char *ossl_namemap_num2name(const OSSL_NAMEMAP *namemap, int number, |
236 | | size_t idx) |
237 | 0 | { |
238 | 0 | struct num2name_data_st data; |
239 | |
|
240 | 0 | data.idx = idx; |
241 | 0 | data.name = NULL; |
242 | 0 | if (!ossl_namemap_doall_names(namemap, number, do_num2name, &data)) |
243 | 0 | return NULL; |
244 | 0 | return data.name; |
245 | 0 | } |
246 | | |
247 | | static int namemap_add_name_n(OSSL_NAMEMAP *namemap, int number, |
248 | | const char *name, size_t name_len) |
249 | 6.57k | { |
250 | 6.57k | NAMENUM_ENTRY *namenum = NULL; |
251 | 6.57k | int tmp_number; |
252 | | |
253 | | /* If it already exists, we don't add it */ |
254 | 6.57k | if ((tmp_number = namemap_name2num_n(namemap, name, name_len)) != 0) |
255 | 4.14k | return tmp_number; |
256 | | |
257 | 2.43k | if ((namenum = OPENSSL_zalloc(sizeof(*namenum))) == NULL |
258 | 2.43k | || (namenum->name = OPENSSL_strndup(name, name_len)) == NULL) |
259 | 0 | goto err; |
260 | | |
261 | | /* The tsan_counter use here is safe since we're under lock */ |
262 | 2.43k | namenum->number = |
263 | 2.43k | number != 0 ? number : 1 + tsan_counter(&namemap->max_number); |
264 | 2.43k | (void)lh_NAMENUM_ENTRY_insert(namemap->namenum, namenum); |
265 | | |
266 | 2.43k | if (lh_NAMENUM_ENTRY_error(namemap->namenum)) |
267 | 0 | goto err; |
268 | 2.43k | return namenum->number; |
269 | | |
270 | 0 | err: |
271 | 0 | namenum_free(namenum); |
272 | 0 | return 0; |
273 | 2.43k | } |
274 | | |
275 | | int ossl_namemap_add_name_n(OSSL_NAMEMAP *namemap, int number, |
276 | | const char *name, size_t name_len) |
277 | 4.50k | { |
278 | 4.50k | int tmp_number; |
279 | | |
280 | 4.50k | #ifndef FIPS_MODULE |
281 | 4.50k | if (namemap == NULL) |
282 | 0 | namemap = ossl_namemap_stored(NULL); |
283 | 4.50k | #endif |
284 | | |
285 | 4.50k | if (name == NULL || name_len == 0 || namemap == NULL) |
286 | 0 | return 0; |
287 | | |
288 | 4.50k | if (!CRYPTO_THREAD_write_lock(namemap->lock)) |
289 | 0 | return 0; |
290 | 4.50k | tmp_number = namemap_add_name_n(namemap, number, name, name_len); |
291 | 4.50k | CRYPTO_THREAD_unlock(namemap->lock); |
292 | 4.50k | return tmp_number; |
293 | 4.50k | } |
294 | | |
295 | | int ossl_namemap_add_name(OSSL_NAMEMAP *namemap, int number, const char *name) |
296 | 4.50k | { |
297 | 4.50k | if (name == NULL) |
298 | 0 | return 0; |
299 | | |
300 | 4.50k | return ossl_namemap_add_name_n(namemap, number, name, strlen(name)); |
301 | 4.50k | } |
302 | | |
303 | | int ossl_namemap_add_names(OSSL_NAMEMAP *namemap, int number, |
304 | | const char *names, const char separator) |
305 | 1.24k | { |
306 | 1.24k | const char *p, *q; |
307 | 1.24k | size_t l; |
308 | | |
309 | | /* Check that we have a namemap */ |
310 | 1.24k | if (!ossl_assert(namemap != NULL)) { |
311 | 0 | ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER); |
312 | 0 | return 0; |
313 | 0 | } |
314 | | |
315 | 1.24k | if (!CRYPTO_THREAD_write_lock(namemap->lock)) |
316 | 0 | return 0; |
317 | | /* |
318 | | * Check that no name is an empty string, and that all names have at |
319 | | * most one numeric identity together. |
320 | | */ |
321 | 3.30k | for (p = names; *p != '\0'; p = (q == NULL ? p + l : q + 1)) { |
322 | 2.06k | int this_number; |
323 | | |
324 | 2.06k | if ((q = strchr(p, separator)) == NULL) |
325 | 1.24k | l = strlen(p); /* offset to \0 */ |
326 | 821 | else |
327 | 821 | l = q - p; /* offset to the next separator */ |
328 | | |
329 | 2.06k | this_number = namemap_name2num_n(namemap, p, l); |
330 | | |
331 | 2.06k | if (*p == '\0' || *p == separator) { |
332 | 0 | ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_BAD_ALGORITHM_NAME); |
333 | 0 | goto err; |
334 | 0 | } |
335 | 2.06k | if (number == 0) { |
336 | 1.45k | number = this_number; |
337 | 1.45k | } else if (this_number != 0 && this_number != number) { |
338 | 0 | ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES, |
339 | 0 | "\"%.*s\" has an existing different identity %d (from \"%s\")", |
340 | 0 | l, p, this_number, names); |
341 | 0 | goto err; |
342 | 0 | } |
343 | 2.06k | } |
344 | | |
345 | | /* Now that we have checked, register all names */ |
346 | 3.30k | for (p = names; *p != '\0'; p = (q == NULL ? p + l : q + 1)) { |
347 | 2.06k | int this_number; |
348 | | |
349 | 2.06k | if ((q = strchr(p, separator)) == NULL) |
350 | 1.24k | l = strlen(p); /* offset to \0 */ |
351 | 821 | else |
352 | 821 | l = q - p; /* offset to the next separator */ |
353 | | |
354 | 2.06k | this_number = namemap_add_name_n(namemap, number, p, l); |
355 | 2.06k | if (number == 0) { |
356 | 302 | number = this_number; |
357 | 1.76k | } else if (this_number != number) { |
358 | 0 | ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR, |
359 | 0 | "Got number %d when expecting %d", |
360 | 0 | this_number, number); |
361 | 0 | goto err; |
362 | 0 | } |
363 | 2.06k | } |
364 | | |
365 | 1.24k | CRYPTO_THREAD_unlock(namemap->lock); |
366 | 1.24k | return number; |
367 | | |
368 | 0 | err: |
369 | 0 | CRYPTO_THREAD_unlock(namemap->lock); |
370 | 0 | return 0; |
371 | 1.24k | } |
372 | | |
373 | | /*- |
374 | | * Pre-population |
375 | | * ============== |
376 | | */ |
377 | | |
378 | | #ifndef FIPS_MODULE |
379 | | #include <openssl/evp.h> |
380 | | |
381 | | /* Creates an initial namemap with names found in the legacy method db */ |
382 | | static void get_legacy_evp_names(int base_nid, int nid, const char *pem_name, |
383 | | void *arg) |
384 | 11.5k | { |
385 | 11.5k | int num = 0; |
386 | 11.5k | ASN1_OBJECT *obj; |
387 | | |
388 | 11.5k | if (base_nid != NID_undef) { |
389 | 204 | num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid)); |
390 | 204 | num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid)); |
391 | 204 | } |
392 | | |
393 | 11.5k | if (nid != NID_undef) { |
394 | 9.43k | num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid)); |
395 | 9.43k | num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid)); |
396 | 9.43k | if ((obj = OBJ_nid2obj(nid)) != NULL) { |
397 | 9.43k | char txtoid[OSSL_MAX_NAME_SIZE]; |
398 | | |
399 | 9.43k | if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0) |
400 | 9.38k | num = ossl_namemap_add_name(arg, num, txtoid); |
401 | 9.43k | } |
402 | 9.43k | } |
403 | 11.5k | if (pem_name != NULL) |
404 | 495 | num = ossl_namemap_add_name(arg, num, pem_name); |
405 | 11.5k | } |
406 | | |
407 | | static void get_legacy_cipher_names(const OBJ_NAME *on, void *arg) |
408 | 8.19k | { |
409 | 8.19k | const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type); |
410 | | |
411 | 8.19k | if (cipher != NULL) |
412 | 8.19k | get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg); |
413 | 8.19k | } |
414 | | |
415 | | static void get_legacy_md_names(const OBJ_NAME *on, void *arg) |
416 | 2.65k | { |
417 | 2.65k | const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type); |
418 | | |
419 | 2.65k | if (md != NULL) |
420 | 2.65k | get_legacy_evp_names(0, EVP_MD_get_type(md), NULL, arg); |
421 | 2.65k | } |
422 | | |
423 | | static void get_legacy_pkey_meth_names(const EVP_PKEY_ASN1_METHOD *ameth, |
424 | | void *arg) |
425 | 699 | { |
426 | 699 | int nid = 0, base_nid = 0, flags = 0; |
427 | 699 | const char *pem_name = NULL; |
428 | | |
429 | 699 | EVP_PKEY_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth); |
430 | 699 | if (nid != NID_undef) { |
431 | 699 | if ((flags & ASN1_PKEY_ALIAS) == 0) { |
432 | 450 | switch (nid) { |
433 | 45 | case EVP_PKEY_DHX: |
434 | | /* We know that the name "DHX" is used too */ |
435 | 45 | get_legacy_evp_names(0, nid, "DHX", arg); |
436 | | /* FALLTHRU */ |
437 | 450 | default: |
438 | 450 | get_legacy_evp_names(0, nid, pem_name, arg); |
439 | 450 | } |
440 | 450 | } else { |
441 | | /* |
442 | | * Treat aliases carefully, some of them are undesirable, or |
443 | | * should not be treated as such for providers. |
444 | | */ |
445 | | |
446 | 249 | switch (nid) { |
447 | 45 | case EVP_PKEY_SM2: |
448 | | /* |
449 | | * SM2 is a separate keytype with providers, not an alias for |
450 | | * EC. |
451 | | */ |
452 | 45 | get_legacy_evp_names(0, nid, pem_name, arg); |
453 | 45 | break; |
454 | 204 | default: |
455 | | /* Use the short name of the base nid as the common reference */ |
456 | 204 | get_legacy_evp_names(base_nid, nid, pem_name, arg); |
457 | 249 | } |
458 | 249 | } |
459 | 699 | } |
460 | 699 | } |
461 | | #endif |
462 | | |
463 | | /*- |
464 | | * Constructors / destructors |
465 | | * ========================== |
466 | | */ |
467 | | |
468 | | OSSL_NAMEMAP *ossl_namemap_stored(OSSL_LIB_CTX *libctx) |
469 | 285M | { |
470 | 285M | #ifndef FIPS_MODULE |
471 | 285M | int nms; |
472 | 285M | #endif |
473 | 285M | OSSL_NAMEMAP *namemap = |
474 | 285M | ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX, |
475 | 285M | &stored_namemap_method); |
476 | | |
477 | 285M | if (namemap == NULL) |
478 | 0 | return NULL; |
479 | | |
480 | 285M | #ifndef FIPS_MODULE |
481 | 285M | nms = ossl_namemap_empty(namemap); |
482 | 285M | if (nms < 0) { |
483 | | /* |
484 | | * Could not get lock to make the count, so maybe internal objects |
485 | | * weren't added. This seems safest. |
486 | | */ |
487 | 0 | return NULL; |
488 | 0 | } |
489 | 285M | if (nms == 1) { |
490 | 45 | int i, end; |
491 | | |
492 | | /* Before pilfering, we make sure the legacy database is populated */ |
493 | 45 | OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS |
494 | 45 | | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL); |
495 | | |
496 | 45 | OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH, |
497 | 45 | get_legacy_cipher_names, namemap); |
498 | 45 | OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH, |
499 | 45 | get_legacy_md_names, namemap); |
500 | | |
501 | | /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */ |
502 | 744 | for (i = 0, end = EVP_PKEY_asn1_get_count(); i < end; i++) |
503 | 699 | get_legacy_pkey_meth_names(EVP_PKEY_asn1_get0(i), namemap); |
504 | 45 | } |
505 | 285M | #endif |
506 | | |
507 | 285M | return namemap; |
508 | 285M | } |
509 | | |
510 | | OSSL_NAMEMAP *ossl_namemap_new(void) |
511 | 77 | { |
512 | 77 | OSSL_NAMEMAP *namemap; |
513 | | |
514 | 77 | if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) != NULL |
515 | 77 | && (namemap->lock = CRYPTO_THREAD_lock_new()) != NULL |
516 | 77 | && (namemap->namenum = |
517 | 77 | lh_NAMENUM_ENTRY_new(namenum_hash, namenum_cmp)) != NULL) |
518 | 77 | return namemap; |
519 | | |
520 | 0 | ossl_namemap_free(namemap); |
521 | 0 | return NULL; |
522 | 77 | } |
523 | | |
524 | | void ossl_namemap_free(OSSL_NAMEMAP *namemap) |
525 | 106 | { |
526 | 106 | if (namemap == NULL || namemap->stored) |
527 | 0 | return; |
528 | | |
529 | 106 | lh_NAMENUM_ENTRY_doall(namemap->namenum, namenum_free); |
530 | 106 | lh_NAMENUM_ENTRY_free(namemap->namenum); |
531 | | |
532 | 106 | CRYPTO_THREAD_lock_free(namemap->lock); |
533 | 106 | OPENSSL_free(namemap); |
534 | 106 | } |