VirtualBox

Ignore:
Timestamp:
Jun 8, 2022 7:43:44 AM (3 years ago)
Author:
vboxsync
Message:

libs/openssl: Switched to v3.0.3, bugref:10128

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  
        1414/vendor/openssl/3.0.1:150323-150324
        1515/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
  • trunk/src/libs/openssl-3.0.3/crypto/engine/eng_dyn.c

    r94404 r95219  
    402402}
    403403
     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 */
     413static 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
    404424static int dynamic_load(ENGINE *e, dynamic_data_ctx *ctx)
    405425{
     
    451471         * We fail if the version checker veto'd the load *or* if it is
    452472         * 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.
    461474         */
    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)) {
    465476            /* Fail */
    466477            ctx->bind_engine = NULL;
  • trunk/src/libs/openssl-3.0.3/crypto/engine/tb_asnmth.c

    r94082 r95219  
    11/*
    2  * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2006-2022 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    44 * Licensed under the Apache License 2.0 (the "License").  You may not use
     
    153153        if (ameth != NULL
    154154            && ((int)strlen(ameth->pem_str) == len)
    155             && strncasecmp(ameth->pem_str, str, len) == 0)
     155            && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0)
    156156            return ameth;
    157157    }
     
    178178        if (ameth != NULL
    179179                && ((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) {
    181181            lk->e = e;
    182182            lk->ameth = ameth;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette