Set error code on alloc failures

Almost all *alloc failures now set an error code.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5842)
This commit is contained in:
Rich Salz 2018-04-03 11:31:16 -04:00
parent 29f484d00d
commit cdb10bae3f
85 changed files with 420 additions and 143 deletions

View file

@ -180,9 +180,10 @@ int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a)
return BIO_write(bp, "NULL", 4); return BIO_write(bp, "NULL", 4);
i = i2t_ASN1_OBJECT(buf, sizeof(buf), a); i = i2t_ASN1_OBJECT(buf, sizeof(buf), a);
if (i > (int)(sizeof(buf) - 1)) { if (i > (int)(sizeof(buf) - 1)) {
p = OPENSSL_malloc(i + 1); if ((p = OPENSSL_malloc(i + 1)) == NULL) {
if (p == NULL) ASN1err(ASN1_F_I2A_ASN1_OBJECT, ERR_R_MALLOC_FAILURE);
return -1; return -1;
}
i2t_ASN1_OBJECT(p, i + 1, a); i2t_ASN1_OBJECT(p, i + 1, a);
} }
if (i <= 0) { if (i <= 0) {

View file

@ -259,9 +259,10 @@ static int do_dump(unsigned long lflags, char_io *io_ch, void *arg,
t.type = str->type; t.type = str->type;
t.value.ptr = (char *)str; t.value.ptr = (char *)str;
der_len = i2d_ASN1_TYPE(&t, NULL); der_len = i2d_ASN1_TYPE(&t, NULL);
der_buf = OPENSSL_malloc(der_len); if ((der_buf = OPENSSL_malloc(der_len)) == NULL) {
if (der_buf == NULL) ASN1err(ASN1_F_DO_DUMP, ERR_R_MALLOC_FAILURE);
return -1; return -1;
}
p = der_buf; p = der_buf;
i2d_ASN1_TYPE(&t, &p); i2d_ASN1_TYPE(&t, &p);
outlen = do_hex_dump(io_ch, arg, der_buf, der_len); outlen = do_hex_dump(io_ch, arg, der_buf, der_len);

View file

@ -156,9 +156,10 @@ static ASN1_STRING_TABLE *stable_get(int nid)
tmp = ASN1_STRING_TABLE_get(nid); tmp = ASN1_STRING_TABLE_get(nid);
if (tmp != NULL && tmp->flags & STABLE_FLAGS_MALLOC) if (tmp != NULL && tmp->flags & STABLE_FLAGS_MALLOC)
return tmp; return tmp;
rv = OPENSSL_zalloc(sizeof(*rv)); if ((rv = OPENSSL_zalloc(sizeof(*rv))) == NULL) {
if (rv == NULL) ASN1err(ASN1_F_STABLE_GET, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
if (!sk_ASN1_STRING_TABLE_push(stable, rv)) { if (!sk_ASN1_STRING_TABLE_push(stable, rv)) {
OPENSSL_free(rv); OPENSSL_free(rv);
return NULL; return NULL;

View file

@ -18,6 +18,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_INTEGER, 0), "a2i_ASN1_INTEGER"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_INTEGER, 0), "a2i_ASN1_INTEGER"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_STRING, 0), "a2i_ASN1_STRING"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_A2I_ASN1_STRING, 0), "a2i_ASN1_STRING"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_APPEND_EXP, 0), "append_exp"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_APPEND_EXP, 0), "append_exp"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_BIO_INIT, 0), "asn1_bio_init"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_BIT_STRING_SET_BIT, 0), {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_BIT_STRING_SET_BIT, 0),
"ASN1_BIT_STRING_set_bit"}, "ASN1_BIT_STRING_set_bit"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_CB, 0), "asn1_cb"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_CB, 0), "asn1_cb"},
@ -31,6 +32,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_ADB, 0), "asn1_do_adb"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_ADB, 0), "asn1_do_adb"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_LOCK, 0), "asn1_do_lock"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DO_LOCK, 0), "asn1_do_lock"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DUP, 0), "ASN1_dup"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_DUP, 0), "ASN1_dup"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ENC_SAVE, 0), "asn1_enc_save"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_EX_C2I, 0), "asn1_ex_c2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_EX_C2I, 0), "asn1_ex_c2i"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_FIND_END, 0), "asn1_find_end"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_FIND_END, 0), "asn1_find_end"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_GENERALIZEDTIME_ADJ, 0), {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_GENERALIZEDTIME_ADJ, 0),
@ -47,6 +49,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
"asn1_item_embed_d2i"}, "asn1_item_embed_d2i"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EMBED_NEW, 0), {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EMBED_NEW, 0),
"asn1_item_embed_new"}, "asn1_item_embed_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_FLAGS_I2D, 0),
"asn1_item_flags_i2d"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_BIO, 0), "ASN1_item_i2d_bio"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_BIO, 0), "ASN1_item_i2d_bio"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_FP, 0), "ASN1_item_i2d_fp"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_I2D_FP, 0), "ASN1_item_i2d_fp"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_PACK, 0), "ASN1_item_pack"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_PACK, 0), "ASN1_item_pack"},
@ -60,6 +64,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OBJECT_NEW, 0), "ASN1_OBJECT_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OBJECT_NEW, 0), "ASN1_OBJECT_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OUTPUT_DATA, 0), "asn1_output_data"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_OUTPUT_DATA, 0), "asn1_output_data"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_PCTX_NEW, 0), "ASN1_PCTX_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_PCTX_NEW, 0), "ASN1_PCTX_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_PRIMITIVE_NEW, 0),
"asn1_primitive_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SCTX_NEW, 0), "ASN1_SCTX_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SCTX_NEW, 0), "ASN1_SCTX_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SIGN, 0), "ASN1_sign"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_SIGN, 0), "ASN1_sign"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_STR2TYPE, 0), "asn1_str2type"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_STR2TYPE, 0), "asn1_str2type"},
@ -103,7 +109,10 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
"d2i_AutoPrivateKey"}, "d2i_AutoPrivateKey"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PRIVATEKEY, 0), "d2i_PrivateKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PRIVATEKEY, 0), "d2i_PrivateKey"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PUBLICKEY, 0), "d2i_PublicKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_D2I_PUBLICKEY, 0), "d2i_PublicKey"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_CREATE, 0), "do_create"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_DUMP, 0), "do_dump"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_TCREATE, 0), "do_tcreate"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_DO_TCREATE, 0), "do_tcreate"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2A_ASN1_OBJECT, 0), "i2a_ASN1_OBJECT"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_BIO_STREAM, 0), {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_BIO_STREAM, 0),
"i2d_ASN1_bio_stream"}, "i2d_ASN1_bio_stream"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_DSA_PUBKEY, 0), "i2d_DSA_PUBKEY"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_DSA_PUBKEY, 0), "i2d_DSA_PUBKEY"},
@ -112,6 +121,8 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_PUBLICKEY, 0), "i2d_PublicKey"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_PUBLICKEY, 0), "i2d_PublicKey"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_RSA_PUBKEY, 0), "i2d_RSA_PUBKEY"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_RSA_PUBKEY, 0), "i2d_RSA_PUBKEY"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_LONG_C2I, 0), "long_c2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_LONG_C2I, 0), "long_c2i"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_NDEF_PREFIX, 0), "ndef_prefix"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_NDEF_SUFFIX, 0), "ndef_suffix"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_OID_MODULE_INIT, 0), "oid_module_init"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_OID_MODULE_INIT, 0), "oid_module_init"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_PARSE_TAGGING, 0), "parse_tagging"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PARSE_TAGGING, 0), "parse_tagging"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_PBE2_SET_IV, 0), "PKCS5_pbe2_set_iv"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_PBE2_SET_IV, 0), "PKCS5_pbe2_set_iv"},
@ -124,9 +135,12 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_SCRYPT_SET, 0), "pkcs5_scrypt_set"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_PKCS5_SCRYPT_SET, 0), "pkcs5_scrypt_set"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_READ_ASN1, 0), "SMIME_read_ASN1"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_READ_ASN1, 0), "SMIME_read_ASN1"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_TEXT, 0), "SMIME_text"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_SMIME_TEXT, 0), "SMIME_text"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_STABLE_GET, 0), "stable_get"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_STBL_MODULE_INIT, 0), "stbl_module_init"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_STBL_MODULE_INIT, 0), "stbl_module_init"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT32_C2I, 0), "uint32_c2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT32_C2I, 0), "uint32_c2i"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT32_NEW, 0), "uint32_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT64_C2I, 0), "uint64_c2i"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT64_C2I, 0), "uint64_c2i"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_UINT64_NEW, 0), "uint64_new"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_CRL_ADD0_REVOKED, 0), {ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_CRL_ADD0_REVOKED, 0),
"X509_CRL_add0_revoked"}, "X509_CRL_add0_revoked"},
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_INFO_NEW, 0), "X509_INFO_new"}, {ERR_PACK(ERR_LIB_ASN1, ASN1_F_X509_INFO_NEW, 0), "X509_INFO_new"},

View file

@ -92,9 +92,10 @@ static int do_create(const char *value, const char *name)
p--; p--;
} }
p++; p++;
lntmp = OPENSSL_malloc((p - ln) + 1); if ((lntmp = OPENSSL_malloc((p - ln) + 1)) == NULL) {
if (lntmp == NULL) ASN1err(ASN1_F_DO_CREATE, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(lntmp, ln, p - ln); memcpy(lntmp, ln, p - ln);
lntmp[p - ln] = 0; lntmp[p - ln] = 0;
oid = OBJ_nid2obj(nid); oid = OBJ_nid2obj(nid);

View file

@ -116,9 +116,10 @@ static int asn1_bio_new(BIO *b)
static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size) static int asn1_bio_init(BIO_ASN1_BUF_CTX *ctx, int size)
{ {
ctx->buf = OPENSSL_malloc(size); if ((ctx->buf = OPENSSL_malloc(size)) == NULL) {
if (ctx->buf == NULL) ASN1err(ASN1_F_ASN1_BIO_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->bufsize = size; ctx->bufsize = size;
ctx->asn1_class = V_ASN1_UNIVERSAL; ctx->asn1_class = V_ASN1_UNIVERSAL;
ctx->asn1_tag = V_ASN1_OCTET_STRING; ctx->asn1_tag = V_ASN1_OCTET_STRING;

View file

@ -113,9 +113,10 @@ static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
ndef_aux = *(NDEF_SUPPORT **)parg; ndef_aux = *(NDEF_SUPPORT **)parg;
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen); if ((p = OPENSSL_malloc(derlen)) == NULL) {
if (p == NULL) ASN1err(ASN1_F_NDEF_PREFIX, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ndef_aux->derbuf = p; ndef_aux->derbuf = p;
*pbuf = p; *pbuf = p;
@ -182,9 +183,10 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg)
return 0; return 0;
derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it);
p = OPENSSL_malloc(derlen); if ((p = OPENSSL_malloc(derlen)) == NULL) {
if (p == NULL) ASN1err(ASN1_F_NDEF_SUFFIX, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ndef_aux->derbuf = p; ndef_aux->derbuf = p;
*pbuf = p; *pbuf = p;

View file

@ -57,12 +57,14 @@ static int asn1_item_flags_i2d(ASN1_VALUE *val, unsigned char **out,
if (out && !*out) { if (out && !*out) {
unsigned char *p, *buf; unsigned char *p, *buf;
int len; int len;
len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags); len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
if (len <= 0) if (len <= 0)
return len; return len;
buf = OPENSSL_malloc(len); if ((buf = OPENSSL_malloc(len)) == NULL) {
if (buf == NULL) ASN1err(ASN1_F_ASN1_ITEM_FLAGS_I2D, ERR_R_MALLOC_FAILURE);
return -1; return -1;
}
p = buf; p = buf;
ASN1_item_ex_i2d(&val, &p, it, -1, flags); ASN1_item_ex_i2d(&val, &p, it, -1, flags);
*out = buf; *out = buf;

View file

@ -299,9 +299,10 @@ static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
return 1; return 1;
case V_ASN1_ANY: case V_ASN1_ANY:
typ = OPENSSL_malloc(sizeof(*typ)); if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL) {
if (typ == NULL) ASN1err(ASN1_F_ASN1_PRIMITIVE_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
typ->value.ptr = NULL; typ->value.ptr = NULL;
typ->type = -1; typ->type = -1;
*pval = (ASN1_VALUE *)typ; *pval = (ASN1_VALUE *)typ;

View file

@ -133,9 +133,10 @@ int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
return 1; return 1;
OPENSSL_free(enc->enc); OPENSSL_free(enc->enc);
enc->enc = OPENSSL_malloc(inlen); if ((enc->enc = OPENSSL_malloc(inlen)) == NULL) {
if (enc->enc == NULL) ASN1err(ASN1_F_ASN1_ENC_SAVE, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(enc->enc, in, inlen); memcpy(enc->enc, in, inlen);
enc->len = inlen; enc->len = inlen;
enc->modified = 0; enc->modified = 0;

View file

@ -28,9 +28,10 @@
static int uint64_new(ASN1_VALUE **pval, const ASN1_ITEM *it) static int uint64_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
{ {
*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint64_t)); if ((*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint64_t))) == NULL) {
if (*pval == NULL) ASN1err(ASN1_F_UINT64_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
return 1; return 1;
} }
@ -110,9 +111,10 @@ static int uint64_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it,
static int uint32_new(ASN1_VALUE **pval, const ASN1_ITEM *it) static int uint32_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
{ {
*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint32_t)); if ((*pval = (ASN1_VALUE *)OPENSSL_zalloc(sizeof(uint32_t))) == NULL) {
if (*pval == NULL) ASN1err(ASN1_F_UINT32_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
return 1; return 1;
} }

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -21,6 +21,8 @@ static const ERR_STRING_DATA ASYNC_str_functs[] = {
{ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_PAUSE_JOB, 0), "ASYNC_pause_job"}, {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_PAUSE_JOB, 0), "ASYNC_pause_job"},
{ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_FUNC, 0), "async_start_func"}, {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_FUNC, 0), "async_start_func"},
{ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_JOB, 0), "ASYNC_start_job"}, {ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_START_JOB, 0), "ASYNC_start_job"},
{ERR_PACK(ERR_LIB_ASYNC, ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD, 0),
"ASYNC_WAIT_CTX_set_wait_fd"},
{0, NULL} {0, NULL}
}; };

View file

@ -47,9 +47,10 @@ int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
{ {
struct fd_lookup_st *fdlookup; struct fd_lookup_st *fdlookup;
fdlookup = OPENSSL_zalloc(sizeof(*fdlookup)); if ((fdlookup = OPENSSL_zalloc(sizeof(*fdlookup))) == NULL) {
if (fdlookup == NULL) ASYNCerr(ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
fdlookup->key = key; fdlookup->key = key;
fdlookup->fd = fd; fdlookup->fd = fd;

View file

@ -565,9 +565,10 @@ static int addrinfo_wrap(int family, int socktype,
unsigned short port, unsigned short port,
BIO_ADDRINFO **bai) BIO_ADDRINFO **bai)
{ {
*bai = OPENSSL_zalloc(sizeof(**bai)); if ((*bai = OPENSSL_zalloc(sizeof(**bai))) == NULL) {
if (*bai == NULL) BIOerr(BIO_F_ADDRINFO_WRAP, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
(*bai)->bai_family = family; (*bai)->bai_family = family;
(*bai)->bai_socktype = socktype; (*bai)->bai_socktype = socktype;

View file

@ -819,9 +819,10 @@ doapr_outch(char **sbuffer,
*maxlen += BUFFER_INC; *maxlen += BUFFER_INC;
if (*buffer == NULL) { if (*buffer == NULL) {
*buffer = OPENSSL_malloc(*maxlen); if ((*buffer = OPENSSL_malloc(*maxlen)) == NULL) {
if (*buffer == NULL) BIOerr(BIO_F_DOAPR_OUTCH, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (*currlen > 0) { if (*currlen > 0) {
if (!ossl_assert(*sbuffer != NULL)) if (!ossl_assert(*sbuffer != NULL))
return 0; return 0;

View file

@ -59,11 +59,13 @@ static int linebuffer_new(BIO *bi)
{ {
BIO_LINEBUFFER_CTX *ctx; BIO_LINEBUFFER_CTX *ctx;
ctx = OPENSSL_malloc(sizeof(*ctx)); if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL) {
if (ctx == NULL) BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE); ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);
if (ctx->obuf == NULL) { if (ctx->obuf == NULL) {
BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE);
OPENSSL_free(ctx); OPENSSL_free(ctx);
return 0; return 0;
} }

View file

@ -15,6 +15,7 @@
static const ERR_STRING_DATA BIO_str_functs[] = { static const ERR_STRING_DATA BIO_str_functs[] = {
{ERR_PACK(ERR_LIB_BIO, BIO_F_ACPT_STATE, 0), "acpt_state"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_ACPT_STATE, 0), "acpt_state"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_ADDRINFO_WRAP, 0), "addrinfo_wrap"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_ADDR_STRINGS, 0), "addr_strings"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_ADDR_STRINGS, 0), "addr_strings"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT, 0), "BIO_accept"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT, 0), "BIO_accept"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT_EX, 0), "BIO_accept_ex"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BIO_ACCEPT_EX, 0), "BIO_accept_ex"},
@ -55,11 +56,14 @@ static const ERR_STRING_DATA BIO_str_functs[] = {
{ERR_PACK(ERR_LIB_BIO, BIO_F_BUFFER_CTRL, 0), "buffer_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_BUFFER_CTRL, 0), "buffer_ctrl"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_CTRL, 0), "conn_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_CTRL, 0), "conn_ctrl"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_STATE, 0), "conn_state"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_CONN_STATE, 0), "conn_state"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_NEW, 0), "dgram_sctp_new"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_READ, 0), "dgram_sctp_read"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_READ, 0), "dgram_sctp_read"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_WRITE, 0), "dgram_sctp_write"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_DGRAM_SCTP_WRITE, 0), "dgram_sctp_write"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_DOAPR_OUTCH, 0), "doapr_outch"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_CTRL, 0), "file_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_CTRL, 0), "file_ctrl"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_READ, 0), "file_read"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_FILE_READ, 0), "file_read"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_CTRL, 0), "linebuffer_ctrl"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_CTRL, 0), "linebuffer_ctrl"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_LINEBUFFER_NEW, 0), "linebuffer_new"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_MEM_WRITE, 0), "mem_write"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_MEM_WRITE, 0), "mem_write"},
{ERR_PACK(ERR_LIB_BIO, BIO_F_SSL_NEW, 0), "SSL_new"}, {ERR_PACK(ERR_LIB_BIO, BIO_F_SSL_NEW, 0), "SSL_new"},
{0, NULL} {0, NULL}

View file

@ -955,9 +955,10 @@ static int dgram_sctp_new(BIO *bi)
bi->init = 0; bi->init = 0;
bi->num = 0; bi->num = 0;
data = OPENSSL_zalloc(sizeof(*data)); if ((data = OPENSSL_zalloc(sizeof(*data))) == NULL) {
if (data == NULL) BIOerr(BIO_F_DGRAM_SCTP_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
# ifdef SCTP_PR_SCTP_NONE # ifdef SCTP_PR_SCTP_NONE
data->prinfo.pr_policy = SCTP_PR_SCTP_NONE; data->prinfo.pr_policy = SCTP_PR_SCTP_NONE;
# endif # endif

View file

@ -255,9 +255,12 @@ static int BN_STACK_push(BN_STACK *st, unsigned int idx)
/* Need to expand */ /* Need to expand */
unsigned int newsize = unsigned int newsize =
st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES; st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
unsigned int *newitems = OPENSSL_malloc(sizeof(*newitems) * newsize); unsigned int *newitems;
if (newitems == NULL)
if ((newitems = OPENSSL_malloc(sizeof(*newitems) * newsize)) == NULL) {
BNerr(BN_F_BN_STACK_PUSH, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (st->depth) if (st->depth)
memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth); memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
OPENSSL_free(st->indexes); OPENSSL_free(st->indexes);
@ -306,9 +309,12 @@ static BIGNUM *BN_POOL_get(BN_POOL *p, int flag)
/* Full; allocate a new pool item and link it in. */ /* Full; allocate a new pool item and link it in. */
if (p->used == p->size) { if (p->used == p->size) {
BN_POOL_ITEM *item = OPENSSL_malloc(sizeof(*item)); BN_POOL_ITEM *item;
if (item == NULL)
if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) {
BNerr(BN_F_BN_POOL_GET, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) { for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
bn_init(bn); bn_init(bn);
if ((flag & BN_FLG_SECURE) != 0) if ((flag & BN_FLG_SECURE) != 0)

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -64,10 +64,12 @@ static const ERR_STRING_DATA BN_str_functs[] = {
{ERR_PACK(ERR_LIB_BN, BN_F_BN_MOD_SQRT, 0), "BN_mod_sqrt"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MOD_SQRT, 0), "BN_mod_sqrt"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_MPI2BN, 0), "BN_mpi2bn"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_MPI2BN, 0), "BN_mpi2bn"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_NEW, 0), "BN_new"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_NEW, 0), "BN_new"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_POOL_GET, 0), "BN_POOL_get"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND, 0), "BN_rand"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND, 0), "BN_rand"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND_RANGE, 0), "BN_rand_range"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RAND_RANGE, 0), "BN_rand_range"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_RSHIFT, 0), "BN_rshift"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_RSHIFT, 0), "BN_rshift"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_SET_WORDS, 0), "bn_set_words"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_STACK_PUSH, 0), "BN_STACK_push"},
{ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"}, {ERR_PACK(ERR_LIB_BN, BN_F_BN_USUB, 0), "BN_usub"},
{0, NULL} {0, NULL}
}; };

View file

@ -168,9 +168,10 @@ int cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec,
{ {
ec->cipher = cipher; ec->cipher = cipher;
if (key) { if (key) {
ec->key = OPENSSL_malloc(keylen); if ((ec->key = OPENSSL_malloc(keylen)) == NULL) {
if (ec->key == NULL) CMSerr(CMS_F_CMS_ENCRYPTEDCONTENT_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(ec->key, key, keylen); memcpy(ec->key, key, keylen);
} }
ec->keylen = keylen; ec->keylen = keylen;

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -54,6 +54,8 @@ static const ERR_STRING_DATA CMS_str_functs[] = {
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_DIGEST_VERIFY, 0), "CMS_digest_verify"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_DIGEST_VERIFY, 0), "CMS_digest_verify"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCODE_RECEIPT, 0), "cms_encode_Receipt"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCODE_RECEIPT, 0), "cms_encode_Receipt"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPT, 0), "CMS_encrypt"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPT, 0), "CMS_encrypt"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDCONTENT_INIT, 0),
"cms_EncryptedContent_init"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, 0), {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO, 0),
"cms_EncryptedContent_init_bio"}, "cms_EncryptedContent_init_bio"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDDATA_DECRYPT, 0), {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_ENCRYPTEDDATA_DECRYPT, 0),
@ -147,6 +149,7 @@ static const ERR_STRING_DATA CMS_str_functs[] = {
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_STREAM, 0), "CMS_stream"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_STREAM, 0), "CMS_stream"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_UNCOMPRESS, 0), "CMS_uncompress"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_UNCOMPRESS, 0), "CMS_uncompress"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_VERIFY, 0), "CMS_verify"}, {ERR_PACK(ERR_LIB_CMS, CMS_F_CMS_VERIFY, 0), "CMS_verify"},
{ERR_PACK(ERR_LIB_CMS, CMS_F_KEK_UNWRAP_KEY, 0), "kek_unwrap_key"},
{0, NULL} {0, NULL}
}; };

View file

@ -188,9 +188,10 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen,
/* Invalid size */ /* Invalid size */
return 0; return 0;
} }
tmp = OPENSSL_malloc(inlen); if ((tmp = OPENSSL_malloc(inlen)) == NULL) {
if (tmp == NULL) CMSerr(CMS_F_KEK_UNWRAP_KEY, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
/* setup IV by decrypting last two blocks */ /* setup IV by decrypting last two blocks */
if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl, if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl,
in + inlen - 2 * blocklen, blocklen * 2) in + inlen - 2 * blocklen, blocklen * 2)

View file

@ -21,6 +21,7 @@ static const ERR_STRING_DATA CONF_str_functs[] = {
{ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD, 0), "def_load"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD, 0), "def_load"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD_BIO, 0), "def_load_bio"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD_BIO, 0), "def_load_bio"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_GET_NEXT_FILE, 0), "get_next_file"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_GET_NEXT_FILE, 0), "get_next_file"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_ADD, 0), "module_add"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_INIT, 0), "module_init"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_INIT, 0), "module_init"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_LOAD_DSO, 0), "module_load_dso"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_LOAD_DSO, 0), "module_load_dso"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_RUN, 0), "module_run"}, {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_RUN, 0), "module_run"},

View file

@ -232,9 +232,10 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
supported_modules = sk_CONF_MODULE_new_null(); supported_modules = sk_CONF_MODULE_new_null();
if (supported_modules == NULL) if (supported_modules == NULL)
return NULL; return NULL;
tmod = OPENSSL_zalloc(sizeof(*tmod)); if ((tmod = OPENSSL_zalloc(sizeof(*tmod))) == NULL) {
if (tmod == NULL) CONFerr(CONF_F_MODULE_ADD, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
tmod->dso = dso; tmod->dso = dso;
tmod->name = OPENSSL_strdup(name); tmod->name = OPENSSL_strdup(name);

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -27,8 +27,10 @@ static const ERR_STRING_DATA CRYPTO_str_functs[] = {
"CRYPTO_set_ex_data"}, "CRYPTO_set_ex_data"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_FIPS_MODE_SET, 0), "FIPS_mode_set"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_FIPS_MODE_SET, 0), "FIPS_mode_set"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_GET_AND_LOCK, 0), "get_and_lock"}, {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_GET_AND_LOCK, 0), "get_and_lock"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_ATEXIT, 0), "OPENSSL_atexit"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_BUF2HEXSTR, 0), {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_BUF2HEXSTR, 0),
"OPENSSL_buf2hexstr"}, "OPENSSL_buf2hexstr"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_FOPEN, 0), "openssl_fopen"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_HEXSTR2BUF, 0), {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_HEXSTR2BUF, 0),
"OPENSSL_hexstr2buf"}, "OPENSSL_hexstr2buf"},
{ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0), {ERR_PACK(ERR_LIB_CRYPTO, CRYPTO_F_OPENSSL_INIT_CRYPTO, 0),

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -41,6 +41,7 @@ static const ERR_STRING_DATA DH_str_functs[] = {
{ERR_PACK(ERR_LIB_DH, DH_F_GENERATE_KEY, 0), "generate_key"}, {ERR_PACK(ERR_LIB_DH, DH_F_GENERATE_KEY, 0), "generate_key"},
{ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_CTRL_STR, 0), "pkey_dh_ctrl_str"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_CTRL_STR, 0), "pkey_dh_ctrl_str"},
{ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_DERIVE, 0), "pkey_dh_derive"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_DERIVE, 0), "pkey_dh_derive"},
{ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_INIT, 0), "pkey_dh_init"},
{ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_KEYGEN, 0), "pkey_dh_keygen"}, {ERR_PACK(ERR_LIB_DH, DH_F_PKEY_DH_KEYGEN, 0), "pkey_dh_keygen"},
{0, NULL} {0, NULL}
}; };

View file

@ -50,9 +50,10 @@ static int pkey_dh_init(EVP_PKEY_CTX *ctx)
{ {
DH_PKEY_CTX *dctx; DH_PKEY_CTX *dctx;
dctx = OPENSSL_zalloc(sizeof(*dctx)); if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) {
if (dctx == NULL) DHerr(DH_F_PKEY_DH_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
dctx->prime_len = 1024; dctx->prime_len = 1024;
dctx->subprime_len = -1; dctx->subprime_len = -1;
dctx->generator = 2; dctx->generator = 2;

View file

@ -174,6 +174,7 @@ static const ERR_STRING_DATA EC_str_functs[] = {
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_OCT2PRIV, 0), "EC_KEY_oct2priv"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_OCT2PRIV, 0), "EC_KEY_oct2priv"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT, 0), "EC_KEY_print"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT, 0), "EC_KEY_print"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT_FP, 0), "EC_KEY_print_fp"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRINT_FP, 0), "EC_KEY_print_fp"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRIV2BUF, 0), "EC_KEY_priv2buf"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRIV2OCT, 0), "EC_KEY_priv2oct"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_PRIV2OCT, 0), "EC_KEY_priv2oct"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES, 0), {ERR_PACK(ERR_LIB_EC, EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES, 0),
"EC_KEY_set_public_key_affine_coordinates"}, "EC_KEY_set_public_key_affine_coordinates"},
@ -188,6 +189,7 @@ static const ERR_STRING_DATA EC_str_functs[] = {
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINTS_MAKE_AFFINE, 0), {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINTS_MAKE_AFFINE, 0),
"EC_POINTs_make_affine"}, "EC_POINTs_make_affine"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_ADD, 0), "EC_POINT_add"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_ADD, 0), "EC_POINT_add"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_BN2POINT, 0), "EC_POINT_bn2point"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_CMP, 0), "EC_POINT_cmp"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_CMP, 0), "EC_POINT_cmp"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_COPY, 0), "EC_POINT_copy"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_COPY, 0), "EC_POINT_copy"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_DBL, 0), "EC_POINT_dbl"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_DBL, 0), "EC_POINT_dbl"},
@ -206,6 +208,7 @@ static const ERR_STRING_DATA EC_str_functs[] = {
"EC_POINT_make_affine"}, "EC_POINT_make_affine"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_NEW, 0), "EC_POINT_new"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_NEW, 0), "EC_POINT_new"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_OCT2POINT, 0), "EC_POINT_oct2point"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_OCT2POINT, 0), "EC_POINT_oct2point"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_POINT2BUF, 0), "EC_POINT_point2buf"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_POINT2OCT, 0), "EC_POINT_point2oct"}, {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_POINT2OCT, 0), "EC_POINT_point2oct"},
{ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, 0), {ERR_PACK(ERR_LIB_EC, EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, 0),
"EC_POINT_set_affine_coordinates_GF2m"}, "EC_POINT_set_affine_coordinates_GF2m"},
@ -250,6 +253,8 @@ static const ERR_STRING_DATA EC_str_functs[] = {
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL, 0), "pkey_ec_ctrl"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL, 0), "pkey_ec_ctrl"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL_STR, 0), "pkey_ec_ctrl_str"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_CTRL_STR, 0), "pkey_ec_ctrl_str"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_DERIVE, 0), "pkey_ec_derive"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_DERIVE, 0), "pkey_ec_derive"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_INIT, 0), "pkey_ec_init"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KDF_DERIVE, 0), "pkey_ec_kdf_derive"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KEYGEN, 0), "pkey_ec_keygen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KEYGEN, 0), "pkey_ec_keygen"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_PARAMGEN, 0), "pkey_ec_paramgen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_PARAMGEN, 0), "pkey_ec_paramgen"},
{ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_SIGN, 0), "pkey_ec_sign"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_SIGN, 0), "pkey_ec_sign"},

View file

@ -613,12 +613,14 @@ size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf)
{ {
size_t len; size_t len;
unsigned char *buf; unsigned char *buf;
len = EC_KEY_priv2oct(eckey, NULL, 0); len = EC_KEY_priv2oct(eckey, NULL, 0);
if (len == 0) if (len == 0)
return 0; return 0;
buf = OPENSSL_malloc(len); if ((buf = OPENSSL_malloc(len)) == NULL) {
if (buf == NULL) ECerr(EC_F_EC_KEY_PRIV2BUF, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
len = EC_KEY_priv2oct(eckey, buf, len); len = EC_KEY_priv2oct(eckey, buf, len);
if (len == 0) { if (len == 0) {
OPENSSL_free(buf); OPENSSL_free(buf);

View file

@ -213,9 +213,10 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
if (src->seed) { if (src->seed) {
OPENSSL_free(dest->seed); OPENSSL_free(dest->seed);
dest->seed = OPENSSL_malloc(src->seed_len); if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL) {
if (dest->seed == NULL) ECerr(EC_F_EC_GROUP_COPY, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (!memcpy(dest->seed, src->seed, src->seed_len)) if (!memcpy(dest->seed, src->seed, src->seed_len))
return 0; return 0;
dest->seed_len = src->seed_len; dest->seed_len = src->seed_len;

View file

@ -144,12 +144,14 @@ size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point,
{ {
size_t len; size_t len;
unsigned char *buf; unsigned char *buf;
len = EC_POINT_point2oct(group, point, form, NULL, 0, NULL); len = EC_POINT_point2oct(group, point, form, NULL, 0, NULL);
if (len == 0) if (len == 0)
return 0; return 0;
buf = OPENSSL_malloc(len); if ((buf = OPENSSL_malloc(len)) == NULL) {
if (buf == NULL) ECerr(EC_F_EC_POINT_POINT2BUF, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
len = EC_POINT_point2oct(group, point, form, buf, len, ctx); len = EC_POINT_point2oct(group, point, form, buf, len, ctx);
if (len == 0) { if (len == 0) {
OPENSSL_free(buf); OPENSSL_free(buf);

View file

@ -46,9 +46,10 @@ static int pkey_ec_init(EVP_PKEY_CTX *ctx)
{ {
EC_PKEY_CTX *dctx; EC_PKEY_CTX *dctx;
dctx = OPENSSL_zalloc(sizeof(*dctx)); if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) {
if (dctx == NULL) ECerr(EC_F_PKEY_EC_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
dctx->cofactor_mode = -1; dctx->cofactor_mode = -1;
dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE; dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE;
@ -297,9 +298,10 @@ static int pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx,
return 0; return 0;
if (!pkey_ec_derive(ctx, NULL, &ktmplen)) if (!pkey_ec_derive(ctx, NULL, &ktmplen))
return 0; return 0;
ktmp = OPENSSL_malloc(ktmplen); if ((ktmp = OPENSSL_malloc(ktmplen)) == NULL) {
if (ktmp == NULL) ECerr(EC_F_PKEY_EC_KDF_DERIVE, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (!pkey_ec_derive(ctx, ktmp, &ktmplen)) if (!pkey_ec_derive(ctx, ktmp, &ktmplen))
goto err; goto err;
/* Do KDF stuff */ /* Do KDF stuff */

View file

@ -8,6 +8,7 @@
*/ */
#include <openssl/crypto.h> #include <openssl/crypto.h>
#include <openssl/err.h>
#include "ec_lcl.h" #include "ec_lcl.h"
BIGNUM *EC_POINT_point2bn(const EC_GROUP *group, BIGNUM *EC_POINT_point2bn(const EC_GROUP *group,
@ -39,9 +40,10 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group,
if ((buf_len = BN_num_bytes(bn)) == 0) if ((buf_len = BN_num_bytes(bn)) == 0)
return NULL; return NULL;
buf = OPENSSL_malloc(buf_len); if ((buf = OPENSSL_malloc(buf_len)) == NULL) {
if (buf == NULL) ECerr(EC_F_EC_POINT_BN2POINT, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
if (!BN_bn2bin(bn, buf)) { if (!BN_bn2bin(bn, buf)) {
OPENSSL_free(buf); OPENSSL_free(buf);

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -66,11 +66,14 @@ static const ERR_STRING_DATA ENGINE_str_functs[] = {
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UNLOCKED_FINISH, 0), {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UNLOCKED_FINISH, 0),
"engine_unlocked_finish"}, "engine_unlocked_finish"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UP_REF, 0), "ENGINE_up_ref"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_ENGINE_UP_REF, 0), "ENGINE_up_ref"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_CLEANUP_ITEM, 0),
"int_cleanup_item"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_CTRL_HELPER, 0), "int_ctrl_helper"}, {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_CTRL_HELPER, 0), "int_ctrl_helper"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_CONFIGURE, 0), {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_CONFIGURE, 0),
"int_engine_configure"}, "int_engine_configure"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_MODULE_INIT, 0), {ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_INT_ENGINE_MODULE_INIT, 0),
"int_engine_module_init"}, "int_engine_module_init"},
{ERR_PACK(ERR_LIB_ENGINE, ENGINE_F_OSSL_HMAC_INIT, 0), "ossl_hmac_init"},
{0, NULL} {0, NULL}
}; };

View file

@ -126,9 +126,12 @@ static int int_cleanup_check(int create)
static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb) static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb)
{ {
ENGINE_CLEANUP_ITEM *item = OPENSSL_malloc(sizeof(*item)); ENGINE_CLEANUP_ITEM *item;
if (item == NULL)
if ((item = OPENSSL_malloc(sizeof(*item))) == NULL) {
ENGINEerr(ENGINE_F_INT_CLEANUP_ITEM, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
item->cb = cb; item->cb = cb;
return item; return item;
} }
@ -136,6 +139,7 @@ static ENGINE_CLEANUP_ITEM *int_cleanup_item(ENGINE_CLEANUP_CB *cb)
void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb) void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb)
{ {
ENGINE_CLEANUP_ITEM *item; ENGINE_CLEANUP_ITEM *item;
if (!int_cleanup_check(1)) if (!int_cleanup_check(1))
return; return;
item = int_cleanup_item(cb); item = int_cleanup_item(cb);

View file

@ -431,9 +431,10 @@ static int ossl_hmac_init(EVP_PKEY_CTX *ctx)
{ {
OSSL_HMAC_PKEY_CTX *hctx; OSSL_HMAC_PKEY_CTX *hctx;
hctx = OPENSSL_zalloc(sizeof(*hctx)); if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) {
if (hctx == NULL) ENGINEerr(ENGINE_F_OSSL_HMAC_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
hctx->ktmp.type = V_ASN1_OCTET_STRING; hctx->ktmp.type = V_ASN1_OCTET_STRING;
hctx->ctx = HMAC_CTX_new(); hctx->ctx = HMAC_CTX_new();
if (hctx->ctx == NULL) { if (hctx->ctx == NULL) {

View file

@ -678,9 +678,10 @@ ERR_STATE *ERR_get_state(void)
state = CRYPTO_THREAD_get_local(&err_thread_local); state = CRYPTO_THREAD_get_local(&err_thread_local);
if (state == NULL) { if (state == NULL) {
state = OPENSSL_zalloc(sizeof(*state)); if ((state = OPENSSL_zalloc(sizeof(*state))) == NULL) {
if (state == NULL) /* ERRerr(ERR_F_ERR_GET_STATE, ERR_R_MALLOC_FAILURE); */
return NULL; return NULL;
}
if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE) if (!ossl_init_thread_start(OPENSSL_INIT_THREAD_ERR_STATE)
|| !CRYPTO_THREAD_set_local(&err_thread_local, state)) { || !CRYPTO_THREAD_set_local(&err_thread_local, state)) {
@ -739,9 +740,10 @@ void ERR_add_error_vdata(int num, va_list args)
char *str, *p, *a; char *str, *p, *a;
s = 80; s = 80;
str = OPENSSL_malloc(s + 1); if ((str = OPENSSL_malloc(s + 1)) == NULL) {
if (str == NULL) /* ERRerr(ERR_F_ERR_ADD_ERROR_VDATA, ERR_R_MALLOC_FAILURE); */
return; return;
}
str[0] = '\0'; str[0] = '\0';
n = 0; n = 0;

View file

@ -10,6 +10,7 @@ ASN1_F_A2D_ASN1_OBJECT:100:a2d_ASN1_OBJECT
ASN1_F_A2I_ASN1_INTEGER:102:a2i_ASN1_INTEGER ASN1_F_A2I_ASN1_INTEGER:102:a2i_ASN1_INTEGER
ASN1_F_A2I_ASN1_STRING:103:a2i_ASN1_STRING ASN1_F_A2I_ASN1_STRING:103:a2i_ASN1_STRING
ASN1_F_APPEND_EXP:176:append_exp ASN1_F_APPEND_EXP:176:append_exp
ASN1_F_ASN1_BIO_INIT:113:asn1_bio_init
ASN1_F_ASN1_BIT_STRING_SET_BIT:183:ASN1_BIT_STRING_set_bit ASN1_F_ASN1_BIT_STRING_SET_BIT:183:ASN1_BIT_STRING_set_bit
ASN1_F_ASN1_CB:177:asn1_cb ASN1_F_ASN1_CB:177:asn1_cb
ASN1_F_ASN1_CHECK_TLEN:104:asn1_check_tlen ASN1_F_ASN1_CHECK_TLEN:104:asn1_check_tlen
@ -21,6 +22,7 @@ ASN1_F_ASN1_DIGEST:184:ASN1_digest
ASN1_F_ASN1_DO_ADB:110:asn1_do_adb ASN1_F_ASN1_DO_ADB:110:asn1_do_adb
ASN1_F_ASN1_DO_LOCK:233:asn1_do_lock ASN1_F_ASN1_DO_LOCK:233:asn1_do_lock
ASN1_F_ASN1_DUP:111:ASN1_dup ASN1_F_ASN1_DUP:111:ASN1_dup
ASN1_F_ASN1_ENC_SAVE:115:asn1_enc_save
ASN1_F_ASN1_EX_C2I:204:asn1_ex_c2i ASN1_F_ASN1_EX_C2I:204:asn1_ex_c2i
ASN1_F_ASN1_FIND_END:190:asn1_find_end ASN1_F_ASN1_FIND_END:190:asn1_find_end
ASN1_F_ASN1_GENERALIZEDTIME_ADJ:216:ASN1_GENERALIZEDTIME_adj ASN1_F_ASN1_GENERALIZEDTIME_ADJ:216:ASN1_GENERALIZEDTIME_adj
@ -34,6 +36,7 @@ ASN1_F_ASN1_ITEM_D2I_FP:206:ASN1_item_d2i_fp
ASN1_F_ASN1_ITEM_DUP:191:ASN1_item_dup ASN1_F_ASN1_ITEM_DUP:191:ASN1_item_dup
ASN1_F_ASN1_ITEM_EMBED_D2I:120:asn1_item_embed_d2i ASN1_F_ASN1_ITEM_EMBED_D2I:120:asn1_item_embed_d2i
ASN1_F_ASN1_ITEM_EMBED_NEW:121:asn1_item_embed_new ASN1_F_ASN1_ITEM_EMBED_NEW:121:asn1_item_embed_new
ASN1_F_ASN1_ITEM_FLAGS_I2D:118:asn1_item_flags_i2d
ASN1_F_ASN1_ITEM_I2D_BIO:192:ASN1_item_i2d_bio ASN1_F_ASN1_ITEM_I2D_BIO:192:ASN1_item_i2d_bio
ASN1_F_ASN1_ITEM_I2D_FP:193:ASN1_item_i2d_fp ASN1_F_ASN1_ITEM_I2D_FP:193:ASN1_item_i2d_fp
ASN1_F_ASN1_ITEM_PACK:198:ASN1_item_pack ASN1_F_ASN1_ITEM_PACK:198:ASN1_item_pack
@ -45,6 +48,7 @@ ASN1_F_ASN1_MBSTRING_NCOPY:122:ASN1_mbstring_ncopy
ASN1_F_ASN1_OBJECT_NEW:123:ASN1_OBJECT_new ASN1_F_ASN1_OBJECT_NEW:123:ASN1_OBJECT_new
ASN1_F_ASN1_OUTPUT_DATA:214:asn1_output_data ASN1_F_ASN1_OUTPUT_DATA:214:asn1_output_data
ASN1_F_ASN1_PCTX_NEW:205:ASN1_PCTX_new ASN1_F_ASN1_PCTX_NEW:205:ASN1_PCTX_new
ASN1_F_ASN1_PRIMITIVE_NEW:119:asn1_primitive_new
ASN1_F_ASN1_SCTX_NEW:221:ASN1_SCTX_new ASN1_F_ASN1_SCTX_NEW:221:ASN1_SCTX_new
ASN1_F_ASN1_SIGN:128:ASN1_sign ASN1_F_ASN1_SIGN:128:ASN1_sign
ASN1_F_ASN1_STR2TYPE:179:asn1_str2type ASN1_F_ASN1_STR2TYPE:179:asn1_str2type
@ -78,7 +82,10 @@ ASN1_F_D2I_ASN1_UINTEGER:150:d2i_ASN1_UINTEGER
ASN1_F_D2I_AUTOPRIVATEKEY:207:d2i_AutoPrivateKey ASN1_F_D2I_AUTOPRIVATEKEY:207:d2i_AutoPrivateKey
ASN1_F_D2I_PRIVATEKEY:154:d2i_PrivateKey ASN1_F_D2I_PRIVATEKEY:154:d2i_PrivateKey
ASN1_F_D2I_PUBLICKEY:155:d2i_PublicKey ASN1_F_D2I_PUBLICKEY:155:d2i_PublicKey
ASN1_F_DO_CREATE:124:do_create
ASN1_F_DO_DUMP:125:do_dump
ASN1_F_DO_TCREATE:222:do_tcreate ASN1_F_DO_TCREATE:222:do_tcreate
ASN1_F_I2A_ASN1_OBJECT:126:i2a_ASN1_OBJECT
ASN1_F_I2D_ASN1_BIO_STREAM:211:i2d_ASN1_bio_stream ASN1_F_I2D_ASN1_BIO_STREAM:211:i2d_ASN1_bio_stream
ASN1_F_I2D_DSA_PUBKEY:161:i2d_DSA_PUBKEY ASN1_F_I2D_DSA_PUBKEY:161:i2d_DSA_PUBKEY
ASN1_F_I2D_EC_PUBKEY:181:i2d_EC_PUBKEY ASN1_F_I2D_EC_PUBKEY:181:i2d_EC_PUBKEY
@ -86,6 +93,8 @@ ASN1_F_I2D_PRIVATEKEY:163:i2d_PrivateKey
ASN1_F_I2D_PUBLICKEY:164:i2d_PublicKey ASN1_F_I2D_PUBLICKEY:164:i2d_PublicKey
ASN1_F_I2D_RSA_PUBKEY:165:i2d_RSA_PUBKEY ASN1_F_I2D_RSA_PUBKEY:165:i2d_RSA_PUBKEY
ASN1_F_LONG_C2I:166:long_c2i ASN1_F_LONG_C2I:166:long_c2i
ASN1_F_NDEF_PREFIX:127:ndef_prefix
ASN1_F_NDEF_SUFFIX:136:ndef_suffix
ASN1_F_OID_MODULE_INIT:174:oid_module_init ASN1_F_OID_MODULE_INIT:174:oid_module_init
ASN1_F_PARSE_TAGGING:182:parse_tagging ASN1_F_PARSE_TAGGING:182:parse_tagging
ASN1_F_PKCS5_PBE2_SET_IV:167:PKCS5_pbe2_set_iv ASN1_F_PKCS5_PBE2_SET_IV:167:PKCS5_pbe2_set_iv
@ -96,9 +105,12 @@ ASN1_F_PKCS5_PBKDF2_SET:219:PKCS5_pbkdf2_set
ASN1_F_PKCS5_SCRYPT_SET:232:pkcs5_scrypt_set ASN1_F_PKCS5_SCRYPT_SET:232:pkcs5_scrypt_set
ASN1_F_SMIME_READ_ASN1:212:SMIME_read_ASN1 ASN1_F_SMIME_READ_ASN1:212:SMIME_read_ASN1
ASN1_F_SMIME_TEXT:213:SMIME_text ASN1_F_SMIME_TEXT:213:SMIME_text
ASN1_F_STABLE_GET:138:stable_get
ASN1_F_STBL_MODULE_INIT:223:stbl_module_init ASN1_F_STBL_MODULE_INIT:223:stbl_module_init
ASN1_F_UINT32_C2I:105:uint32_c2i ASN1_F_UINT32_C2I:105:uint32_c2i
ASN1_F_UINT32_NEW:139:uint32_new
ASN1_F_UINT64_C2I:112:uint64_c2i ASN1_F_UINT64_C2I:112:uint64_c2i
ASN1_F_UINT64_NEW:141:uint64_new
ASN1_F_X509_CRL_ADD0_REVOKED:169:X509_CRL_add0_revoked ASN1_F_X509_CRL_ADD0_REVOKED:169:X509_CRL_add0_revoked
ASN1_F_X509_INFO_NEW:170:X509_INFO_new ASN1_F_X509_INFO_NEW:170:X509_INFO_new
ASN1_F_X509_NAME_ENCODE:203:x509_name_encode ASN1_F_X509_NAME_ENCODE:203:x509_name_encode
@ -111,7 +123,9 @@ ASYNC_F_ASYNC_JOB_NEW:102:async_job_new
ASYNC_F_ASYNC_PAUSE_JOB:103:ASYNC_pause_job ASYNC_F_ASYNC_PAUSE_JOB:103:ASYNC_pause_job
ASYNC_F_ASYNC_START_FUNC:104:async_start_func ASYNC_F_ASYNC_START_FUNC:104:async_start_func
ASYNC_F_ASYNC_START_JOB:105:ASYNC_start_job ASYNC_F_ASYNC_START_JOB:105:ASYNC_start_job
ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD:106:ASYNC_WAIT_CTX_set_wait_fd
BIO_F_ACPT_STATE:100:acpt_state BIO_F_ACPT_STATE:100:acpt_state
BIO_F_ADDRINFO_WRAP:148:addrinfo_wrap
BIO_F_ADDR_STRINGS:134:addr_strings BIO_F_ADDR_STRINGS:134:addr_strings
BIO_F_BIO_ACCEPT:101:BIO_accept BIO_F_BIO_ACCEPT:101:BIO_accept
BIO_F_BIO_ACCEPT_EX:137:BIO_accept_ex BIO_F_BIO_ACCEPT_EX:137:BIO_accept_ex
@ -152,11 +166,14 @@ BIO_F_BIO_WRITE_INTERN:128:bio_write_intern
BIO_F_BUFFER_CTRL:114:buffer_ctrl BIO_F_BUFFER_CTRL:114:buffer_ctrl
BIO_F_CONN_CTRL:127:conn_ctrl BIO_F_CONN_CTRL:127:conn_ctrl
BIO_F_CONN_STATE:115:conn_state BIO_F_CONN_STATE:115:conn_state
BIO_F_DGRAM_SCTP_NEW:149:dgram_sctp_new
BIO_F_DGRAM_SCTP_READ:132:dgram_sctp_read BIO_F_DGRAM_SCTP_READ:132:dgram_sctp_read
BIO_F_DGRAM_SCTP_WRITE:133:dgram_sctp_write BIO_F_DGRAM_SCTP_WRITE:133:dgram_sctp_write
BIO_F_DOAPR_OUTCH:150:doapr_outch
BIO_F_FILE_CTRL:116:file_ctrl BIO_F_FILE_CTRL:116:file_ctrl
BIO_F_FILE_READ:130:file_read BIO_F_FILE_READ:130:file_read
BIO_F_LINEBUFFER_CTRL:129:linebuffer_ctrl BIO_F_LINEBUFFER_CTRL:129:linebuffer_ctrl
BIO_F_LINEBUFFER_NEW:151:linebuffer_new
BIO_F_MEM_WRITE:117:mem_write BIO_F_MEM_WRITE:117:mem_write
BIO_F_SSL_NEW:118:SSL_new BIO_F_SSL_NEW:118:SSL_new
BN_F_BNRAND:127:bnrand BN_F_BNRAND:127:bnrand
@ -199,10 +216,12 @@ BN_F_BN_MOD_LSHIFT_QUICK:119:BN_mod_lshift_quick
BN_F_BN_MOD_SQRT:121:BN_mod_sqrt BN_F_BN_MOD_SQRT:121:BN_mod_sqrt
BN_F_BN_MPI2BN:112:BN_mpi2bn BN_F_BN_MPI2BN:112:BN_mpi2bn
BN_F_BN_NEW:113:BN_new BN_F_BN_NEW:113:BN_new
BN_F_BN_POOL_GET:147:BN_POOL_get
BN_F_BN_RAND:114:BN_rand BN_F_BN_RAND:114:BN_rand
BN_F_BN_RAND_RANGE:122:BN_rand_range BN_F_BN_RAND_RANGE:122:BN_rand_range
BN_F_BN_RSHIFT:146:BN_rshift BN_F_BN_RSHIFT:146:BN_rshift
BN_F_BN_SET_WORDS:144:bn_set_words BN_F_BN_SET_WORDS:144:bn_set_words
BN_F_BN_STACK_PUSH:148:BN_STACK_push
BN_F_BN_USUB:115:BN_usub BN_F_BN_USUB:115:BN_usub
BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow BUF_F_BUF_MEM_GROW:100:BUF_MEM_grow
BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean BUF_F_BUF_MEM_GROW_CLEAN:105:BUF_MEM_grow_clean
@ -233,6 +252,7 @@ CMS_F_CMS_DIGESTEDDATA_DO_FINAL:117:cms_DigestedData_do_final
CMS_F_CMS_DIGEST_VERIFY:118:CMS_digest_verify CMS_F_CMS_DIGEST_VERIFY:118:CMS_digest_verify
CMS_F_CMS_ENCODE_RECEIPT:161:cms_encode_Receipt CMS_F_CMS_ENCODE_RECEIPT:161:cms_encode_Receipt
CMS_F_CMS_ENCRYPT:119:CMS_encrypt CMS_F_CMS_ENCRYPT:119:CMS_encrypt
CMS_F_CMS_ENCRYPTEDCONTENT_INIT:179:cms_EncryptedContent_init
CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO:120:cms_EncryptedContent_init_bio CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO:120:cms_EncryptedContent_init_bio
CMS_F_CMS_ENCRYPTEDDATA_DECRYPT:121:CMS_EncryptedData_decrypt CMS_F_CMS_ENCRYPTEDDATA_DECRYPT:121:CMS_EncryptedData_decrypt
CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT:122:CMS_EncryptedData_encrypt CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT:122:CMS_EncryptedData_encrypt
@ -289,6 +309,7 @@ CMS_F_CMS_SIGN_RECEIPT:163:CMS_sign_receipt
CMS_F_CMS_STREAM:155:CMS_stream CMS_F_CMS_STREAM:155:CMS_stream
CMS_F_CMS_UNCOMPRESS:156:CMS_uncompress CMS_F_CMS_UNCOMPRESS:156:CMS_uncompress
CMS_F_CMS_VERIFY:157:CMS_verify CMS_F_CMS_VERIFY:157:CMS_verify
CMS_F_KEK_UNWRAP_KEY:180:kek_unwrap_key
COMP_F_BIO_ZLIB_FLUSH:99:bio_zlib_flush COMP_F_BIO_ZLIB_FLUSH:99:bio_zlib_flush
COMP_F_BIO_ZLIB_NEW:100:bio_zlib_new COMP_F_BIO_ZLIB_NEW:100:bio_zlib_new
COMP_F_BIO_ZLIB_READ:101:bio_zlib_read COMP_F_BIO_ZLIB_READ:101:bio_zlib_read
@ -300,6 +321,7 @@ CONF_F_CONF_PARSE_LIST:119:CONF_parse_list
CONF_F_DEF_LOAD:120:def_load CONF_F_DEF_LOAD:120:def_load
CONF_F_DEF_LOAD_BIO:121:def_load_bio CONF_F_DEF_LOAD_BIO:121:def_load_bio
CONF_F_GET_NEXT_FILE:107:get_next_file CONF_F_GET_NEXT_FILE:107:get_next_file
CONF_F_MODULE_ADD:122:module_add
CONF_F_MODULE_INIT:115:module_init CONF_F_MODULE_INIT:115:module_init
CONF_F_MODULE_LOAD_DSO:117:module_load_dso CONF_F_MODULE_LOAD_DSO:117:module_load_dso
CONF_F_MODULE_RUN:118:module_run CONF_F_MODULE_RUN:118:module_run
@ -322,7 +344,9 @@ CRYPTO_F_CRYPTO_NEW_EX_DATA:112:CRYPTO_new_ex_data
CRYPTO_F_CRYPTO_SET_EX_DATA:102:CRYPTO_set_ex_data CRYPTO_F_CRYPTO_SET_EX_DATA:102:CRYPTO_set_ex_data
CRYPTO_F_FIPS_MODE_SET:109:FIPS_mode_set CRYPTO_F_FIPS_MODE_SET:109:FIPS_mode_set
CRYPTO_F_GET_AND_LOCK:113:get_and_lock CRYPTO_F_GET_AND_LOCK:113:get_and_lock
CRYPTO_F_OPENSSL_ATEXIT:114:OPENSSL_atexit
CRYPTO_F_OPENSSL_BUF2HEXSTR:117:OPENSSL_buf2hexstr CRYPTO_F_OPENSSL_BUF2HEXSTR:117:OPENSSL_buf2hexstr
CRYPTO_F_OPENSSL_FOPEN:119:openssl_fopen
CRYPTO_F_OPENSSL_HEXSTR2BUF:118:OPENSSL_hexstr2buf CRYPTO_F_OPENSSL_HEXSTR2BUF:118:OPENSSL_hexstr2buf
CRYPTO_F_OPENSSL_INIT_CRYPTO:116:OPENSSL_init_crypto CRYPTO_F_OPENSSL_INIT_CRYPTO:116:OPENSSL_init_crypto
CT_F_CTLOG_NEW:117:CTLOG_new CT_F_CTLOG_NEW:117:CTLOG_new
@ -376,6 +400,7 @@ DH_F_DO_DH_PRINT:100:do_dh_print
DH_F_GENERATE_KEY:103:generate_key DH_F_GENERATE_KEY:103:generate_key
DH_F_PKEY_DH_CTRL_STR:120:pkey_dh_ctrl_str DH_F_PKEY_DH_CTRL_STR:120:pkey_dh_ctrl_str
DH_F_PKEY_DH_DERIVE:112:pkey_dh_derive DH_F_PKEY_DH_DERIVE:112:pkey_dh_derive
DH_F_PKEY_DH_INIT:125:pkey_dh_init
DH_F_PKEY_DH_KEYGEN:113:pkey_dh_keygen DH_F_PKEY_DH_KEYGEN:113:pkey_dh_keygen
DSA_F_DSAPARAMS_PRINT:100:DSAparams_print DSA_F_DSAPARAMS_PRINT:100:DSAparams_print
DSA_F_DSAPARAMS_PRINT_FP:101:DSAparams_print_fp DSA_F_DSAPARAMS_PRINT_FP:101:DSAparams_print_fp
@ -544,6 +569,7 @@ EC_F_EC_KEY_NEW_METHOD:245:EC_KEY_new_method
EC_F_EC_KEY_OCT2PRIV:255:EC_KEY_oct2priv EC_F_EC_KEY_OCT2PRIV:255:EC_KEY_oct2priv
EC_F_EC_KEY_PRINT:180:EC_KEY_print EC_F_EC_KEY_PRINT:180:EC_KEY_print
EC_F_EC_KEY_PRINT_FP:181:EC_KEY_print_fp EC_F_EC_KEY_PRINT_FP:181:EC_KEY_print_fp
EC_F_EC_KEY_PRIV2BUF:279:EC_KEY_priv2buf
EC_F_EC_KEY_PRIV2OCT:256:EC_KEY_priv2oct EC_F_EC_KEY_PRIV2OCT:256:EC_KEY_priv2oct
EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES:229:\ EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES:229:\
EC_KEY_set_public_key_affine_coordinates EC_KEY_set_public_key_affine_coordinates
@ -554,6 +580,7 @@ EC_F_EC_PKEY_CHECK:273:ec_pkey_check
EC_F_EC_PKEY_PARAM_CHECK:274:ec_pkey_param_check EC_F_EC_PKEY_PARAM_CHECK:274:ec_pkey_param_check
EC_F_EC_POINTS_MAKE_AFFINE:136:EC_POINTs_make_affine EC_F_EC_POINTS_MAKE_AFFINE:136:EC_POINTs_make_affine
EC_F_EC_POINT_ADD:112:EC_POINT_add EC_F_EC_POINT_ADD:112:EC_POINT_add
EC_F_EC_POINT_BN2POINT:280:EC_POINT_bn2point
EC_F_EC_POINT_CMP:113:EC_POINT_cmp EC_F_EC_POINT_CMP:113:EC_POINT_cmp
EC_F_EC_POINT_COPY:114:EC_POINT_copy EC_F_EC_POINT_COPY:114:EC_POINT_copy
EC_F_EC_POINT_DBL:115:EC_POINT_dbl EC_F_EC_POINT_DBL:115:EC_POINT_dbl
@ -568,6 +595,7 @@ EC_F_EC_POINT_IS_ON_CURVE:119:EC_POINT_is_on_curve
EC_F_EC_POINT_MAKE_AFFINE:120:EC_POINT_make_affine EC_F_EC_POINT_MAKE_AFFINE:120:EC_POINT_make_affine
EC_F_EC_POINT_NEW:121:EC_POINT_new EC_F_EC_POINT_NEW:121:EC_POINT_new
EC_F_EC_POINT_OCT2POINT:122:EC_POINT_oct2point EC_F_EC_POINT_OCT2POINT:122:EC_POINT_oct2point
EC_F_EC_POINT_POINT2BUF:281:EC_POINT_point2buf
EC_F_EC_POINT_POINT2OCT:123:EC_POINT_point2oct EC_F_EC_POINT_POINT2OCT:123:EC_POINT_point2oct
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M:185:\ EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M:185:\
EC_POINT_set_affine_coordinates_GF2m EC_POINT_set_affine_coordinates_GF2m
@ -602,6 +630,8 @@ EC_F_PKEY_ECX_DERIVE:269:pkey_ecx_derive
EC_F_PKEY_EC_CTRL:197:pkey_ec_ctrl EC_F_PKEY_EC_CTRL:197:pkey_ec_ctrl
EC_F_PKEY_EC_CTRL_STR:198:pkey_ec_ctrl_str EC_F_PKEY_EC_CTRL_STR:198:pkey_ec_ctrl_str
EC_F_PKEY_EC_DERIVE:217:pkey_ec_derive EC_F_PKEY_EC_DERIVE:217:pkey_ec_derive
EC_F_PKEY_EC_INIT:282:pkey_ec_init
EC_F_PKEY_EC_KDF_DERIVE:283:pkey_ec_kdf_derive
EC_F_PKEY_EC_KEYGEN:199:pkey_ec_keygen EC_F_PKEY_EC_KEYGEN:199:pkey_ec_keygen
EC_F_PKEY_EC_PARAMGEN:219:pkey_ec_paramgen EC_F_PKEY_EC_PARAMGEN:219:pkey_ec_paramgen
EC_F_PKEY_EC_SIGN:218:pkey_ec_sign EC_F_PKEY_EC_SIGN:218:pkey_ec_sign
@ -641,23 +671,29 @@ ENGINE_F_ENGINE_SET_NAME:130:ENGINE_set_name
ENGINE_F_ENGINE_TABLE_REGISTER:184:engine_table_register ENGINE_F_ENGINE_TABLE_REGISTER:184:engine_table_register
ENGINE_F_ENGINE_UNLOCKED_FINISH:191:engine_unlocked_finish ENGINE_F_ENGINE_UNLOCKED_FINISH:191:engine_unlocked_finish
ENGINE_F_ENGINE_UP_REF:190:ENGINE_up_ref ENGINE_F_ENGINE_UP_REF:190:ENGINE_up_ref
ENGINE_F_INT_CLEANUP_ITEM:199:int_cleanup_item
ENGINE_F_INT_CTRL_HELPER:172:int_ctrl_helper ENGINE_F_INT_CTRL_HELPER:172:int_ctrl_helper
ENGINE_F_INT_ENGINE_CONFIGURE:188:int_engine_configure ENGINE_F_INT_ENGINE_CONFIGURE:188:int_engine_configure
ENGINE_F_INT_ENGINE_MODULE_INIT:187:int_engine_module_init ENGINE_F_INT_ENGINE_MODULE_INIT:187:int_engine_module_init
ENGINE_F_OSSL_HMAC_INIT:200:ossl_hmac_init
EVP_F_AESNI_INIT_KEY:165:aesni_init_key EVP_F_AESNI_INIT_KEY:165:aesni_init_key
EVP_F_AES_GCM_CTRL:196:aes_gcm_ctrl
EVP_F_AES_INIT_KEY:133:aes_init_key EVP_F_AES_INIT_KEY:133:aes_init_key
EVP_F_AES_OCB_CIPHER:169:aes_ocb_cipher EVP_F_AES_OCB_CIPHER:169:aes_ocb_cipher
EVP_F_AES_T4_INIT_KEY:178:aes_t4_init_key EVP_F_AES_T4_INIT_KEY:178:aes_t4_init_key
EVP_F_AES_WRAP_CIPHER:170:aes_wrap_cipher EVP_F_AES_WRAP_CIPHER:170:aes_wrap_cipher
EVP_F_ALG_MODULE_INIT:177:alg_module_init EVP_F_ALG_MODULE_INIT:177:alg_module_init
EVP_F_ARIA_CCM_INIT_KEY:175:aria_ccm_init_key EVP_F_ARIA_CCM_INIT_KEY:175:aria_ccm_init_key
EVP_F_ARIA_GCM_CTRL:197:aria_gcm_ctrl
EVP_F_ARIA_GCM_INIT_KEY:176:aria_gcm_init_key EVP_F_ARIA_GCM_INIT_KEY:176:aria_gcm_init_key
EVP_F_ARIA_INIT_KEY:185:aria_init_key EVP_F_ARIA_INIT_KEY:185:aria_init_key
EVP_F_B64_NEW:198:b64_new
EVP_F_CAMELLIA_INIT_KEY:159:camellia_init_key EVP_F_CAMELLIA_INIT_KEY:159:camellia_init_key
EVP_F_CHACHA20_POLY1305_CTRL:182:chacha20_poly1305_ctrl EVP_F_CHACHA20_POLY1305_CTRL:182:chacha20_poly1305_ctrl
EVP_F_CMLL_T4_INIT_KEY:179:cmll_t4_init_key EVP_F_CMLL_T4_INIT_KEY:179:cmll_t4_init_key
EVP_F_DES_EDE3_WRAP_CIPHER:171:des_ede3_wrap_cipher EVP_F_DES_EDE3_WRAP_CIPHER:171:des_ede3_wrap_cipher
EVP_F_DO_SIGVER_INIT:161:do_sigver_init EVP_F_DO_SIGVER_INIT:161:do_sigver_init
EVP_F_ENC_NEW:199:enc_new
EVP_F_EVP_CIPHERINIT_EX:123:EVP_CipherInit_ex EVP_F_EVP_CIPHERINIT_EX:123:EVP_CipherInit_ex
EVP_F_EVP_CIPHER_CTX_COPY:163:EVP_CIPHER_CTX_copy EVP_F_EVP_CIPHER_CTX_COPY:163:EVP_CIPHER_CTX_copy
EVP_F_EVP_CIPHER_CTX_CTRL:124:EVP_CIPHER_CTX_ctrl EVP_F_EVP_CIPHER_CTX_CTRL:124:EVP_CIPHER_CTX_ctrl
@ -722,6 +758,7 @@ EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT:145:EVP_PKEY_verify_recover_init
EVP_F_EVP_SIGNFINAL:107:EVP_SignFinal EVP_F_EVP_SIGNFINAL:107:EVP_SignFinal
EVP_F_EVP_VERIFYFINAL:108:EVP_VerifyFinal EVP_F_EVP_VERIFYFINAL:108:EVP_VerifyFinal
EVP_F_INT_CTX_NEW:157:int_ctx_new EVP_F_INT_CTX_NEW:157:int_ctx_new
EVP_F_OK_NEW:200:ok_new
EVP_F_PKCS5_PBE_KEYIVGEN:117:PKCS5_PBE_keyivgen EVP_F_PKCS5_PBE_KEYIVGEN:117:PKCS5_PBE_keyivgen
EVP_F_PKCS5_V2_PBE_KEYIVGEN:118:PKCS5_v2_PBE_keyivgen EVP_F_PKCS5_V2_PBE_KEYIVGEN:118:PKCS5_v2_PBE_keyivgen
EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN:164:PKCS5_v2_PBKDF2_keyivgen EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN:164:PKCS5_v2_PBKDF2_keyivgen
@ -729,9 +766,11 @@ EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN:180:PKCS5_v2_scrypt_keyivgen
EVP_F_PKEY_SET_TYPE:158:pkey_set_type EVP_F_PKEY_SET_TYPE:158:pkey_set_type
EVP_F_RC2_MAGIC_TO_METH:109:rc2_magic_to_meth EVP_F_RC2_MAGIC_TO_METH:109:rc2_magic_to_meth
EVP_F_RC5_CTRL:125:rc5_ctrl EVP_F_RC5_CTRL:125:rc5_ctrl
EVP_F_S390X_AES_GCM_CTRL:201:s390x_aes_gcm_ctrl
EVP_F_UPDATE:173:update EVP_F_UPDATE:173:update
KDF_F_PKEY_HKDF_CTRL_STR:103:pkey_hkdf_ctrl_str KDF_F_PKEY_HKDF_CTRL_STR:103:pkey_hkdf_ctrl_str
KDF_F_PKEY_HKDF_DERIVE:102:pkey_hkdf_derive KDF_F_PKEY_HKDF_DERIVE:102:pkey_hkdf_derive
KDF_F_PKEY_HKDF_INIT:108:pkey_hkdf_init
KDF_F_PKEY_SCRYPT_CTRL_STR:104:pkey_scrypt_ctrl_str KDF_F_PKEY_SCRYPT_CTRL_STR:104:pkey_scrypt_ctrl_str
KDF_F_PKEY_SCRYPT_CTRL_UINT64:105:pkey_scrypt_ctrl_uint64 KDF_F_PKEY_SCRYPT_CTRL_UINT64:105:pkey_scrypt_ctrl_uint64
KDF_F_PKEY_SCRYPT_DERIVE:109:pkey_scrypt_derive KDF_F_PKEY_SCRYPT_DERIVE:109:pkey_scrypt_derive
@ -739,7 +778,10 @@ KDF_F_PKEY_SCRYPT_INIT:106:pkey_scrypt_init
KDF_F_PKEY_SCRYPT_SET_MEMBUF:107:pkey_scrypt_set_membuf KDF_F_PKEY_SCRYPT_SET_MEMBUF:107:pkey_scrypt_set_membuf
KDF_F_PKEY_TLS1_PRF_CTRL_STR:100:pkey_tls1_prf_ctrl_str KDF_F_PKEY_TLS1_PRF_CTRL_STR:100:pkey_tls1_prf_ctrl_str
KDF_F_PKEY_TLS1_PRF_DERIVE:101:pkey_tls1_prf_derive KDF_F_PKEY_TLS1_PRF_DERIVE:101:pkey_tls1_prf_derive
KDF_F_PKEY_TLS1_PRF_INIT:110:pkey_tls1_prf_init
KDF_F_TLS1_PRF_ALG:111:tls1_prf_alg
OBJ_F_OBJ_ADD_OBJECT:105:OBJ_add_object OBJ_F_OBJ_ADD_OBJECT:105:OBJ_add_object
OBJ_F_OBJ_ADD_SIGID:107:OBJ_add_sigid
OBJ_F_OBJ_CREATE:100:OBJ_create OBJ_F_OBJ_CREATE:100:OBJ_create
OBJ_F_OBJ_DUP:101:OBJ_dup OBJ_F_OBJ_DUP:101:OBJ_dup
OBJ_F_OBJ_NAME_NEW_INDEX:106:OBJ_NAME_new_index OBJ_F_OBJ_NAME_NEW_INDEX:106:OBJ_NAME_new_index
@ -816,6 +858,7 @@ PEM_F_D2I_PKCS8PRIVATEKEY_FP:121:d2i_PKCS8PrivateKey_fp
PEM_F_DO_B2I:132:do_b2i PEM_F_DO_B2I:132:do_b2i
PEM_F_DO_B2I_BIO:133:do_b2i_bio PEM_F_DO_B2I_BIO:133:do_b2i_bio
PEM_F_DO_BLOB_HEADER:134:do_blob_header PEM_F_DO_BLOB_HEADER:134:do_blob_header
PEM_F_DO_I2B:146:do_i2b
PEM_F_DO_PK8PKEY:126:do_pk8pkey PEM_F_DO_PK8PKEY:126:do_pk8pkey
PEM_F_DO_PK8PKEY_FP:125:do_pk8pkey_fp PEM_F_DO_PK8PKEY_FP:125:do_pk8pkey_fp
PEM_F_DO_PVK_BODY:135:do_PVK_body PEM_F_DO_PVK_BODY:135:do_PVK_body
@ -950,6 +993,7 @@ RSA_F_RSA_METH_DUP:161:RSA_meth_dup
RSA_F_RSA_METH_NEW:162:RSA_meth_new RSA_F_RSA_METH_NEW:162:RSA_meth_new
RSA_F_RSA_METH_SET1_NAME:163:RSA_meth_set1_name RSA_F_RSA_METH_SET1_NAME:163:RSA_meth_set1_name
RSA_F_RSA_MGF1_TO_MD:157:* RSA_F_RSA_MGF1_TO_MD:157:*
RSA_F_RSA_MULTIP_INFO_NEW:166:rsa_multip_info_new
RSA_F_RSA_NEW_METHOD:106:RSA_new_method RSA_F_RSA_NEW_METHOD:106:RSA_new_method
RSA_F_RSA_NULL:124:* RSA_F_RSA_NULL:124:*
RSA_F_RSA_NULL_PRIVATE_DECRYPT:132:* RSA_F_RSA_NULL_PRIVATE_DECRYPT:132:*
@ -990,6 +1034,7 @@ RSA_F_RSA_SIGN_ASN1_OCTET_STRING:118:RSA_sign_ASN1_OCTET_STRING
RSA_F_RSA_VERIFY:119:RSA_verify RSA_F_RSA_VERIFY:119:RSA_verify
RSA_F_RSA_VERIFY_ASN1_OCTET_STRING:120:RSA_verify_ASN1_OCTET_STRING RSA_F_RSA_VERIFY_ASN1_OCTET_STRING:120:RSA_verify_ASN1_OCTET_STRING
RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1:126:RSA_verify_PKCS1_PSS_mgf1 RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1:126:RSA_verify_PKCS1_PSS_mgf1
RSA_F_SETUP_TBUF:167:setup_tbuf
SM2_F_PKEY_SM2_CTRL:274:pkey_sm2_ctrl SM2_F_PKEY_SM2_CTRL:274:pkey_sm2_ctrl
SM2_F_PKEY_SM2_CTRL_STR:275:pkey_sm2_ctrl_str SM2_F_PKEY_SM2_CTRL_STR:275:pkey_sm2_ctrl_str
SM2_F_PKEY_SM2_KEYGEN:276:pkey_sm2_keygen SM2_F_PKEY_SM2_KEYGEN:276:pkey_sm2_keygen
@ -1017,6 +1062,7 @@ SSL_F_DO_SSL3_WRITE:104:do_ssl3_write
SSL_F_DTLS1_BUFFER_RECORD:247:dtls1_buffer_record SSL_F_DTLS1_BUFFER_RECORD:247:dtls1_buffer_record
SSL_F_DTLS1_CHECK_TIMEOUT_NUM:318:dtls1_check_timeout_num SSL_F_DTLS1_CHECK_TIMEOUT_NUM:318:dtls1_check_timeout_num
SSL_F_DTLS1_HEARTBEAT:305:* SSL_F_DTLS1_HEARTBEAT:305:*
SSL_F_DTLS1_HM_FRAGMENT_NEW:623:dtls1_hm_fragment_new
SSL_F_DTLS1_PREPROCESS_FRAGMENT:288:dtls1_preprocess_fragment SSL_F_DTLS1_PREPROCESS_FRAGMENT:288:dtls1_preprocess_fragment
SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS:424:dtls1_process_buffered_records SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS:424:dtls1_process_buffered_records
SSL_F_DTLS1_PROCESS_RECORD:257:dtls1_process_record SSL_F_DTLS1_PROCESS_RECORD:257:dtls1_process_record
@ -1066,6 +1112,8 @@ SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION:418:ossl_statem_server_read_transition
SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION:604:\ SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION:604:\
ossl_statem_server_write_transition ossl_statem_server_write_transition
SSL_F_PARSE_CA_NAMES:541:parse_ca_names SSL_F_PARSE_CA_NAMES:541:parse_ca_names
SSL_F_PITEM_NEW:624:pitem_new
SSL_F_PQUEUE_NEW:625:pqueue_new
SSL_F_PROCESS_KEY_SHARE_EXT:439:* SSL_F_PROCESS_KEY_SHARE_EXT:439:*
SSL_F_READ_STATE_MACHINE:352:read_state_machine SSL_F_READ_STATE_MACHINE:352:read_state_machine
SSL_F_SET_CLIENT_CIPHERSUITE:540:set_client_ciphersuite SSL_F_SET_CLIENT_CIPHERSUITE:540:set_client_ciphersuite
@ -1118,10 +1166,13 @@ SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT:280:*
SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO:606:ssl_check_srp_ext_ClientHello SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO:606:ssl_check_srp_ext_ClientHello
SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG:279:ssl_check_srvr_ecc_cert_and_alg SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG:279:ssl_check_srvr_ecc_cert_and_alg
SSL_F_SSL_CHOOSE_CLIENT_VERSION:607:ssl_choose_client_version SSL_F_SSL_CHOOSE_CLIENT_VERSION:607:ssl_choose_client_version
SSL_F_SSL_CIPHER_DESCRIPTION:626:SSL_CIPHER_description
SSL_F_SSL_CIPHER_LIST_TO_BYTES:425:ssl_cipher_list_to_bytes SSL_F_SSL_CIPHER_LIST_TO_BYTES:425:ssl_cipher_list_to_bytes
SSL_F_SSL_CIPHER_PROCESS_RULESTR:230:ssl_cipher_process_rulestr SSL_F_SSL_CIPHER_PROCESS_RULESTR:230:ssl_cipher_process_rulestr
SSL_F_SSL_CIPHER_STRENGTH_SORT:231:ssl_cipher_strength_sort SSL_F_SSL_CIPHER_STRENGTH_SORT:231:ssl_cipher_strength_sort
SSL_F_SSL_CLEAR:164:SSL_clear SSL_F_SSL_CLEAR:164:SSL_clear
SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT:627:\
SSL_client_hello_get1_extensions_present
SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD:165:SSL_COMP_add_compression_method SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD:165:SSL_COMP_add_compression_method
SSL_F_SSL_CONF_CMD:334:SSL_CONF_cmd SSL_F_SSL_CONF_CMD:334:SSL_CONF_cmd
SSL_F_SSL_CREATE_CIPHER_LIST:166:ssl_create_cipher_list SSL_F_SSL_CREATE_CIPHER_LIST:166:ssl_create_cipher_list
@ -1250,8 +1301,13 @@ SSL_F_TLS1_ENC:401:tls1_enc
SSL_F_TLS1_EXPORT_KEYING_MATERIAL:314:tls1_export_keying_material SSL_F_TLS1_EXPORT_KEYING_MATERIAL:314:tls1_export_keying_material
SSL_F_TLS1_GET_CURVELIST:338:tls1_get_curvelist SSL_F_TLS1_GET_CURVELIST:338:tls1_get_curvelist
SSL_F_TLS1_PRF:284:tls1_PRF SSL_F_TLS1_PRF:284:tls1_PRF
SSL_F_TLS1_SAVE_U16:628:tls1_save_u16
SSL_F_TLS1_SETUP_KEY_BLOCK:211:tls1_setup_key_block SSL_F_TLS1_SETUP_KEY_BLOCK:211:tls1_setup_key_block
SSL_F_TLS1_SET_GROUPS:629:tls1_set_groups
SSL_F_TLS1_SET_RAW_SIGALGS:630:tls1_set_raw_sigalgs
SSL_F_TLS1_SET_SERVER_SIGALGS:335:tls1_set_server_sigalgs SSL_F_TLS1_SET_SERVER_SIGALGS:335:tls1_set_server_sigalgs
SSL_F_TLS1_SET_SHARED_SIGALGS:631:tls1_set_shared_sigalgs
SSL_F_TLS1_SET_SIGALGS:632:tls1_set_sigalgs
SSL_F_TLS_CHOOSE_SIGALG:513:tls_choose_sigalg SSL_F_TLS_CHOOSE_SIGALG:513:tls_choose_sigalg
SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK:354:tls_client_key_exchange_post_work SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK:354:tls_client_key_exchange_post_work
SSL_F_TLS_COLLECT_EXTENSIONS:435:tls_collect_extensions SSL_F_TLS_COLLECT_EXTENSIONS:435:tls_collect_extensions
@ -1423,6 +1479,8 @@ SSL_F_TLS_PSK_DO_BINDER:506:tls_psk_do_binder
SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT:450:* SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT:450:*
SSL_F_TLS_SETUP_HANDSHAKE:508:tls_setup_handshake SSL_F_TLS_SETUP_HANDSHAKE:508:tls_setup_handshake
SSL_F_USE_CERTIFICATE_CHAIN_FILE:220:use_certificate_chain_file SSL_F_USE_CERTIFICATE_CHAIN_FILE:220:use_certificate_chain_file
SSL_F_WPACKET_INTERN_INIT_LEN:633:wpacket_intern_init_len
SSL_F_WPACKET_START_SUB_PACKET_LEN__:634:WPACKET_start_sub_packet_len__
SSL_F_WRITE_STATE_MACHINE:586:write_state_machine SSL_F_WRITE_STATE_MACHINE:586:write_state_machine
TS_F_DEF_SERIAL_CB:110:def_serial_cb TS_F_DEF_SERIAL_CB:110:def_serial_cb
TS_F_DEF_TIME_CB:111:def_time_cb TS_F_DEF_TIME_CB:111:def_time_cb
@ -1487,6 +1545,7 @@ UI_F_GENERAL_ALLOCATE_BOOLEAN:108:general_allocate_boolean
UI_F_GENERAL_ALLOCATE_PROMPT:109:general_allocate_prompt UI_F_GENERAL_ALLOCATE_PROMPT:109:general_allocate_prompt
UI_F_NOECHO_CONSOLE:117:noecho_console UI_F_NOECHO_CONSOLE:117:noecho_console
UI_F_OPEN_CONSOLE:114:open_console UI_F_OPEN_CONSOLE:114:open_console
UI_F_UI_CONSTRUCT_PROMPT:121:UI_construct_prompt
UI_F_UI_CREATE_METHOD:112:UI_create_method UI_F_UI_CREATE_METHOD:112:UI_create_method
UI_F_UI_CTRL:111:UI_ctrl UI_F_UI_CTRL:111:UI_ctrl
UI_F_UI_DUP_ERROR_STRING:101:UI_dup_error_string UI_F_UI_DUP_ERROR_STRING:101:UI_dup_error_string

View file

@ -70,9 +70,10 @@ static int b64_new(BIO *bi)
{ {
BIO_B64_CTX *ctx; BIO_B64_CTX *ctx;
ctx = OPENSSL_zalloc(sizeof(*ctx)); if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
if (ctx == NULL) EVPerr(EVP_F_B64_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->cont = 1; ctx->cont = 1;
ctx->start = 1; ctx->start = 1;

View file

@ -65,9 +65,10 @@ static int enc_new(BIO *bi)
{ {
BIO_ENC_CTX *ctx; BIO_ENC_CTX *ctx;
ctx = OPENSSL_zalloc(sizeof(*ctx)); if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
if (ctx == NULL) EVPerr(EVP_F_ENC_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->cipher = EVP_CIPHER_CTX_new(); ctx->cipher = EVP_CIPHER_CTX_new();
if (ctx->cipher == NULL) { if (ctx->cipher == NULL) {

View file

@ -133,9 +133,10 @@ static int ok_new(BIO *bi)
{ {
BIO_OK_CTX *ctx; BIO_OK_CTX *ctx;
ctx = OPENSSL_zalloc(sizeof(*ctx)); if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
if (ctx == NULL) EVPerr(EVP_F_OK_NEW, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->cont = 1; ctx->cont = 1;
ctx->sigio = 1; ctx->sigio = 1;

View file

@ -1586,9 +1586,10 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
if (gctx->iv != iv) if (gctx->iv != iv)
OPENSSL_free(gctx->iv); OPENSSL_free(gctx->iv);
gctx->iv = OPENSSL_malloc(len); if ((gctx->iv = OPENSSL_malloc(len)) == NULL) {
if (gctx->iv == NULL) EVPerr(EVP_F_S390X_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
} }
/* Add padding. */ /* Add padding. */
memset(gctx->iv + arg, 0, len - arg - 8); memset(gctx->iv + arg, 0, len - arg - 8);
@ -1704,9 +1705,10 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
} else { } else {
len = S390X_gcm_ivpadlen(gctx->ivlen); len = S390X_gcm_ivpadlen(gctx->ivlen);
gctx_out->iv = OPENSSL_malloc(len); if ((gctx_out->iv = OPENSSL_malloc(len)) == NULL) {
if (gctx_out->iv == NULL) EVPerr(EVP_F_S390X_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(gctx_out->iv, gctx->iv, len); memcpy(gctx_out->iv, gctx->iv, len);
} }
@ -2826,9 +2828,10 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) { if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) {
if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)) if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c))
OPENSSL_free(gctx->iv); OPENSSL_free(gctx->iv);
gctx->iv = OPENSSL_malloc(arg); if ((gctx->iv = OPENSSL_malloc(arg)) == NULL) {
if (gctx->iv == NULL) EVPerr(EVP_F_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
} }
gctx->ivlen = arg; gctx->ivlen = arg;
return 1; return 1;
@ -2930,9 +2933,10 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)) if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c))
gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out);
else { else {
gctx_out->iv = OPENSSL_malloc(gctx->ivlen); if ((gctx_out->iv = OPENSSL_malloc(gctx->ivlen)) == NULL) {
if (gctx_out->iv == NULL) EVPerr(EVP_F_AES_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);
} }
return 1; return 1;

View file

@ -266,9 +266,10 @@ static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) { if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) {
if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c)) if (gctx->iv != EVP_CIPHER_CTX_iv_noconst(c))
OPENSSL_free(gctx->iv); OPENSSL_free(gctx->iv);
gctx->iv = OPENSSL_malloc(arg); if ((gctx->iv = OPENSSL_malloc(arg)) == NULL) {
if (gctx->iv == NULL) EVPerr(EVP_F_ARIA_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
} }
gctx->ivlen = arg; gctx->ivlen = arg;
return 1; return 1;
@ -370,9 +371,10 @@ static int aria_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c)) if (gctx->iv == EVP_CIPHER_CTX_iv_noconst(c))
gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out); gctx_out->iv = EVP_CIPHER_CTX_iv_noconst(out);
else { else {
gctx_out->iv = OPENSSL_malloc(gctx->ivlen); if ((gctx_out->iv = OPENSSL_malloc(gctx->ivlen)) == NULL) {
if (gctx_out->iv == NULL) EVPerr(EVP_F_ARIA_GCM_CTRL, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);
} }
return 1; return 1;

View file

@ -15,14 +15,17 @@
static const ERR_STRING_DATA EVP_str_functs[] = { static const ERR_STRING_DATA EVP_str_functs[] = {
{ERR_PACK(ERR_LIB_EVP, EVP_F_AESNI_INIT_KEY, 0), "aesni_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AESNI_INIT_KEY, 0), "aesni_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_AES_GCM_CTRL, 0), "aes_gcm_ctrl"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_AES_INIT_KEY, 0), "aes_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_INIT_KEY, 0), "aes_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_AES_OCB_CIPHER, 0), "aes_ocb_cipher"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_OCB_CIPHER, 0), "aes_ocb_cipher"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_AES_T4_INIT_KEY, 0), "aes_t4_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_T4_INIT_KEY, 0), "aes_t4_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_AES_WRAP_CIPHER, 0), "aes_wrap_cipher"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_AES_WRAP_CIPHER, 0), "aes_wrap_cipher"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ALG_MODULE_INIT, 0), "alg_module_init"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ALG_MODULE_INIT, 0), "alg_module_init"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_CCM_INIT_KEY, 0), "aria_ccm_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_CCM_INIT_KEY, 0), "aria_ccm_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_GCM_CTRL, 0), "aria_gcm_ctrl"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_GCM_INIT_KEY, 0), "aria_gcm_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_GCM_INIT_KEY, 0), "aria_gcm_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_INIT_KEY, 0), "aria_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_ARIA_INIT_KEY, 0), "aria_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_B64_NEW, 0), "b64_new"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_CAMELLIA_INIT_KEY, 0), "camellia_init_key"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_CAMELLIA_INIT_KEY, 0), "camellia_init_key"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_CHACHA20_POLY1305_CTRL, 0), {ERR_PACK(ERR_LIB_EVP, EVP_F_CHACHA20_POLY1305_CTRL, 0),
"chacha20_poly1305_ctrl"}, "chacha20_poly1305_ctrl"},
@ -30,6 +33,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = {
{ERR_PACK(ERR_LIB_EVP, EVP_F_DES_EDE3_WRAP_CIPHER, 0), {ERR_PACK(ERR_LIB_EVP, EVP_F_DES_EDE3_WRAP_CIPHER, 0),
"des_ede3_wrap_cipher"}, "des_ede3_wrap_cipher"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_DO_SIGVER_INIT, 0), "do_sigver_init"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_DO_SIGVER_INIT, 0), "do_sigver_init"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_ENC_NEW, 0), "enc_new"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHERINIT_EX, 0), "EVP_CipherInit_ex"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHERINIT_EX, 0), "EVP_CipherInit_ex"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHER_CTX_COPY, 0), {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_CIPHER_CTX_COPY, 0),
"EVP_CIPHER_CTX_copy"}, "EVP_CIPHER_CTX_copy"},
@ -122,6 +126,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = {
{ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_SIGNFINAL, 0), "EVP_SignFinal"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_SIGNFINAL, 0), "EVP_SignFinal"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_VERIFYFINAL, 0), "EVP_VerifyFinal"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_EVP_VERIFYFINAL, 0), "EVP_VerifyFinal"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_INT_CTX_NEW, 0), "int_ctx_new"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_INT_CTX_NEW, 0), "int_ctx_new"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_OK_NEW, 0), "ok_new"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_PBE_KEYIVGEN, 0), "PKCS5_PBE_keyivgen"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_PBE_KEYIVGEN, 0), "PKCS5_PBE_keyivgen"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_V2_PBE_KEYIVGEN, 0), {ERR_PACK(ERR_LIB_EVP, EVP_F_PKCS5_V2_PBE_KEYIVGEN, 0),
"PKCS5_v2_PBE_keyivgen"}, "PKCS5_v2_PBE_keyivgen"},
@ -132,6 +137,7 @@ static const ERR_STRING_DATA EVP_str_functs[] = {
{ERR_PACK(ERR_LIB_EVP, EVP_F_PKEY_SET_TYPE, 0), "pkey_set_type"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_PKEY_SET_TYPE, 0), "pkey_set_type"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_RC2_MAGIC_TO_METH, 0), "rc2_magic_to_meth"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_RC2_MAGIC_TO_METH, 0), "rc2_magic_to_meth"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_RC5_CTRL, 0), "rc5_ctrl"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_RC5_CTRL, 0), "rc5_ctrl"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_S390X_AES_GCM_CTRL, 0), "s390x_aes_gcm_ctrl"},
{ERR_PACK(ERR_LIB_EVP, EVP_F_UPDATE, 0), "update"}, {ERR_PACK(ERR_LIB_EVP, EVP_F_UPDATE, 0), "update"},
{0, NULL} {0, NULL}
}; };

View file

@ -708,9 +708,10 @@ int OPENSSL_atexit(void (*handler)(void))
} }
#endif #endif
newhand = OPENSSL_malloc(sizeof(*newhand)); if ((newhand = OPENSSL_malloc(sizeof(*newhand))) == NULL) {
if (newhand == NULL) CRYPTOerr(CRYPTO_F_OPENSSL_ATEXIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
newhand->handler = handler; newhand->handler = handler;
newhand->next = stop_handlers; newhand->next = stop_handlers;

View file

@ -48,9 +48,10 @@ static int pkey_hkdf_init(EVP_PKEY_CTX *ctx)
{ {
HKDF_PKEY_CTX *kctx; HKDF_PKEY_CTX *kctx;
kctx = OPENSSL_zalloc(sizeof(*kctx)); if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) {
if (kctx == NULL) KDFerr(KDF_F_PKEY_HKDF_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->data = kctx; ctx->data = kctx;

View file

@ -16,6 +16,7 @@
static const ERR_STRING_DATA KDF_str_functs[] = { static const ERR_STRING_DATA KDF_str_functs[] = {
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_CTRL_STR, 0), "pkey_hkdf_ctrl_str"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_CTRL_STR, 0), "pkey_hkdf_ctrl_str"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_DERIVE, 0), "pkey_hkdf_derive"}, {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_DERIVE, 0), "pkey_hkdf_derive"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_HKDF_INIT, 0), "pkey_hkdf_init"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_STR, 0), {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_STR, 0),
"pkey_scrypt_ctrl_str"}, "pkey_scrypt_ctrl_str"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_UINT64, 0), {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_SCRYPT_CTRL_UINT64, 0),
@ -28,6 +29,8 @@ static const ERR_STRING_DATA KDF_str_functs[] = {
"pkey_tls1_prf_ctrl_str"}, "pkey_tls1_prf_ctrl_str"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_DERIVE, 0), {ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_DERIVE, 0),
"pkey_tls1_prf_derive"}, "pkey_tls1_prf_derive"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_PKEY_TLS1_PRF_INIT, 0), "pkey_tls1_prf_init"},
{ERR_PACK(ERR_LIB_KDF, KDF_F_TLS1_PRF_ALG, 0), "tls1_prf_alg"},
{0, NULL} {0, NULL}
}; };

View file

@ -37,9 +37,10 @@ static int pkey_tls1_prf_init(EVP_PKEY_CTX *ctx)
{ {
TLS1_PRF_PKEY_CTX *kctx; TLS1_PRF_PKEY_CTX *kctx;
kctx = OPENSSL_zalloc(sizeof(*kctx)); if ((kctx = OPENSSL_zalloc(sizeof(*kctx))) == NULL) {
if (kctx == NULL) KDFerr(KDF_F_PKEY_TLS1_PRF_INIT, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ctx->data = kctx; ctx->data = kctx;
return 1; return 1;
@ -256,9 +257,10 @@ static int tls1_prf_alg(const EVP_MD *md,
seed, seed_len, out, olen)) seed, seed_len, out, olen))
return 0; return 0;
tmp = OPENSSL_malloc(olen); if ((tmp = OPENSSL_malloc(olen)) == NULL) {
if (tmp == NULL) KDFerr(KDF_F_TLS1_PRF_ALG, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (!tls1_prf_P_hash(EVP_sha1(), sec + slen/2, slen/2 + (slen & 1), if (!tls1_prf_P_hash(EVP_sha1(), sec + slen/2, slen/2 + (slen & 1),
seed, seed_len, tmp, olen)) { seed, seed_len, tmp, olen)) {
OPENSSL_clear_free(tmp, olen); OPENSSL_clear_free(tmp, olen);

View file

@ -71,9 +71,10 @@ FILE *openssl_fopen(const char *filename, const char *mode)
char *iterator; char *iterator;
char lastchar; char lastchar;
newname = OPENSSL_malloc(strlen(filename) + 1); if ((newname = OPENSSL_malloc(strlen(filename) + 1)) == NULL) {
if (newname == NULL) CRYPTOerr(CRYPTO_F_OPENSSL_FOPEN, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
for (iterator = newname, lastchar = '\0'; for (iterator = newname, lastchar = '\0';
*filename; filename++, iterator++) { *filename; filename++, iterator++) {

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -15,6 +15,7 @@
static const ERR_STRING_DATA OBJ_str_functs[] = { static const ERR_STRING_DATA OBJ_str_functs[] = {
{ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_ADD_OBJECT, 0), "OBJ_add_object"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_ADD_OBJECT, 0), "OBJ_add_object"},
{ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_ADD_SIGID, 0), "OBJ_add_sigid"},
{ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_CREATE, 0), "OBJ_create"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_CREATE, 0), "OBJ_create"},
{ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_DUP, 0), "OBJ_dup"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_DUP, 0), "OBJ_dup"},
{ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NAME_NEW_INDEX, 0), "OBJ_NAME_new_index"}, {ERR_PACK(ERR_LIB_OBJ, OBJ_F_OBJ_NAME_NEW_INDEX, 0), "OBJ_NAME_new_index"},

View file

@ -10,6 +10,7 @@
#include <openssl/objects.h> #include <openssl/objects.h>
#include "obj_xref.h" #include "obj_xref.h"
#include "internal/nelem.h" #include "internal/nelem.h"
#include <openssl/err.h>
static STACK_OF(nid_triple) *sig_app, *sigx_app; static STACK_OF(nid_triple) *sig_app, *sigx_app;
@ -103,9 +104,10 @@ int OBJ_add_sigid(int signid, int dig_id, int pkey_id)
sigx_app = sk_nid_triple_new(sigx_cmp); sigx_app = sk_nid_triple_new(sigx_cmp);
if (sigx_app == NULL) if (sigx_app == NULL)
return 0; return 0;
ntr = OPENSSL_malloc(sizeof(*ntr)); if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL) {
if (ntr == NULL) OBJerr(OBJ_F_OBJ_ADD_SIGID, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
ntr->sign_id = signid; ntr->sign_id = signid;
ntr->hash_id = dig_id; ntr->hash_id = dig_id;
ntr->pkey_id = pkey_id; ntr->pkey_id = pkey_id;

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -26,6 +26,7 @@ static const ERR_STRING_DATA PEM_str_functs[] = {
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I, 0), "do_b2i"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I, 0), "do_b2i"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I_BIO, 0), "do_b2i_bio"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_B2I_BIO, 0), "do_b2i_bio"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_BLOB_HEADER, 0), "do_blob_header"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_BLOB_HEADER, 0), "do_blob_header"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_I2B, 0), "do_i2b"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY, 0), "do_pk8pkey"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY, 0), "do_pk8pkey"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY_FP, 0), "do_pk8pkey_fp"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PK8PKEY_FP, 0), "do_pk8pkey_fp"},
{ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PVK_BODY, 0), "do_PVK_body"}, {ERR_PACK(ERR_LIB_PEM, PEM_F_DO_PVK_BODY, 0), "do_PVK_body"},

View file

@ -444,9 +444,10 @@ static int do_i2b(unsigned char **out, EVP_PKEY *pk, int ispub)
if (*out) if (*out)
p = *out; p = *out;
else { else {
p = OPENSSL_malloc(outlen); if ((p = OPENSSL_malloc(outlen)) == NULL) {
if (p == NULL) PEMerr(PEM_F_DO_I2B, ERR_R_MALLOC_FAILURE);
return -1; return -1;
}
*out = p; *out = p;
noinc = 1; noinc = 1;
} }

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -37,6 +37,8 @@ static const ERR_STRING_DATA RSA_str_functs[] = {
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_NEW, 0), "RSA_meth_new"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_NEW, 0), "RSA_meth_new"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_SET1_NAME, 0), "RSA_meth_set1_name"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_METH_SET1_NAME, 0), "RSA_meth_set1_name"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_MGF1_TO_MD, 0), ""}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_MGF1_TO_MD, 0), ""},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_MULTIP_INFO_NEW, 0),
"rsa_multip_info_new"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NEW_METHOD, 0), "RSA_new_method"}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NEW_METHOD, 0), "RSA_new_method"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL, 0), ""}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL, 0), ""},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL_PRIVATE_DECRYPT, 0), ""}, {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_NULL_PRIVATE_DECRYPT, 0), ""},
@ -100,6 +102,7 @@ static const ERR_STRING_DATA RSA_str_functs[] = {
"RSA_verify_ASN1_OCTET_STRING"}, "RSA_verify_ASN1_OCTET_STRING"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1, 0), {ERR_PACK(ERR_LIB_RSA, RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1, 0),
"RSA_verify_PKCS1_PSS_mgf1"}, "RSA_verify_PKCS1_PSS_mgf1"},
{ERR_PACK(ERR_LIB_RSA, RSA_F_SETUP_TBUF, 0), "setup_tbuf"},
{0, NULL} {0, NULL}
}; };

View file

@ -9,6 +9,7 @@
*/ */
#include <openssl/bn.h> #include <openssl/bn.h>
#include <openssl/err.h>
#include "rsa_locl.h" #include "rsa_locl.h"
void rsa_multip_info_free_ex(RSA_PRIME_INFO *pinfo) void rsa_multip_info_free_ex(RSA_PRIME_INFO *pinfo)
@ -32,9 +33,10 @@ RSA_PRIME_INFO *rsa_multip_info_new(void)
RSA_PRIME_INFO *pinfo; RSA_PRIME_INFO *pinfo;
/* create a RSA_PRIME_INFO structure */ /* create a RSA_PRIME_INFO structure */
pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO)); if ((pinfo = OPENSSL_zalloc(sizeof(RSA_PRIME_INFO))) == NULL) {
if (pinfo == NULL) RSAerr(RSA_F_RSA_MULTIP_INFO_NEW, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
if ((pinfo->r = BN_secure_new()) == NULL) if ((pinfo->r = BN_secure_new()) == NULL)
goto err; goto err;
if ((pinfo->d = BN_secure_new()) == NULL) if ((pinfo->d = BN_secure_new()) == NULL)

View file

@ -101,9 +101,10 @@ static int setup_tbuf(RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk)
{ {
if (ctx->tbuf != NULL) if (ctx->tbuf != NULL)
return 1; return 1;
ctx->tbuf = OPENSSL_malloc(EVP_PKEY_size(pk->pkey)); if ((ctx->tbuf = OPENSSL_malloc(EVP_PKEY_size(pk->pkey))) == NULL) {
if (ctx->tbuf == NULL) RSAerr(RSA_F_SETUP_TBUF, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
return 1; return 1;
} }

View file

@ -19,6 +19,7 @@
# include <openssl/buffer.h> # include <openssl/buffer.h>
# include <openssl/rand.h> # include <openssl/rand.h>
# include <openssl/txt_db.h> # include <openssl/txt_db.h>
# include <openssl/err.h>
# define SRP_RANDOM_SALT_LEN 20 # define SRP_RANDOM_SALT_LEN 20
# define MAX_LEN 2500 # define MAX_LEN 2500
@ -58,9 +59,12 @@ void SRP_user_pwd_free(SRP_user_pwd *user_pwd)
static SRP_user_pwd *SRP_user_pwd_new(void) static SRP_user_pwd *SRP_user_pwd_new(void)
{ {
SRP_user_pwd *ret = OPENSSL_malloc(sizeof(*ret)); SRP_user_pwd *ret;
if (ret == NULL)
if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) {
/* SRPerr(SRP_F_SRP_USER_PWD_NEW, ERR_R_MALLOC_FAILURE); */
return NULL; return NULL;
}
ret->N = NULL; ret->N = NULL;
ret->g = NULL; ret->g = NULL;
ret->s = NULL; ret->s = NULL;

View file

@ -173,9 +173,10 @@ static int sk_reserve(OPENSSL_STACK *st, int n, int exact)
* At this point, |st->num_alloc| and |st->num| are 0; * At this point, |st->num_alloc| and |st->num| are 0;
* so |num_alloc| value is |n| or |min_nodes| if greater than |n|. * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
*/ */
st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc); if ((st->data = OPENSSL_zalloc(sizeof(void *) * num_alloc)) == NULL) {
if (st->data == NULL) /* STACKerr(STACK_F_SK_RESERVE, ERR_R_MALLOC_FAILURE); */
return 0; return 0;
}
st->num_alloc = num_alloc; st->num_alloc = num_alloc;
return 1; return 1;
} }

View file

@ -1,6 +1,6 @@
/* /*
* Generated by util/mkerr.pl DO NOT EDIT * Generated by util/mkerr.pl DO NOT EDIT
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* *
* Licensed under the OpenSSL license (the "License"). You may not use * Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy * this file except in compliance with the License. You can obtain a copy
@ -22,6 +22,7 @@ static const ERR_STRING_DATA UI_str_functs[] = {
"general_allocate_prompt"}, "general_allocate_prompt"},
{ERR_PACK(ERR_LIB_UI, UI_F_NOECHO_CONSOLE, 0), "noecho_console"}, {ERR_PACK(ERR_LIB_UI, UI_F_NOECHO_CONSOLE, 0), "noecho_console"},
{ERR_PACK(ERR_LIB_UI, UI_F_OPEN_CONSOLE, 0), "open_console"}, {ERR_PACK(ERR_LIB_UI, UI_F_OPEN_CONSOLE, 0), "open_console"},
{ERR_PACK(ERR_LIB_UI, UI_F_UI_CONSTRUCT_PROMPT, 0), "UI_construct_prompt"},
{ERR_PACK(ERR_LIB_UI, UI_F_UI_CREATE_METHOD, 0), "UI_create_method"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_CREATE_METHOD, 0), "UI_create_method"},
{ERR_PACK(ERR_LIB_UI, UI_F_UI_CTRL, 0), "UI_ctrl"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_CTRL, 0), "UI_ctrl"},
{ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_ERROR_STRING, 0), "UI_dup_error_string"}, {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_ERROR_STRING, 0), "UI_dup_error_string"},

View file

@ -374,9 +374,10 @@ char *UI_construct_prompt(UI *ui, const char *object_desc,
len += sizeof(prompt2) - 1 + strlen(object_name); len += sizeof(prompt2) - 1 + strlen(object_name);
len += sizeof(prompt3) - 1; len += sizeof(prompt3) - 1;
prompt = OPENSSL_malloc(len + 1); if ((prompt = OPENSSL_malloc(len + 1)) == NULL) {
if (prompt == NULL) UIerr(UI_F_UI_CONSTRUCT_PROMPT, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
OPENSSL_strlcpy(prompt, prompt1, len + 1); OPENSSL_strlcpy(prompt, prompt1, len + 1);
OPENSSL_strlcat(prompt, object_desc, len + 1); OPENSSL_strlcat(prompt, object_desc, len + 1);
if (object_name != NULL) { if (object_name != NULL) {

View file

@ -23,6 +23,7 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_A2I_ASN1_INTEGER 102 # define ASN1_F_A2I_ASN1_INTEGER 102
# define ASN1_F_A2I_ASN1_STRING 103 # define ASN1_F_A2I_ASN1_STRING 103
# define ASN1_F_APPEND_EXP 176 # define ASN1_F_APPEND_EXP 176
# define ASN1_F_ASN1_BIO_INIT 113
# define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 # define ASN1_F_ASN1_BIT_STRING_SET_BIT 183
# define ASN1_F_ASN1_CB 177 # define ASN1_F_ASN1_CB 177
# define ASN1_F_ASN1_CHECK_TLEN 104 # define ASN1_F_ASN1_CHECK_TLEN 104
@ -34,6 +35,7 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_ASN1_DO_ADB 110 # define ASN1_F_ASN1_DO_ADB 110
# define ASN1_F_ASN1_DO_LOCK 233 # define ASN1_F_ASN1_DO_LOCK 233
# define ASN1_F_ASN1_DUP 111 # define ASN1_F_ASN1_DUP 111
# define ASN1_F_ASN1_ENC_SAVE 115
# define ASN1_F_ASN1_EX_C2I 204 # define ASN1_F_ASN1_EX_C2I 204
# define ASN1_F_ASN1_FIND_END 190 # define ASN1_F_ASN1_FIND_END 190
# define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 # define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216
@ -47,6 +49,7 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_ASN1_ITEM_DUP 191 # define ASN1_F_ASN1_ITEM_DUP 191
# define ASN1_F_ASN1_ITEM_EMBED_D2I 120 # define ASN1_F_ASN1_ITEM_EMBED_D2I 120
# define ASN1_F_ASN1_ITEM_EMBED_NEW 121 # define ASN1_F_ASN1_ITEM_EMBED_NEW 121
# define ASN1_F_ASN1_ITEM_FLAGS_I2D 118
# define ASN1_F_ASN1_ITEM_I2D_BIO 192 # define ASN1_F_ASN1_ITEM_I2D_BIO 192
# define ASN1_F_ASN1_ITEM_I2D_FP 193 # define ASN1_F_ASN1_ITEM_I2D_FP 193
# define ASN1_F_ASN1_ITEM_PACK 198 # define ASN1_F_ASN1_ITEM_PACK 198
@ -58,6 +61,7 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_ASN1_OBJECT_NEW 123 # define ASN1_F_ASN1_OBJECT_NEW 123
# define ASN1_F_ASN1_OUTPUT_DATA 214 # define ASN1_F_ASN1_OUTPUT_DATA 214
# define ASN1_F_ASN1_PCTX_NEW 205 # define ASN1_F_ASN1_PCTX_NEW 205
# define ASN1_F_ASN1_PRIMITIVE_NEW 119
# define ASN1_F_ASN1_SCTX_NEW 221 # define ASN1_F_ASN1_SCTX_NEW 221
# define ASN1_F_ASN1_SIGN 128 # define ASN1_F_ASN1_SIGN 128
# define ASN1_F_ASN1_STR2TYPE 179 # define ASN1_F_ASN1_STR2TYPE 179
@ -91,7 +95,10 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_D2I_AUTOPRIVATEKEY 207 # define ASN1_F_D2I_AUTOPRIVATEKEY 207
# define ASN1_F_D2I_PRIVATEKEY 154 # define ASN1_F_D2I_PRIVATEKEY 154
# define ASN1_F_D2I_PUBLICKEY 155 # define ASN1_F_D2I_PUBLICKEY 155
# define ASN1_F_DO_CREATE 124
# define ASN1_F_DO_DUMP 125
# define ASN1_F_DO_TCREATE 222 # define ASN1_F_DO_TCREATE 222
# define ASN1_F_I2A_ASN1_OBJECT 126
# define ASN1_F_I2D_ASN1_BIO_STREAM 211 # define ASN1_F_I2D_ASN1_BIO_STREAM 211
# define ASN1_F_I2D_DSA_PUBKEY 161 # define ASN1_F_I2D_DSA_PUBKEY 161
# define ASN1_F_I2D_EC_PUBKEY 181 # define ASN1_F_I2D_EC_PUBKEY 181
@ -99,6 +106,8 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_I2D_PUBLICKEY 164 # define ASN1_F_I2D_PUBLICKEY 164
# define ASN1_F_I2D_RSA_PUBKEY 165 # define ASN1_F_I2D_RSA_PUBKEY 165
# define ASN1_F_LONG_C2I 166 # define ASN1_F_LONG_C2I 166
# define ASN1_F_NDEF_PREFIX 127
# define ASN1_F_NDEF_SUFFIX 136
# define ASN1_F_OID_MODULE_INIT 174 # define ASN1_F_OID_MODULE_INIT 174
# define ASN1_F_PARSE_TAGGING 182 # define ASN1_F_PARSE_TAGGING 182
# define ASN1_F_PKCS5_PBE2_SET_IV 167 # define ASN1_F_PKCS5_PBE2_SET_IV 167
@ -109,9 +118,12 @@ int ERR_load_ASN1_strings(void);
# define ASN1_F_PKCS5_SCRYPT_SET 232 # define ASN1_F_PKCS5_SCRYPT_SET 232
# define ASN1_F_SMIME_READ_ASN1 212 # define ASN1_F_SMIME_READ_ASN1 212
# define ASN1_F_SMIME_TEXT 213 # define ASN1_F_SMIME_TEXT 213
# define ASN1_F_STABLE_GET 138
# define ASN1_F_STBL_MODULE_INIT 223 # define ASN1_F_STBL_MODULE_INIT 223
# define ASN1_F_UINT32_C2I 105 # define ASN1_F_UINT32_C2I 105
# define ASN1_F_UINT32_NEW 139
# define ASN1_F_UINT64_C2I 112 # define ASN1_F_UINT64_C2I 112
# define ASN1_F_UINT64_NEW 141
# define ASN1_F_X509_CRL_ADD0_REVOKED 169 # define ASN1_F_X509_CRL_ADD0_REVOKED 169
# define ASN1_F_X509_INFO_NEW 170 # define ASN1_F_X509_INFO_NEW 170
# define ASN1_F_X509_NAME_ENCODE 203 # define ASN1_F_X509_NAME_ENCODE 203

View file

@ -25,6 +25,7 @@ int ERR_load_ASYNC_strings(void);
# define ASYNC_F_ASYNC_PAUSE_JOB 103 # define ASYNC_F_ASYNC_PAUSE_JOB 103
# define ASYNC_F_ASYNC_START_FUNC 104 # define ASYNC_F_ASYNC_START_FUNC 104
# define ASYNC_F_ASYNC_START_JOB 105 # define ASYNC_F_ASYNC_START_JOB 105
# define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106
/* /*
* ASYNC reason codes. * ASYNC reason codes.

View file

@ -20,6 +20,7 @@ int ERR_load_BIO_strings(void);
* BIO function codes. * BIO function codes.
*/ */
# define BIO_F_ACPT_STATE 100 # define BIO_F_ACPT_STATE 100
# define BIO_F_ADDRINFO_WRAP 148
# define BIO_F_ADDR_STRINGS 134 # define BIO_F_ADDR_STRINGS 134
# define BIO_F_BIO_ACCEPT 101 # define BIO_F_BIO_ACCEPT 101
# define BIO_F_BIO_ACCEPT_EX 137 # define BIO_F_BIO_ACCEPT_EX 137
@ -60,11 +61,14 @@ int ERR_load_BIO_strings(void);
# define BIO_F_BUFFER_CTRL 114 # define BIO_F_BUFFER_CTRL 114
# define BIO_F_CONN_CTRL 127 # define BIO_F_CONN_CTRL 127
# define BIO_F_CONN_STATE 115 # define BIO_F_CONN_STATE 115
# define BIO_F_DGRAM_SCTP_NEW 149
# define BIO_F_DGRAM_SCTP_READ 132 # define BIO_F_DGRAM_SCTP_READ 132
# define BIO_F_DGRAM_SCTP_WRITE 133 # define BIO_F_DGRAM_SCTP_WRITE 133
# define BIO_F_DOAPR_OUTCH 150
# define BIO_F_FILE_CTRL 116 # define BIO_F_FILE_CTRL 116
# define BIO_F_FILE_READ 130 # define BIO_F_FILE_READ 130
# define BIO_F_LINEBUFFER_CTRL 129 # define BIO_F_LINEBUFFER_CTRL 129
# define BIO_F_LINEBUFFER_NEW 151
# define BIO_F_MEM_WRITE 117 # define BIO_F_MEM_WRITE 117
# define BIO_F_SSL_NEW 118 # define BIO_F_SSL_NEW 118

View file

@ -59,10 +59,12 @@ int ERR_load_BN_strings(void);
# define BN_F_BN_MOD_SQRT 121 # define BN_F_BN_MOD_SQRT 121
# define BN_F_BN_MPI2BN 112 # define BN_F_BN_MPI2BN 112
# define BN_F_BN_NEW 113 # define BN_F_BN_NEW 113
# define BN_F_BN_POOL_GET 147
# define BN_F_BN_RAND 114 # define BN_F_BN_RAND 114
# define BN_F_BN_RAND_RANGE 122 # define BN_F_BN_RAND_RANGE 122
# define BN_F_BN_RSHIFT 146 # define BN_F_BN_RSHIFT 146
# define BN_F_BN_SET_WORDS 144 # define BN_F_BN_SET_WORDS 144
# define BN_F_BN_STACK_PUSH 148
# define BN_F_BN_USUB 115 # define BN_F_BN_USUB 115
/* /*

View file

@ -49,6 +49,7 @@ int ERR_load_CMS_strings(void);
# define CMS_F_CMS_DIGEST_VERIFY 118 # define CMS_F_CMS_DIGEST_VERIFY 118
# define CMS_F_CMS_ENCODE_RECEIPT 161 # define CMS_F_CMS_ENCODE_RECEIPT 161
# define CMS_F_CMS_ENCRYPT 119 # define CMS_F_CMS_ENCRYPT 119
# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 179
# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120
# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 # define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121
# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 # define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122
@ -103,6 +104,7 @@ int ERR_load_CMS_strings(void);
# define CMS_F_CMS_STREAM 155 # define CMS_F_CMS_STREAM 155
# define CMS_F_CMS_UNCOMPRESS 156 # define CMS_F_CMS_UNCOMPRESS 156
# define CMS_F_CMS_VERIFY 157 # define CMS_F_CMS_VERIFY 157
# define CMS_F_KEK_UNWRAP_KEY 180
/* /*
* CMS reason codes. * CMS reason codes.

View file

@ -26,6 +26,7 @@ int ERR_load_CONF_strings(void);
# define CONF_F_DEF_LOAD 120 # define CONF_F_DEF_LOAD 120
# define CONF_F_DEF_LOAD_BIO 121 # define CONF_F_DEF_LOAD_BIO 121
# define CONF_F_GET_NEXT_FILE 107 # define CONF_F_GET_NEXT_FILE 107
# define CONF_F_MODULE_ADD 122
# define CONF_F_MODULE_INIT 115 # define CONF_F_MODULE_INIT 115
# define CONF_F_MODULE_LOAD_DSO 117 # define CONF_F_MODULE_LOAD_DSO 117
# define CONF_F_MODULE_RUN 118 # define CONF_F_MODULE_RUN 118

View file

@ -27,7 +27,9 @@ int ERR_load_CRYPTO_strings(void);
# define CRYPTO_F_CRYPTO_SET_EX_DATA 102 # define CRYPTO_F_CRYPTO_SET_EX_DATA 102
# define CRYPTO_F_FIPS_MODE_SET 109 # define CRYPTO_F_FIPS_MODE_SET 109
# define CRYPTO_F_GET_AND_LOCK 113 # define CRYPTO_F_GET_AND_LOCK 113
# define CRYPTO_F_OPENSSL_ATEXIT 114
# define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 # define CRYPTO_F_OPENSSL_BUF2HEXSTR 117
# define CRYPTO_F_OPENSSL_FOPEN 119
# define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118
# define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116

View file

@ -47,6 +47,7 @@ int ERR_load_DH_strings(void);
# define DH_F_GENERATE_KEY 103 # define DH_F_GENERATE_KEY 103
# define DH_F_PKEY_DH_CTRL_STR 120 # define DH_F_PKEY_DH_CTRL_STR 120
# define DH_F_PKEY_DH_DERIVE 112 # define DH_F_PKEY_DH_DERIVE 112
# define DH_F_PKEY_DH_INIT 125
# define DH_F_PKEY_DH_KEYGEN 113 # define DH_F_PKEY_DH_KEYGEN 113
/* /*

View file

@ -122,6 +122,7 @@ int ERR_load_EC_strings(void);
# define EC_F_EC_KEY_OCT2PRIV 255 # define EC_F_EC_KEY_OCT2PRIV 255
# define EC_F_EC_KEY_PRINT 180 # define EC_F_EC_KEY_PRINT 180
# define EC_F_EC_KEY_PRINT_FP 181 # define EC_F_EC_KEY_PRINT_FP 181
# define EC_F_EC_KEY_PRIV2BUF 279
# define EC_F_EC_KEY_PRIV2OCT 256 # define EC_F_EC_KEY_PRIV2OCT 256
# define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229 # define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229
# define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258 # define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258
@ -131,6 +132,7 @@ int ERR_load_EC_strings(void);
# define EC_F_EC_PKEY_PARAM_CHECK 274 # define EC_F_EC_PKEY_PARAM_CHECK 274
# define EC_F_EC_POINTS_MAKE_AFFINE 136 # define EC_F_EC_POINTS_MAKE_AFFINE 136
# define EC_F_EC_POINT_ADD 112 # define EC_F_EC_POINT_ADD 112
# define EC_F_EC_POINT_BN2POINT 280
# define EC_F_EC_POINT_CMP 113 # define EC_F_EC_POINT_CMP 113
# define EC_F_EC_POINT_COPY 114 # define EC_F_EC_POINT_COPY 114
# define EC_F_EC_POINT_DBL 115 # define EC_F_EC_POINT_DBL 115
@ -143,6 +145,7 @@ int ERR_load_EC_strings(void);
# define EC_F_EC_POINT_MAKE_AFFINE 120 # define EC_F_EC_POINT_MAKE_AFFINE 120
# define EC_F_EC_POINT_NEW 121 # define EC_F_EC_POINT_NEW 121
# define EC_F_EC_POINT_OCT2POINT 122 # define EC_F_EC_POINT_OCT2POINT 122
# define EC_F_EC_POINT_POINT2BUF 281
# define EC_F_EC_POINT_POINT2OCT 123 # define EC_F_EC_POINT_POINT2OCT 123
# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185
# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124
@ -173,6 +176,8 @@ int ERR_load_EC_strings(void);
# define EC_F_PKEY_EC_CTRL 197 # define EC_F_PKEY_EC_CTRL 197
# define EC_F_PKEY_EC_CTRL_STR 198 # define EC_F_PKEY_EC_CTRL_STR 198
# define EC_F_PKEY_EC_DERIVE 217 # define EC_F_PKEY_EC_DERIVE 217
# define EC_F_PKEY_EC_INIT 282
# define EC_F_PKEY_EC_KDF_DERIVE 283
# define EC_F_PKEY_EC_KEYGEN 199 # define EC_F_PKEY_EC_KEYGEN 199
# define EC_F_PKEY_EC_PARAMGEN 219 # define EC_F_PKEY_EC_PARAMGEN 219
# define EC_F_PKEY_EC_SIGN 218 # define EC_F_PKEY_EC_SIGN 218

View file

@ -58,9 +58,11 @@ int ERR_load_ENGINE_strings(void);
# define ENGINE_F_ENGINE_TABLE_REGISTER 184 # define ENGINE_F_ENGINE_TABLE_REGISTER 184
# define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 # define ENGINE_F_ENGINE_UNLOCKED_FINISH 191
# define ENGINE_F_ENGINE_UP_REF 190 # define ENGINE_F_ENGINE_UP_REF 190
# define ENGINE_F_INT_CLEANUP_ITEM 199
# define ENGINE_F_INT_CTRL_HELPER 172 # define ENGINE_F_INT_CTRL_HELPER 172
# define ENGINE_F_INT_ENGINE_CONFIGURE 188 # define ENGINE_F_INT_ENGINE_CONFIGURE 188
# define ENGINE_F_INT_ENGINE_MODULE_INIT 187 # define ENGINE_F_INT_ENGINE_MODULE_INIT 187
# define ENGINE_F_OSSL_HMAC_INIT 200
/* /*
* ENGINE reason codes. * ENGINE reason codes.

View file

@ -20,19 +20,23 @@ int ERR_load_EVP_strings(void);
* EVP function codes. * EVP function codes.
*/ */
# define EVP_F_AESNI_INIT_KEY 165 # define EVP_F_AESNI_INIT_KEY 165
# define EVP_F_AES_GCM_CTRL 196
# define EVP_F_AES_INIT_KEY 133 # define EVP_F_AES_INIT_KEY 133
# define EVP_F_AES_OCB_CIPHER 169 # define EVP_F_AES_OCB_CIPHER 169
# define EVP_F_AES_T4_INIT_KEY 178 # define EVP_F_AES_T4_INIT_KEY 178
# define EVP_F_AES_WRAP_CIPHER 170 # define EVP_F_AES_WRAP_CIPHER 170
# define EVP_F_ALG_MODULE_INIT 177 # define EVP_F_ALG_MODULE_INIT 177
# define EVP_F_ARIA_CCM_INIT_KEY 175 # define EVP_F_ARIA_CCM_INIT_KEY 175
# define EVP_F_ARIA_GCM_CTRL 197
# define EVP_F_ARIA_GCM_INIT_KEY 176 # define EVP_F_ARIA_GCM_INIT_KEY 176
# define EVP_F_ARIA_INIT_KEY 185 # define EVP_F_ARIA_INIT_KEY 185
# define EVP_F_B64_NEW 198
# define EVP_F_CAMELLIA_INIT_KEY 159 # define EVP_F_CAMELLIA_INIT_KEY 159
# define EVP_F_CHACHA20_POLY1305_CTRL 182 # define EVP_F_CHACHA20_POLY1305_CTRL 182
# define EVP_F_CMLL_T4_INIT_KEY 179 # define EVP_F_CMLL_T4_INIT_KEY 179
# define EVP_F_DES_EDE3_WRAP_CIPHER 171 # define EVP_F_DES_EDE3_WRAP_CIPHER 171
# define EVP_F_DO_SIGVER_INIT 161 # define EVP_F_DO_SIGVER_INIT 161
# define EVP_F_ENC_NEW 199
# define EVP_F_EVP_CIPHERINIT_EX 123 # define EVP_F_EVP_CIPHERINIT_EX 123
# define EVP_F_EVP_CIPHER_CTX_COPY 163 # define EVP_F_EVP_CIPHER_CTX_COPY 163
# define EVP_F_EVP_CIPHER_CTX_CTRL 124 # define EVP_F_EVP_CIPHER_CTX_CTRL 124
@ -97,6 +101,7 @@ int ERR_load_EVP_strings(void);
# define EVP_F_EVP_SIGNFINAL 107 # define EVP_F_EVP_SIGNFINAL 107
# define EVP_F_EVP_VERIFYFINAL 108 # define EVP_F_EVP_VERIFYFINAL 108
# define EVP_F_INT_CTX_NEW 157 # define EVP_F_INT_CTX_NEW 157
# define EVP_F_OK_NEW 200
# define EVP_F_PKCS5_PBE_KEYIVGEN 117 # define EVP_F_PKCS5_PBE_KEYIVGEN 117
# define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 # define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118
# define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164 # define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164
@ -104,6 +109,7 @@ int ERR_load_EVP_strings(void);
# define EVP_F_PKEY_SET_TYPE 158 # define EVP_F_PKEY_SET_TYPE 158
# define EVP_F_RC2_MAGIC_TO_METH 109 # define EVP_F_RC2_MAGIC_TO_METH 109
# define EVP_F_RC5_CTRL 125 # define EVP_F_RC5_CTRL 125
# define EVP_F_S390X_AES_GCM_CTRL 201
# define EVP_F_UPDATE 173 # define EVP_F_UPDATE 173
/* /*

View file

@ -21,6 +21,7 @@ int ERR_load_KDF_strings(void);
*/ */
# define KDF_F_PKEY_HKDF_CTRL_STR 103 # define KDF_F_PKEY_HKDF_CTRL_STR 103
# define KDF_F_PKEY_HKDF_DERIVE 102 # define KDF_F_PKEY_HKDF_DERIVE 102
# define KDF_F_PKEY_HKDF_INIT 108
# define KDF_F_PKEY_SCRYPT_CTRL_STR 104 # define KDF_F_PKEY_SCRYPT_CTRL_STR 104
# define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105
# define KDF_F_PKEY_SCRYPT_DERIVE 109 # define KDF_F_PKEY_SCRYPT_DERIVE 109
@ -28,6 +29,8 @@ int ERR_load_KDF_strings(void);
# define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107
# define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100
# define KDF_F_PKEY_TLS1_PRF_DERIVE 101 # define KDF_F_PKEY_TLS1_PRF_DERIVE 101
# define KDF_F_PKEY_TLS1_PRF_INIT 110
# define KDF_F_TLS1_PRF_ALG 111
/* /*
* KDF reason codes. * KDF reason codes.

View file

@ -20,6 +20,7 @@ int ERR_load_OBJ_strings(void);
* OBJ function codes. * OBJ function codes.
*/ */
# define OBJ_F_OBJ_ADD_OBJECT 105 # define OBJ_F_OBJ_ADD_OBJECT 105
# define OBJ_F_OBJ_ADD_SIGID 107
# define OBJ_F_OBJ_CREATE 100 # define OBJ_F_OBJ_CREATE 100
# define OBJ_F_OBJ_DUP 101 # define OBJ_F_OBJ_DUP 101
# define OBJ_F_OBJ_NAME_NEW_INDEX 106 # define OBJ_F_OBJ_NAME_NEW_INDEX 106

View file

@ -29,6 +29,7 @@ int ERR_load_PEM_strings(void);
# define PEM_F_DO_B2I 132 # define PEM_F_DO_B2I 132
# define PEM_F_DO_B2I_BIO 133 # define PEM_F_DO_B2I_BIO 133
# define PEM_F_DO_BLOB_HEADER 134 # define PEM_F_DO_BLOB_HEADER 134
# define PEM_F_DO_I2B 146
# define PEM_F_DO_PK8PKEY 126 # define PEM_F_DO_PK8PKEY 126
# define PEM_F_DO_PK8PKEY_FP 125 # define PEM_F_DO_PK8PKEY_FP 125
# define PEM_F_DO_PVK_BODY 135 # define PEM_F_DO_PVK_BODY 135

View file

@ -40,6 +40,7 @@ int ERR_load_RSA_strings(void);
# define RSA_F_RSA_METH_NEW 162 # define RSA_F_RSA_METH_NEW 162
# define RSA_F_RSA_METH_SET1_NAME 163 # define RSA_F_RSA_METH_SET1_NAME 163
# define RSA_F_RSA_MGF1_TO_MD 157 # define RSA_F_RSA_MGF1_TO_MD 157
# define RSA_F_RSA_MULTIP_INFO_NEW 166
# define RSA_F_RSA_NEW_METHOD 106 # define RSA_F_RSA_NEW_METHOD 106
# define RSA_F_RSA_NULL 124 # define RSA_F_RSA_NULL 124
# define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 # define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132
@ -80,6 +81,7 @@ int ERR_load_RSA_strings(void);
# define RSA_F_RSA_VERIFY 119 # define RSA_F_RSA_VERIFY 119
# define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 # define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120
# define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 126 # define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 126
# define RSA_F_SETUP_TBUF 167
/* /*
* RSA reason codes. * RSA reason codes.

View file

@ -41,6 +41,7 @@ int ERR_load_SSL_strings(void);
# define SSL_F_DTLS1_BUFFER_RECORD 247 # define SSL_F_DTLS1_BUFFER_RECORD 247
# define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318 # define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318
# define SSL_F_DTLS1_HEARTBEAT 305 # define SSL_F_DTLS1_HEARTBEAT 305
# define SSL_F_DTLS1_HM_FRAGMENT_NEW 623
# define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288
# define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 # define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424
# define SSL_F_DTLS1_PROCESS_RECORD 257 # define SSL_F_DTLS1_PROCESS_RECORD 257
@ -83,6 +84,8 @@ int ERR_load_SSL_strings(void);
# define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418 # define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418
# define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604 # define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604
# define SSL_F_PARSE_CA_NAMES 541 # define SSL_F_PARSE_CA_NAMES 541
# define SSL_F_PITEM_NEW 624
# define SSL_F_PQUEUE_NEW 625
# define SSL_F_PROCESS_KEY_SHARE_EXT 439 # define SSL_F_PROCESS_KEY_SHARE_EXT 439
# define SSL_F_READ_STATE_MACHINE 352 # define SSL_F_READ_STATE_MACHINE 352
# define SSL_F_SET_CLIENT_CIPHERSUITE 540 # define SSL_F_SET_CLIENT_CIPHERSUITE 540
@ -134,10 +137,12 @@ int ERR_load_SSL_strings(void);
# define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606 # define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606
# define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 # define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279
# define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607 # define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607
# define SSL_F_SSL_CIPHER_DESCRIPTION 626
# define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425 # define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425
# define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 # define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230
# define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 # define SSL_F_SSL_CIPHER_STRENGTH_SORT 231
# define SSL_F_SSL_CLEAR 164 # define SSL_F_SSL_CLEAR 164
# define SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT 627
# define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 # define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165
# define SSL_F_SSL_CONF_CMD 334 # define SSL_F_SSL_CONF_CMD 334
# define SSL_F_SSL_CREATE_CIPHER_LIST 166 # define SSL_F_SSL_CREATE_CIPHER_LIST 166
@ -263,8 +268,13 @@ int ERR_load_SSL_strings(void);
# define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 # define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314
# define SSL_F_TLS1_GET_CURVELIST 338 # define SSL_F_TLS1_GET_CURVELIST 338
# define SSL_F_TLS1_PRF 284 # define SSL_F_TLS1_PRF 284
# define SSL_F_TLS1_SAVE_U16 628
# define SSL_F_TLS1_SETUP_KEY_BLOCK 211 # define SSL_F_TLS1_SETUP_KEY_BLOCK 211
# define SSL_F_TLS1_SET_GROUPS 629
# define SSL_F_TLS1_SET_RAW_SIGALGS 630
# define SSL_F_TLS1_SET_SERVER_SIGALGS 335 # define SSL_F_TLS1_SET_SERVER_SIGALGS 335
# define SSL_F_TLS1_SET_SHARED_SIGALGS 631
# define SSL_F_TLS1_SET_SIGALGS 632
# define SSL_F_TLS_CHOOSE_SIGALG 513 # define SSL_F_TLS_CHOOSE_SIGALG 513
# define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354 # define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354
# define SSL_F_TLS_COLLECT_EXTENSIONS 435 # define SSL_F_TLS_COLLECT_EXTENSIONS 435
@ -428,6 +438,8 @@ int ERR_load_SSL_strings(void);
# define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450 # define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450
# define SSL_F_TLS_SETUP_HANDSHAKE 508 # define SSL_F_TLS_SETUP_HANDSHAKE 508
# define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220 # define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220
# define SSL_F_WPACKET_INTERN_INIT_LEN 633
# define SSL_F_WPACKET_START_SUB_PACKET_LEN__ 634
# define SSL_F_WRITE_STATE_MACHINE 586 # define SSL_F_WRITE_STATE_MACHINE 586
/* /*

View file

@ -25,6 +25,7 @@ int ERR_load_UI_strings(void);
# define UI_F_GENERAL_ALLOCATE_PROMPT 109 # define UI_F_GENERAL_ALLOCATE_PROMPT 109
# define UI_F_NOECHO_CONSOLE 117 # define UI_F_NOECHO_CONSOLE 117
# define UI_F_OPEN_CONSOLE 114 # define UI_F_OPEN_CONSOLE 114
# define UI_F_UI_CONSTRUCT_PROMPT 121
# define UI_F_UI_CREATE_METHOD 112 # define UI_F_UI_CREATE_METHOD 112
# define UI_F_UI_CTRL 111 # define UI_F_UI_CTRL 111
# define UI_F_UI_DUP_ERROR_STRING 101 # define UI_F_UI_DUP_ERROR_STRING 101

View file

@ -9,6 +9,7 @@
#include "internal/cryptlib.h" #include "internal/cryptlib.h"
#include "packet_locl.h" #include "packet_locl.h"
#include <openssl/sslerr.h>
#define DEFAULT_BUF_SIZE 256 #define DEFAULT_BUF_SIZE 256
@ -93,9 +94,10 @@ static int wpacket_intern_init_len(WPACKET *pkt, size_t lenbytes)
pkt->curr = 0; pkt->curr = 0;
pkt->written = 0; pkt->written = 0;
pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs)); if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL) {
if (pkt->subs == NULL) SSLerr(SSL_F_WPACKET_INTERN_INIT_LEN, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
if (lenbytes == 0) if (lenbytes == 0)
return 1; return 1;
@ -276,9 +278,10 @@ int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes)
if (!ossl_assert(pkt->subs != NULL)) if (!ossl_assert(pkt->subs != NULL))
return 0; return 0;
sub = OPENSSL_zalloc(sizeof(*sub)); if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL) {
if (sub == NULL) SSLerr(SSL_F_WPACKET_START_SUB_PACKET_LEN__, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
sub->parent = pkt->subs; sub->parent = pkt->subs;
pkt->subs = sub; pkt->subs = sub;

View file

@ -18,14 +18,15 @@ struct pqueue_st {
pitem *pitem_new(unsigned char *prio64be, void *data) pitem *pitem_new(unsigned char *prio64be, void *data)
{ {
pitem *item = OPENSSL_malloc(sizeof(*item)); pitem *item = OPENSSL_malloc(sizeof(*item));
if (item == NULL)
if (item == NULL) {
SSLerr(SSL_F_PITEM_NEW, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
memcpy(item->priority, prio64be, sizeof(item->priority)); memcpy(item->priority, prio64be, sizeof(item->priority));
item->data = data; item->data = data;
item->next = NULL; item->next = NULL;
return item; return item;
} }
@ -38,6 +39,9 @@ pqueue *pqueue_new()
{ {
pqueue *pq = OPENSSL_zalloc(sizeof(*pq)); pqueue *pq = OPENSSL_zalloc(sizeof(*pq));
if (pq == NULL)
SSLerr(SSL_F_PQUEUE_NEW, ERR_R_MALLOC_FAILURE);
return pq; return pq;
} }

View file

@ -1523,9 +1523,10 @@ char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
if (buf == NULL) { if (buf == NULL) {
len = 128; len = 128;
buf = OPENSSL_malloc(len); if ((buf = OPENSSL_malloc(len)) == NULL) {
if (buf == NULL) SSLerr(SSL_F_SSL_CIPHER_DESCRIPTION, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
} else if (len < 128) { } else if (len < 128) {
return NULL; return NULL;
} }

View file

@ -43,6 +43,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
{ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_CHECK_TIMEOUT_NUM, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_CHECK_TIMEOUT_NUM, 0),
"dtls1_check_timeout_num"}, "dtls1_check_timeout_num"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_HEARTBEAT, 0), ""}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_HEARTBEAT, 0), ""},
{ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_HM_FRAGMENT_NEW, 0),
"dtls1_hm_fragment_new"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PREPROCESS_FRAGMENT, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PREPROCESS_FRAGMENT, 0),
"dtls1_preprocess_fragment"}, "dtls1_preprocess_fragment"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS, 0),
@ -109,6 +111,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
{ERR_PACK(ERR_LIB_SSL, SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION, 0),
"ossl_statem_server_write_transition"}, "ossl_statem_server_write_transition"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_PARSE_CA_NAMES, 0), "parse_ca_names"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_PARSE_CA_NAMES, 0), "parse_ca_names"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_PITEM_NEW, 0), "pitem_new"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_PQUEUE_NEW, 0), "pqueue_new"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_PROCESS_KEY_SHARE_EXT, 0), ""}, {ERR_PACK(ERR_LIB_SSL, SSL_F_PROCESS_KEY_SHARE_EXT, 0), ""},
{ERR_PACK(ERR_LIB_SSL, SSL_F_READ_STATE_MACHINE, 0), "read_state_machine"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_READ_STATE_MACHINE, 0), "read_state_machine"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SET_CLIENT_CIPHERSUITE, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SET_CLIENT_CIPHERSUITE, 0),
@ -188,6 +192,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
"ssl_check_srvr_ecc_cert_and_alg"}, "ssl_check_srvr_ecc_cert_and_alg"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CHOOSE_CLIENT_VERSION, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CHOOSE_CLIENT_VERSION, 0),
"ssl_choose_client_version"}, "ssl_choose_client_version"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_DESCRIPTION, 0),
"SSL_CIPHER_description"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_LIST_TO_BYTES, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_LIST_TO_BYTES, 0),
"ssl_cipher_list_to_bytes"}, "ssl_cipher_list_to_bytes"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_PROCESS_RULESTR, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_PROCESS_RULESTR, 0),
@ -195,6 +201,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_STRENGTH_SORT, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CIPHER_STRENGTH_SORT, 0),
"ssl_cipher_strength_sort"}, "ssl_cipher_strength_sort"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CLEAR, 0), "SSL_clear"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CLEAR, 0), "SSL_clear"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT, 0),
"SSL_client_hello_get1_extensions_present"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD, 0),
"SSL_COMP_add_compression_method"}, "SSL_COMP_add_compression_method"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CONF_CMD, 0), "SSL_CONF_cmd"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_SSL_CONF_CMD, 0), "SSL_CONF_cmd"},
@ -388,10 +396,17 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
"tls1_export_keying_material"}, "tls1_export_keying_material"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_GET_CURVELIST, 0), "tls1_get_curvelist"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_GET_CURVELIST, 0), "tls1_get_curvelist"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_PRF, 0), "tls1_PRF"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_PRF, 0), "tls1_PRF"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SAVE_U16, 0), "tls1_save_u16"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SETUP_KEY_BLOCK, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SETUP_KEY_BLOCK, 0),
"tls1_setup_key_block"}, "tls1_setup_key_block"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_GROUPS, 0), "tls1_set_groups"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_RAW_SIGALGS, 0),
"tls1_set_raw_sigalgs"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SERVER_SIGALGS, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SERVER_SIGALGS, 0),
"tls1_set_server_sigalgs"}, "tls1_set_server_sigalgs"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SHARED_SIGALGS, 0),
"tls1_set_shared_sigalgs"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS1_SET_SIGALGS, 0), "tls1_set_sigalgs"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CHOOSE_SIGALG, 0), "tls_choose_sigalg"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CHOOSE_SIGALG, 0), "tls_choose_sigalg"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK, 0),
"tls_client_key_exchange_post_work"}, "tls_client_key_exchange_post_work"},
@ -693,6 +708,10 @@ static const ERR_STRING_DATA SSL_str_functs[] = {
"tls_setup_handshake"}, "tls_setup_handshake"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_USE_CERTIFICATE_CHAIN_FILE, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_USE_CERTIFICATE_CHAIN_FILE, 0),
"use_certificate_chain_file"}, "use_certificate_chain_file"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_WPACKET_INTERN_INIT_LEN, 0),
"wpacket_intern_init_len"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_WPACKET_START_SUB_PACKET_LEN__, 0),
"WPACKET_start_sub_packet_len__"},
{ERR_PACK(ERR_LIB_SSL, SSL_F_WRITE_STATE_MACHINE, 0), {ERR_PACK(ERR_LIB_SSL, SSL_F_WRITE_STATE_MACHINE, 0),
"write_state_machine"}, "write_state_machine"},
{0, NULL} {0, NULL}

View file

@ -5048,9 +5048,11 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
if (ext->present) if (ext->present)
num++; num++;
} }
present = OPENSSL_malloc(sizeof(*present) * num); if ((present = OPENSSL_malloc(sizeof(*present) * num)) == NULL) {
if (present == NULL) SSLerr(SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT,
ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
for (i = 0; i < s->clienthello->pre_proc_exts_len; i++) { for (i = 0; i < s->clienthello->pre_proc_exts_len; i++) {
ext = s->clienthello->pre_proc_exts + i; ext = s->clienthello->pre_proc_exts + i;
if (ext->present) { if (ext->present) {

View file

@ -59,13 +59,14 @@ static hm_fragment *dtls1_hm_fragment_new(size_t frag_len, int reassembly)
unsigned char *buf = NULL; unsigned char *buf = NULL;
unsigned char *bitmask = NULL; unsigned char *bitmask = NULL;
frag = OPENSSL_malloc(sizeof(*frag)); if ((frag = OPENSSL_malloc(sizeof(*frag))) == NULL) {
if (frag == NULL) SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE);
return NULL; return NULL;
}
if (frag_len) { if (frag_len) {
buf = OPENSSL_malloc(frag_len); if ((buf = OPENSSL_malloc(frag_len)) == NULL) {
if (buf == NULL) { SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE);
OPENSSL_free(frag); OPENSSL_free(frag);
return NULL; return NULL;
} }
@ -78,6 +79,7 @@ static hm_fragment *dtls1_hm_fragment_new(size_t frag_len, int reassembly)
if (reassembly) { if (reassembly) {
bitmask = OPENSSL_zalloc(RSMBLY_BITMASK_SIZE(frag_len)); bitmask = OPENSSL_zalloc(RSMBLY_BITMASK_SIZE(frag_len));
if (bitmask == NULL) { if (bitmask == NULL) {
SSLerr(SSL_F_DTLS1_HM_FRAGMENT_NEW, ERR_R_MALLOC_FAILURE);
OPENSSL_free(buf); OPENSSL_free(buf);
OPENSSL_free(frag); OPENSSL_free(frag);
return NULL; return NULL;

View file

@ -342,9 +342,11 @@ int tls1_set_groups(uint16_t **pext, size_t *pextlen,
* ids < 32 * ids < 32
*/ */
unsigned long dup_list = 0; unsigned long dup_list = 0;
glist = OPENSSL_malloc(ngroups * sizeof(*glist));
if (glist == NULL) if ((glist = OPENSSL_malloc(ngroups * sizeof(*glist))) == NULL) {
SSLerr(SSL_F_TLS1_SET_GROUPS, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
for (i = 0; i < ngroups; i++) { for (i = 0; i < ngroups; i++) {
unsigned long idmask; unsigned long idmask;
uint16_t id; uint16_t id;
@ -1600,9 +1602,10 @@ static int tls1_set_shared_sigalgs(SSL *s)
} }
nmatch = tls12_shared_sigalgs(s, NULL, pref, preflen, allow, allowlen); nmatch = tls12_shared_sigalgs(s, NULL, pref, preflen, allow, allowlen);
if (nmatch) { if (nmatch) {
salgs = OPENSSL_malloc(nmatch * sizeof(*salgs)); if ((salgs = OPENSSL_malloc(nmatch * sizeof(*salgs))) == NULL) {
if (salgs == NULL) SSLerr(SSL_F_TLS1_SET_SHARED_SIGALGS, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
nmatch = tls12_shared_sigalgs(s, salgs, pref, preflen, allow, allowlen); nmatch = tls12_shared_sigalgs(s, salgs, pref, preflen, allow, allowlen);
} else { } else {
salgs = NULL; salgs = NULL;
@ -1626,9 +1629,10 @@ int tls1_save_u16(PACKET *pkt, uint16_t **pdest, size_t *pdestlen)
size >>= 1; size >>= 1;
buf = OPENSSL_malloc(size * sizeof(*buf)); if ((buf = OPENSSL_malloc(size * sizeof(*buf))) == NULL) {
if (buf == NULL) SSLerr(SSL_F_TLS1_SAVE_U16, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
for (i = 0; i < size && PACKET_get_net_2(pkt, &stmp); i++) for (i = 0; i < size && PACKET_get_net_2(pkt, &stmp); i++)
buf[i] = stmp; buf[i] = stmp;
@ -1856,9 +1860,10 @@ int tls1_set_raw_sigalgs(CERT *c, const uint16_t *psigs, size_t salglen,
{ {
uint16_t *sigalgs; uint16_t *sigalgs;
sigalgs = OPENSSL_malloc(salglen * sizeof(*sigalgs)); if ((sigalgs = OPENSSL_malloc(salglen * sizeof(*sigalgs))) == NULL) {
if (sigalgs == NULL) SSLerr(SSL_F_TLS1_SET_RAW_SIGALGS, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
memcpy(sigalgs, psigs, salglen * sizeof(*sigalgs)); memcpy(sigalgs, psigs, salglen * sizeof(*sigalgs));
if (client) { if (client) {
@ -1881,9 +1886,10 @@ int tls1_set_sigalgs(CERT *c, const int *psig_nids, size_t salglen, int client)
if (salglen & 1) if (salglen & 1)
return 0; return 0;
sigalgs = OPENSSL_malloc((salglen / 2) * sizeof(*sigalgs)); if ((sigalgs = OPENSSL_malloc((salglen / 2) * sizeof(*sigalgs))) == NULL) {
if (sigalgs == NULL) SSLerr(SSL_F_TLS1_SET_SIGALGS, ERR_R_MALLOC_FAILURE);
return 0; return 0;
}
for (i = 0, sptr = sigalgs; i < salglen; i += 2) { for (i = 0, sptr = sigalgs; i < salglen; i += 2) {
size_t j; size_t j;
const SIGALG_LOOKUP *curr; const SIGALG_LOOKUP *curr;