From f4e2e1036009ff5904cc653bc960fc5f01e64941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 21 Apr 2006 15:00:10 +0000 Subject: [PATCH] (parse_rsa_private_key): use EVP_get_cipherbyname git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17135 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/ks_file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/hx509/ks_file.c b/lib/hx509/ks_file.c index 026c6a935..fd7e54bf6 100644 --- a/lib/hx509/ks_file.c +++ b/lib/hx509/ks_file.c @@ -179,7 +179,12 @@ parse_rsa_private_key(hx509_context context, struct hx509_collector *c, return ENOMEM; } - cipher = EVP_aes_256_cbc(); + cipher = EVP_get_cipherbyname(type); + if (cipher == NULL) { + free(type); + free(ivdata); + return EINVAL; + } #define PKCS5_SALT_LEN 8