mirror of https://github.com/openssl/openssl.git
				
				
				
			Fix acvp_test sig_gen
Ensure we set the size of the signature buffer before we call EVP_DigestSign() Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16789)
This commit is contained in:
		
							parent
							
								
									cff7d58eb4
								
							
						
					
					
						commit
						1b327433e5
					
				|  | @ -94,6 +94,7 @@ static int sig_gen(EVP_PKEY *pkey, OSSL_PARAM *params, const char *digest_name, | ||||||
|     size_t sig_len; |     size_t sig_len; | ||||||
|     size_t sz = EVP_PKEY_get_size(pkey); |     size_t sz = EVP_PKEY_get_size(pkey); | ||||||
| 
 | 
 | ||||||
|  |     sig_len = sz; | ||||||
|     if (!TEST_ptr(sig = OPENSSL_malloc(sz)) |     if (!TEST_ptr(sig = OPENSSL_malloc(sz)) | ||||||
|         || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) |         || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) | ||||||
|         || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, libctx, |         || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, libctx, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue