summaryrefslogtreecommitdiffstats
path: root/crypto/x509/v3_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/v3_lib.c')
-rw-r--r--crypto/x509/v3_lib.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/x509/v3_lib.c b/crypto/x509/v3_lib.c
index 5c05b56d9c..ced105adfa 100644
--- a/crypto/x509/v3_lib.c
+++ b/crypto/x509/v3_lib.c
@@ -26,11 +26,11 @@ int X509V3_EXT_add(X509V3_EXT_METHOD *ext)
{
if (ext_list == NULL
&& (ext_list = sk_X509V3_EXT_METHOD_new(ext_cmp)) == NULL) {
- ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB);
return 0;
}
if (!sk_X509V3_EXT_METHOD_push(ext_list, ext)) {
- ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB);
return 0;
}
return 1;
@@ -92,10 +92,8 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from)
ERR_raise(ERR_LIB_X509V3, X509V3_R_EXTENSION_NOT_FOUND);
return 0;
}
- if ((tmpext = OPENSSL_malloc(sizeof(*tmpext))) == NULL) {
- ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE);
+ if ((tmpext = OPENSSL_malloc(sizeof(*tmpext))) == NULL)
return 0;
- }
*tmpext = *ext;
tmpext->ext_nid = nid_to;
tmpext->ext_flags |= X509V3_EXT_DYNAMIC;
@@ -291,7 +289,7 @@ int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value,
return 1;
m_fail:
- /* ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE); */
+ /* ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB); */
if (ret != *x)
sk_X509_EXTENSION_free(ret);
X509_EXTENSION_free(ext);