aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/evp/names.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/evp/names.c')
-rw-r--r--openssl/crypto/evp/names.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl/crypto/evp/names.c b/openssl/crypto/evp/names.c
index f2869f5c7..6311ad7cf 100644
--- a/openssl/crypto/evp/names.c
+++ b/openssl/crypto/evp/names.c
@@ -66,6 +66,10 @@ int EVP_add_cipher(const EVP_CIPHER *c)
{
int r;
+ if (c == NULL) return 0;
+
+ OPENSSL_init();
+
r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c);
if (r == 0) return(0);
check_defer(c->nid);
@@ -78,6 +82,7 @@ int EVP_add_digest(const EVP_MD *md)
{
int r;
const char *name;
+ OPENSSL_init();
name=OBJ_nid2sn(md->type);
r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md);