Changeset 95219 in vbox for trunk/src/libs/openssl-3.0.3/crypto/engine
- Timestamp:
- Jun 8, 2022 7:43:44 AM (3 years ago)
- Location:
- trunk/src/libs/openssl-3.0.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.3
- Property svn:mergeinfo
-
old new 14 14 /vendor/openssl/3.0.1:150323-150324 15 15 /vendor/openssl/3.0.2:150728-150729 16 /vendor/openssl/current:147554-150727 16 /vendor/openssl/3.0.3:151497-151729 17 /vendor/openssl/current:147554-151496
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.3/crypto/engine/eng_dyn.c
r94404 r95219 402 402 } 403 403 404 /* 405 * Unfortunately the version checker does not distinguish between 406 * engines built for openssl 1.1.x and openssl 3.x, but loading 407 * an engine that is built for openssl 1.1.x will cause a fatal 408 * error. Detect such engines, since EVP_PKEY_base_id is exported 409 * as a function in openssl 1.1.x, while it is named EVP_PKEY_get_base_id 410 * in openssl 3.x. Therefore we take the presence of that symbol 411 * as an indication that the engine will be incompatible. 412 */ 413 static int using_libcrypto_11(dynamic_data_ctx *ctx) 414 { 415 int ret; 416 417 ERR_set_mark(); 418 ret = DSO_bind_func(ctx->dynamic_dso, "EVP_PKEY_base_id") != NULL; 419 ERR_pop_to_mark(); 420 421 return ret; 422 } 423 404 424 static int dynamic_load(ENGINE *e, dynamic_data_ctx *ctx) 405 425 { … … 451 471 * We fail if the version checker veto'd the load *or* if it is 452 472 * deferring to us (by returning its version) and we think it is too 453 * old. 454 * Unfortunately the version checker does not distinguish between 455 * engines built for openssl 1.1.x and openssl 3.x, but loading 456 * an engine that is built for openssl 1.1.x will cause a fatal 457 * error. Detect such engines, since EVP_PKEY_base_id is exported 458 * as a function in openssl 1.1.x, while it is a macro in openssl 3.x, 459 * and therefore only the symbol EVP_PKEY_get_base_id is available 460 * in openssl 3.x. 473 * old. Also fail if this is engine for openssl 1.1.x. 461 474 */ 462 if (vcheck_res < OSSL_DYNAMIC_OLDEST 463 || DSO_bind_func(ctx->dynamic_dso, 464 "EVP_PKEY_base_id") != NULL) { 475 if (vcheck_res < OSSL_DYNAMIC_OLDEST || using_libcrypto_11(ctx)) { 465 476 /* Fail */ 466 477 ctx->bind_engine = NULL; -
trunk/src/libs/openssl-3.0.3/crypto/engine/tb_asnmth.c
r94082 r95219 1 1 /* 2 * Copyright 2006-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2006-2022 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 4 * Licensed under the Apache License 2.0 (the "License"). You may not use … … 153 153 if (ameth != NULL 154 154 && ((int)strlen(ameth->pem_str) == len) 155 && strncasecmp(ameth->pem_str, str, len) == 0)155 && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0) 156 156 return ameth; 157 157 } … … 178 178 if (ameth != NULL 179 179 && ((int)strlen(ameth->pem_str) == lk->len) 180 && strncasecmp(ameth->pem_str, lk->str, lk->len) == 0) {180 && OPENSSL_strncasecmp(ameth->pem_str, lk->str, lk->len) == 0) { 181 181 lk->e = e; 182 182 lk->ameth = ameth;
Note:
See TracChangeset
for help on using the changeset viewer.