Changeset 97372 in vbox for trunk/src/libs/openssl-3.0.7/crypto/rsa
- Timestamp:
- Nov 2, 2022 7:40:16 AM (2 years ago)
- 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 15 15 /vendor/openssl/3.0.2:150728-150729 16 16 /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
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_ameth.c
r94404 r97372 161 161 ERR_raise(ERR_LIB_RSA, ERR_R_MALLOC_FAILURE); 162 162 ASN1_STRING_free(str); 163 OPENSSL_clear_free(rk, rklen); 163 164 return 0; 164 165 } … … 455 456 if (EVP_PKEY_CTX_get_rsa_mgf1_md(pkctx, &mgf1md) <= 0) 456 457 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) 458 459 return NULL; 459 460 if (saltlen == -1) { -
trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_backend.c
r95219 r97372 50 50 BIGNUM *tmp = NULL; 51 51 52 if (!OSSL_PARAM_get_BN(p, &tmp) 53 || sk_BIGNUM_push(numbers, tmp) == 0) 52 if (!OSSL_PARAM_get_BN(p, &tmp)) 54 53 return 0; 54 if (sk_BIGNUM_push(numbers, tmp) == 0) { 55 BN_clear_free(tmp); 56 return 0; 57 } 55 58 } 56 59 } -
trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_chk.c
r94082 r97372 1 1 /* 2 * Copyright 1999-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1999-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 … … 246 246 return ossl_rsa_sp800_56b_check_keypair(key, NULL, -1, RSA_bits(key)); 247 247 #else 248 return rsa_validate_keypair_multiprime(key, NULL) ;248 return rsa_validate_keypair_multiprime(key, NULL) > 0; 249 249 #endif 250 250 } -
trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_gen.c
r94082 r97372 1 1 /* 2 * Copyright 1995-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-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 … … 427 427 int ok = 0; 428 428 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 429 433 /* 430 * Only multi-prime keys or insecure keys with a small key length will use431 * 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(). 432 436 */ 433 if (primes == 2 && bits >= 2048) 437 if (primes == 2 438 && bits >= 2048 439 && (e_value == NULL || BN_num_bits(e_value) > 16)) 434 440 ok = ossl_rsa_sp800_56b_generate_key(rsa, bits, e_value, cb); 435 #ifndef FIPS_MODULE436 441 else 437 442 ok = rsa_multiprime_keygen(rsa, bits, primes, e_value, cb); 438 443 #endif /* FIPS_MODULE */ 439 444 440 #ifdef FIPS_MODULE441 pairwise_test = 1; /* FIPS MODE needs to always run the pairwise test */442 #endif443 445 if (pairwise_test && ok > 0) { 444 446 OSSL_CALLBACK *stcb = NULL; -
trunk/src/libs/openssl-3.0.7/crypto/rsa/rsa_lib.c
r94082 r97372 1 1 /* 2 * Copyright 1995-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-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 … … 1085 1085 { 1086 1086 OSSL_PARAM rsa_params[2], *p = rsa_params; 1087 int ret; 1087 1088 1088 1089 if (ctx == NULL || !EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) { … … 1101 1102 *p++ = OSSL_PARAM_construct_end(); 1102 1103 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; 1105 1107 1106 1108 /* Ownership is supposed to be transfered to the callee. */
Note:
See TracChangeset
for help on using the changeset viewer.