}
x = X509_new_ex(ssl->ctx->libctx, ssl->ctx->propq);
if (x == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
goto end;
}
if (type == SSL_FILETYPE_ASN1) {
x = X509_new_ex(ssl->ctx->libctx, ssl->ctx->propq);
if (x == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
return 0;
}
}
x = X509_new_ex(ctx->libctx, ctx->propq);
if (x == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
goto end;
}
if (type == SSL_FILETYPE_ASN1) {
x = X509_new_ex(ctx->libctx, ctx->propq);
if (x == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
return 0;
}
x = X509_new_ex(real_ctx->libctx, real_ctx->propq);
if (x == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
goto end;
}
if (PEM_read_bio_X509_AUX(in, &x, passwd_callback,
while (1) {
ca = X509_new_ex(real_ctx->libctx, real_ctx->propq);
if (ca == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
goto end;
}
if (PEM_read_bio_X509(in, &ca, passwd_callback,
int ret;
sinfo = OPENSSL_malloc(sinfo_length);
- if (sinfo == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ if (sinfo == NULL)
return 0;
- }
extension_append(SSL_SERVERINFOV1, serverinfo, serverinfo_length, sinfo);
}
new_serverinfo = OPENSSL_realloc(ctx->cert->key->serverinfo,
serverinfo_length);
- if (new_serverinfo == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ if (new_serverinfo == NULL)
return 0;
- }
ctx->cert->key->serverinfo = new_serverinfo;
memcpy(ctx->cert->key->serverinfo, serverinfo, serverinfo_length);
ctx->cert->key->serverinfo_length = serverinfo_length;
/* Append the decoded extension to the serverinfo buffer */
append_length = extension_append_length(version, extension_length);
tmp = OPENSSL_realloc(serverinfo, serverinfo_length + append_length);
- if (tmp == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ if (tmp == NULL)
goto end;
- }
serverinfo = tmp;
extension_append(version, extension, extension_length,
serverinfo + serverinfo_length);
if (chain != NULL) {
dup_chain = X509_chain_up_ref(chain);
if (dup_chain == NULL) {
- ERR_raise(ERR_LIB_SSL, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
goto out;
}
}