mirror of https://github.com/openssl/openssl.git
				
				
				
			Don't core dump when using CMAC with dgst.
We can't unfortunately print the CMAC cipher used without extending the API. PR#2579
This commit is contained in:
		
							parent
							
								
									6e6ba36d98
								
							
						
					
					
						commit
						90c1946e7a
					
				|  | @ -529,6 +529,7 @@ int MAIN(int argc, char **argv) | ||||||
| 					EVP_PKEY_asn1_get0_info(NULL, NULL, | 					EVP_PKEY_asn1_get0_info(NULL, NULL, | ||||||
| 						NULL, NULL, &sig_name, ameth); | 						NULL, NULL, &sig_name, ameth); | ||||||
| 				} | 				} | ||||||
|  | 			if (md) | ||||||
| 				md_name = EVP_MD_name(md); | 				md_name = EVP_MD_name(md); | ||||||
| 			} | 			} | ||||||
| 		err = 0; | 		err = 0; | ||||||
|  | @ -641,7 +642,12 @@ int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, | ||||||
| 	else  | 	else  | ||||||
| 		{ | 		{ | ||||||
| 		if (sig_name) | 		if (sig_name) | ||||||
| 			BIO_printf(out, "%s-%s(%s)= ", sig_name, md_name, file); | 			{ | ||||||
|  | 			BIO_puts(out, sig_name); | ||||||
|  | 			if (md_name) | ||||||
|  | 				BIO_printf(out, "-%s", md_name); | ||||||
|  | 			BIO_printf(out, "(%s)= ", file); | ||||||
|  | 			} | ||||||
| 		else if (md_name) | 		else if (md_name) | ||||||
| 			BIO_printf(out, "%s(%s)= ", md_name, file); | 			BIO_printf(out, "%s(%s)= ", md_name, file); | ||||||
| 		else | 		else | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue