VirtualBox

Ignore:
Timestamp:
Nov 2, 2022 7:40:16 AM (2 years ago)
Author:
vboxsync
Message:

libs: Switch to openssl-3.0.7, bugref:10317

Location:
trunk/src/libs/openssl-3.0.7
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/openssl-3.0.7

    • Property svn:mergeinfo
      •  

        old new  
        1515/vendor/openssl/3.0.2:150728-150729
        1616/vendor/openssl/3.0.3:151497-151729
        17 /vendor/openssl/current:147554-151496
         17/vendor/openssl/3.0.7:154371
         18/vendor/openssl/current:147554-154370
  • trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_ameth.c

    r94404 r97372  
    161161        ERR_raise(ERR_LIB_RSA, ERR_R_MALLOC_FAILURE);
    162162        ASN1_STRING_free(str);
     163        OPENSSL_clear_free(rk, rklen);
    163164        return 0;
    164165    }
     
    455456    if (EVP_PKEY_CTX_get_rsa_mgf1_md(pkctx, &mgf1md) <= 0)
    456457        return NULL;
    457     if (!EVP_PKEY_CTX_get_rsa_pss_saltlen(pkctx, &saltlen))
     458    if (EVP_PKEY_CTX_get_rsa_pss_saltlen(pkctx, &saltlen) <= 0)
    458459        return NULL;
    459460    if (saltlen == -1) {
  • trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_backend.c

    r95219 r97372  
    5050            BIGNUM *tmp = NULL;
    5151
    52             if (!OSSL_PARAM_get_BN(p, &tmp)
    53                 || sk_BIGNUM_push(numbers, tmp) == 0)
     52            if (!OSSL_PARAM_get_BN(p, &tmp))
    5453                return 0;
     54            if (sk_BIGNUM_push(numbers, tmp) == 0) {
     55                BN_clear_free(tmp);
     56                return 0;
     57            }
    5558        }
    5659    }
  • trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_chk.c

    r94082 r97372  
    11/*
    2  * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    44 * Licensed under the Apache License 2.0 (the "License").  You may not use
     
    246246    return ossl_rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key));
    247247#else
    248     return rsa_validate_keypair_multiprime(key, NULL);
     248    return rsa_validate_keypair_multiprime(key, NULL) > 0;
    249249#endif
    250250}
  • trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_gen.c

    r94082 r97372  
    11/*
    2  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    44 * Licensed under the Apache License 2.0 (the "License").  You may not use
     
    427427    int ok = 0;
    428428
     429#ifdef FIPS_MODULE
     430    ok = ossl_rsa_sp800_56b_generate_key(rsa, bits, e_value, cb);
     431    pairwise_test = 1; /* FIPS MODE needs to always run the pairwise test */
     432#else
    429433    /*
    430      * Only multi-prime keys or insecure keys with a small key length will use
    431      * the older rsa_multiprime_keygen().
     434     * Only multi-prime keys or insecure keys with a small key length or a
     435     * public exponent <= 2^16 will use the older rsa_multiprime_keygen().
    432436     */
    433     if (primes == 2 && bits >= 2048)
     437    if (primes == 2
     438            && bits >= 2048
     439            && (e_value == NULL || BN_num_bits(e_value) > 16))
    434440        ok = ossl_rsa_sp800_56b_generate_key(rsa, bits, e_value, cb);
    435 #ifndef FIPS_MODULE
    436441    else
    437442        ok = rsa_multiprime_keygen(rsa, bits, primes, e_value, cb);
    438443#endif /* FIPS_MODULE */
    439444
    440 #ifdef FIPS_MODULE
    441     pairwise_test = 1; /* FIPS MODE needs to always run the pairwise test */
    442 #endif
    443445    if (pairwise_test && ok > 0) {
    444446        OSSL_CALLBACK *stcb = NULL;
  • trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_lib.c

    r94082 r97372  
    11/*
    2  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    44 * Licensed under the Apache License 2.0 (the "License").  You may not use
     
    10851085{
    10861086    OSSL_PARAM rsa_params[2], *p = rsa_params;
     1087    int ret;
    10871088
    10881089    if (ctx == NULL || !EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
     
    11011102    *p++ = OSSL_PARAM_construct_end();
    11021103
    1103     if (!evp_pkey_ctx_set_params_strict(ctx, rsa_params))
    1104         return 0;
     1104    ret = evp_pkey_ctx_set_params_strict(ctx, rsa_params);
     1105    if (ret <= 0)
     1106        return ret;
    11051107
    11061108    /* Ownership is supposed to be transfered to the callee. */
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