summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/evp_lib.c')
-rw-r--r--src/lib/libcrypto/evp/evp_lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c
index 3f9bf55828..a431945ef5 100644
--- a/src/lib/libcrypto/evp/evp_lib.c
+++ b/src/lib/libcrypto/evp/evp_lib.c
@@ -115,6 +115,7 @@ int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
115int EVP_CIPHER_type(const EVP_CIPHER *ctx) 115int EVP_CIPHER_type(const EVP_CIPHER *ctx)
116{ 116{
117 int nid; 117 int nid;
118 ASN1_OBJECT *otmp;
118 nid = EVP_CIPHER_nid(ctx); 119 nid = EVP_CIPHER_nid(ctx);
119 120
120 switch(nid) { 121 switch(nid) {
@@ -131,7 +132,10 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx)
131 return NID_rc4; 132 return NID_rc4;
132 133
133 default: 134 default:
134 135 /* Check it has an OID and it is valid */
136 otmp = OBJ_nid2obj(nid);
137 if(!otmp || !otmp->data) nid = NID_undef;
138 ASN1_OBJECT_free(otmp);
135 return nid; 139 return nid;
136 } 140 }
137} 141}