Skip to content

Commit

Permalink
Fix various incorrect error function codes.
Browse files Browse the repository at this point in the history
("perl util/ck_errf.pl */*.c */*/*.c" still reports many more.)
  • Loading branch information
45264 committed Apr 26, 2005
1 parent c741b83 commit aa4ce73
Show file tree
Hide file tree
Showing 49 changed files with 111 additions and 85 deletions.
2 changes: 1 addition & 1 deletion crypto/asn1/a_bitstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
*pp=p;
return(ret);
err:
ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,i);
ASN1err(ASN1_F_C2I_ASN1_BIT_STRING,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
M_ASN1_BIT_STRING_free(ret);
return(NULL);
Expand Down
1 change: 1 addition & 0 deletions crypto/asn1/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_F_BITSTR_CB 180
#define ASN1_F_BN_TO_ASN1_ENUMERATED 138
#define ASN1_F_BN_TO_ASN1_INTEGER 139
#define ASN1_F_C2I_ASN1_BIT_STRING 189
#define ASN1_F_COLLECT_DATA 140
#define ASN1_F_D2I_ASN1_BIT_STRING 141
#define ASN1_F_D2I_ASN1_BOOLEAN 142
Expand Down
1 change: 1 addition & 0 deletions crypto/asn1/asn1_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{ERR_FUNC(ASN1_F_BITSTR_CB), "BITSTR_CB"},
{ERR_FUNC(ASN1_F_BN_TO_ASN1_ENUMERATED), "BN_to_ASN1_ENUMERATED"},
{ERR_FUNC(ASN1_F_BN_TO_ASN1_INTEGER), "BN_to_ASN1_INTEGER"},
{ERR_FUNC(ASN1_F_C2I_ASN1_BIT_STRING), "c2i_ASN1_BIT_STRING"},
{ERR_FUNC(ASN1_F_COLLECT_DATA), "COLLECT_DATA"},
{ERR_FUNC(ASN1_F_D2I_ASN1_BIT_STRING), "D2I_ASN1_BIT_STRING"},
{ERR_FUNC(ASN1_F_D2I_ASN1_BOOLEAN), "d2i_ASN1_BOOLEAN"},
Expand Down
1 change: 1 addition & 0 deletions crypto/bio/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ void ERR_load_BIO_strings(void);
#define BIO_F_ACPT_STATE 100
#define BIO_F_BIO_ACCEPT 101
#define BIO_F_BIO_BER_GET_HEADER 102
#define BIO_F_BIO_CALLBACK_CTRL 131
#define BIO_F_BIO_CTRL 103
#define BIO_F_BIO_GETHOSTBYNAME 120
#define BIO_F_BIO_GETS 104
Expand Down
1 change: 1 addition & 0 deletions crypto/bio/bio_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ static ERR_STRING_DATA BIO_str_functs[]=
{ERR_FUNC(BIO_F_ACPT_STATE), "ACPT_STATE"},
{ERR_FUNC(BIO_F_BIO_ACCEPT), "BIO_accept"},
{ERR_FUNC(BIO_F_BIO_BER_GET_HEADER), "BIO_BER_GET_HEADER"},
{ERR_FUNC(BIO_F_BIO_CALLBACK_CTRL), "BIO_callback_ctrl"},
{ERR_FUNC(BIO_F_BIO_CTRL), "BIO_ctrl"},
{ERR_FUNC(BIO_F_BIO_GETHOSTBYNAME), "BIO_gethostbyname"},
{ERR_FUNC(BIO_F_BIO_GETS), "BIO_gets"},
Expand Down
2 changes: 1 addition & 1 deletion crypto/bio/bio_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ long BIO_callback_ctrl(BIO *b, int cmd, void (*fp)(struct bio_st *, int, const c

if ((b->method == NULL) || (b->method->callback_ctrl == NULL))
{
BIOerr(BIO_F_BIO_CTRL,BIO_R_UNSUPPORTED_METHOD);
BIOerr(BIO_F_BIO_CALLBACK_CTRL,BIO_R_UNSUPPORTED_METHOD);
return(-2);
}

Expand Down
5 changes: 4 additions & 1 deletion crypto/bn/bn.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ void ERR_load_BN_strings(void);
/* Error codes for the BN functions. */

/* Function codes. */
#define BN_F_BNRAND 114
#define BN_F_BN_BLINDING_CONVERT 100
#define BN_F_BN_BLINDING_INVERT 101
#define BN_F_BN_BLINDING_NEW 102
Expand All @@ -733,7 +734,9 @@ void ERR_load_BN_strings(void);
#define BN_F_BN_BN2HEX 105
#define BN_F_BN_CTX_GET 116
#define BN_F_BN_CTX_NEW 106
#define BN_F_BN_CTX_START 130
#define BN_F_BN_DIV 107
#define BN_F_BN_DIV_RECP 131
#define BN_F_BN_EXPAND2 108
#define BN_F_BN_EXPAND_INTERNAL 120
#define BN_F_BN_GF2M_MOD 126
Expand All @@ -743,6 +746,7 @@ void ERR_load_BN_strings(void);
#define BN_F_BN_GF2M_MOD_SOLVE_QUAD 128
#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 129
#define BN_F_BN_GF2M_MOD_SQR 125
#define BN_F_BN_GF2M_MOD_SQRT 132
#define BN_F_BN_MOD_EXP2_MONT 118
#define BN_F_BN_MOD_EXP_MONT 109
#define BN_F_BN_MOD_EXP_MONT_WORD 117
Expand All @@ -752,7 +756,6 @@ void ERR_load_BN_strings(void);
#define BN_F_BN_MOD_SQRT 121
#define BN_F_BN_MPI2BN 112
#define BN_F_BN_NEW 113
#define BN_F_BN_RAND 114
#define BN_F_BN_RAND_RANGE 122
#define BN_F_BN_USUB 115

Expand Down
3 changes: 1 addition & 2 deletions crypto/bn/bn_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ void BN_CTX_start(BN_CTX *ctx)
/* (Try to) get a new frame pointer */
else if(!BN_STACK_push(&ctx->stack, ctx->used))
{
/* I know this isn't BN_CTX_get, but ... */
BNerr(BN_F_BN_CTX_GET,BN_R_TOO_MANY_TEMPORARY_VARIABLES);
BNerr(BN_F_BN_CTX_START,BN_R_TOO_MANY_TEMPORARY_VARIABLES);
ctx->err_stack++;
}
CTXDBG_EXIT(ctx);
Expand Down
5 changes: 4 additions & 1 deletion crypto/bn/bn_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

static ERR_STRING_DATA BN_str_functs[]=
{
{ERR_FUNC(BN_F_BNRAND), "BNRAND"},
{ERR_FUNC(BN_F_BN_BLINDING_CONVERT), "BN_BLINDING_convert"},
{ERR_FUNC(BN_F_BN_BLINDING_INVERT), "BN_BLINDING_invert"},
{ERR_FUNC(BN_F_BN_BLINDING_NEW), "BN_BLINDING_new"},
Expand All @@ -78,7 +79,9 @@ static ERR_STRING_DATA BN_str_functs[]=
{ERR_FUNC(BN_F_BN_BN2HEX), "BN_bn2hex"},
{ERR_FUNC(BN_F_BN_CTX_GET), "BN_CTX_get"},
{ERR_FUNC(BN_F_BN_CTX_NEW), "BN_CTX_new"},
{ERR_FUNC(BN_F_BN_CTX_START), "BN_CTX_start"},
{ERR_FUNC(BN_F_BN_DIV), "BN_div"},
{ERR_FUNC(BN_F_BN_DIV_RECP), "BN_div_recp"},
{ERR_FUNC(BN_F_BN_EXPAND2), "bn_expand2"},
{ERR_FUNC(BN_F_BN_EXPAND_INTERNAL), "BN_EXPAND_INTERNAL"},
{ERR_FUNC(BN_F_BN_GF2M_MOD), "BN_GF2m_mod"},
Expand All @@ -88,6 +91,7 @@ static ERR_STRING_DATA BN_str_functs[]=
{ERR_FUNC(BN_F_BN_GF2M_MOD_SOLVE_QUAD), "BN_GF2m_mod_solve_quad"},
{ERR_FUNC(BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR), "BN_GF2m_mod_solve_quad_arr"},
{ERR_FUNC(BN_F_BN_GF2M_MOD_SQR), "BN_GF2m_mod_sqr"},
{ERR_FUNC(BN_F_BN_GF2M_MOD_SQRT), "BN_GF2m_mod_sqrt"},
{ERR_FUNC(BN_F_BN_MOD_EXP2_MONT), "BN_mod_exp2_mont"},
{ERR_FUNC(BN_F_BN_MOD_EXP_MONT), "BN_mod_exp_mont"},
{ERR_FUNC(BN_F_BN_MOD_EXP_MONT_WORD), "BN_mod_exp_mont_word"},
Expand All @@ -97,7 +101,6 @@ static ERR_STRING_DATA BN_str_functs[]=
{ERR_FUNC(BN_F_BN_MOD_SQRT), "BN_mod_sqrt"},
{ERR_FUNC(BN_F_BN_MPI2BN), "BN_mpi2bn"},
{ERR_FUNC(BN_F_BN_NEW), "BN_new"},
{ERR_FUNC(BN_F_BN_RAND), "BN_rand"},
{ERR_FUNC(BN_F_BN_RAND_RANGE), "BN_rand_range"},
{ERR_FUNC(BN_F_BN_USUB), "BN_usub"},
{0,NULL}
Expand Down
2 changes: 1 addition & 1 deletion crypto/bn/bn_gf2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
ret = BN_GF2m_poly2arr(p, arr, max);
if (!ret || ret > max)
{
BNerr(BN_F_BN_GF2M_MOD_EXP,BN_R_INVALID_LENGTH);
BNerr(BN_F_BN_GF2M_MOD_SQRT,BN_R_INVALID_LENGTH);
goto err;
}
ret = BN_GF2m_mod_sqrt_arr(r, a, arr, ctx);
Expand Down
2 changes: 1 addition & 1 deletion crypto/bn/bn_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
buf=(unsigned char *)OPENSSL_malloc(bytes);
if (buf == NULL)
{
BNerr(BN_F_BN_RAND,ERR_R_MALLOC_FAILURE);
BNerr(BN_F_BNRAND,ERR_R_MALLOC_FAILURE);
goto err;
}

Expand Down
2 changes: 1 addition & 1 deletion crypto/bn/bn_recp.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
{
if (j++ > 2)
{
BNerr(BN_F_BN_MOD_MUL_RECIPROCAL,BN_R_BAD_RECIPROCAL);
BNerr(BN_F_BN_DIV_RECP,BN_R_BAD_RECIPROCAL);
goto err;
}
if (!BN_usub(r,r,&(recp->N))) goto err;
Expand Down
1 change: 1 addition & 0 deletions crypto/buffer/buf_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ static ERR_STRING_DATA BUF_str_functs[]=
{
{ERR_FUNC(BUF_F_BUF_MEMDUP), "BUF_memdup"},
{ERR_FUNC(BUF_F_BUF_MEM_GROW), "BUF_MEM_grow"},
{ERR_FUNC(BUF_F_BUF_MEM_GROW_CLEAN), "BUF_MEM_grow_clean"},
{ERR_FUNC(BUF_F_BUF_MEM_NEW), "BUF_MEM_new"},
{ERR_FUNC(BUF_F_BUF_STRDUP), "BUF_strdup"},
{ERR_FUNC(BUF_F_BUF_STRNDUP), "BUF_strndup"},
Expand Down
2 changes: 1 addition & 1 deletion crypto/buffer/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int len)
ret=OPENSSL_realloc_clean(str->data,str->max,n);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE);
len=0;
}
else
Expand Down
1 change: 1 addition & 0 deletions crypto/buffer/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void ERR_load_BUF_strings(void);
/* Function codes. */
#define BUF_F_BUF_MEMDUP 103
#define BUF_F_BUF_MEM_GROW 100
#define BUF_F_BUF_MEM_GROW_CLEAN 105
#define BUF_F_BUF_MEM_NEW 101
#define BUF_F_BUF_STRDUP 102
#define BUF_F_BUF_STRNDUP 104
Expand Down
3 changes: 3 additions & 0 deletions crypto/conf/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ void ERR_load_CONF_strings(void);
#define CONF_F_CONF_LOAD_BIO 102
#define CONF_F_CONF_LOAD_FP 103
#define CONF_F_CONF_MODULES_LOAD 116
#define CONF_F_CONF_MODULE_RUN 119
#define CONF_F_DEF_LOAD 120
#define CONF_F_DEF_LOAD_BIO 121
#define CONF_F_MODULE_INIT 115
#define CONF_F_MODULE_LOAD_DSO 117
#define CONF_F_MODULE_RUN 118
Expand Down
30 changes: 15 additions & 15 deletions crypto/conf/conf_def.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ static int def_load(CONF *conf, const char *name, long *line)
if (in == NULL)
{
if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
CONFerr(CONF_F_CONF_LOAD,CONF_R_NO_SUCH_FILE);
CONFerr(CONF_F_DEF_LOAD,CONF_R_NO_SUCH_FILE);
else
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
CONFerr(CONF_F_DEF_LOAD,ERR_R_SYS_LIB);
return 0;
}

Expand Down Expand Up @@ -225,28 +225,28 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)

if ((buff=BUF_MEM_new()) == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
goto err;
}

section=(char *)OPENSSL_malloc(10);
if (section == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}
BUF_strlcpy(section,"default",10);

if (_CONF_new_data(conf) == 0)
{
CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}

sv=_CONF_new_section(conf,section);
if (sv == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
Expand All @@ -258,7 +258,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
{
if (!BUF_MEM_grow(buff,bufnum+CONFBUFSIZE))
{
CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
goto err;
}
p= &(buff->data[bufnum]);
Expand Down Expand Up @@ -329,7 +329,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
ss=p;
goto again;
}
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_MISSING_CLOSE_SQUARE_BRACKET);
goto err;
}
Expand All @@ -339,7 +339,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
sv=_CONF_new_section(conf,section);
if (sv == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
Expand All @@ -362,7 +362,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
p=eat_ws(conf, end);
if (*p != '=')
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_MISSING_EQUAL_SIGN);
goto err;
}
Expand All @@ -379,7 +379,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)

if (!(v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE))))
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
Expand All @@ -388,7 +388,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
v->value=NULL;
if (v->name == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
Expand All @@ -402,7 +402,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
tv=_CONF_new_section(conf,psection);
if (tv == NULL)
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
Expand All @@ -416,15 +416,15 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
#if 1
if (_CONF_add_string(conf, tv, v) == 0)
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
#else
v->section=tv->section;
if (!sk_CONF_VALUE_push(ts,v))
{
CONFerr(CONF_F_CONF_LOAD_BIO,
CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
Expand Down
3 changes: 3 additions & 0 deletions crypto/conf/conf_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ static ERR_STRING_DATA CONF_str_functs[]=
{ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"},
{ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"},
{ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"},
{ERR_FUNC(CONF_F_CONF_MODULE_RUN), "CONF_MODULE_RUN"},
{ERR_FUNC(CONF_F_DEF_LOAD), "DEF_LOAD"},
{ERR_FUNC(CONF_F_DEF_LOAD_BIO), "DEF_LOAD_BIO"},
{ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"},
{ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "MODULE_LOAD_DSO"},
{ERR_FUNC(CONF_F_MODULE_RUN), "MODULE_RUN"},
Expand Down
2 changes: 1 addition & 1 deletion crypto/conf/conf_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
if (!(flags & CONF_MFLAGS_SILENT))
{
char rcode[DECIMAL_SIZE(ret)+1];
CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
CONFerr(CONF_F_CONF_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
}
Expand Down
7 changes: 4 additions & 3 deletions crypto/dh/dh.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,13 @@ void ERR_load_DH_strings(void);
/* Error codes for the DH functions. */

/* Function codes. */
#define DH_F_COMPUTE_KEY 102
#define DH_F_DHPARAMS_PRINT 100
#define DH_F_DHPARAMS_PRINT_FP 101
#define DH_F_DH_COMPUTE_KEY 102
#define DH_F_DH_GENERATE_KEY 103
#define DH_F_DH_GENERATE_PARAMETERS 104
#define DH_F_DH_BUILTIN_GENPARAMS 106
#define DH_F_DH_NEW_METHOD 105
#define DH_F_GENERATE_KEY 103
#define DH_F_GENERATE_PARAMETERS 104

/* Reason codes. */
#define DH_R_BAD_GENERATOR 101
Expand Down
7 changes: 4 additions & 3 deletions crypto/dh/dh_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@

static ERR_STRING_DATA DH_str_functs[]=
{
{ERR_FUNC(DH_F_COMPUTE_KEY), "COMPUTE_KEY"},
{ERR_FUNC(DH_F_DHPARAMS_PRINT), "DHparams_print"},
{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
{ERR_FUNC(DH_F_DH_COMPUTE_KEY), "DH_compute_key"},
{ERR_FUNC(DH_F_DH_GENERATE_KEY), "DH_generate_key"},
{ERR_FUNC(DH_F_DH_GENERATE_PARAMETERS), "DH_generate_parameters"},
{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
{ERR_FUNC(DH_F_DH_NEW_METHOD), "DH_new_method"},
{ERR_FUNC(DH_F_GENERATE_KEY), "GENERATE_KEY"},
{ERR_FUNC(DH_F_GENERATE_PARAMETERS), "GENERATE_PARAMETERS"},
{0,NULL}
};

Expand Down
4 changes: 2 additions & 2 deletions crypto/dh/dh_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB

if (generator <= 1)
{
DHerr(DH_F_DH_GENERATE_PARAMETERS, DH_R_BAD_GENERATOR);
DHerr(DH_F_DH_BUILTIN_GENPARAMS, DH_R_BAD_GENERATOR);
goto err;
}
if (generator == DH_GENERATOR_2)
Expand Down Expand Up @@ -162,7 +162,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator, BN_GENCB
err:
if (ok == -1)
{
DHerr(DH_F_DH_GENERATE_PARAMETERS,ERR_R_BN_LIB);
DHerr(DH_F_DH_BUILTIN_GENPARAMS,ERR_R_BN_LIB);
ok=0;
}

Expand Down
Loading

0 comments on commit aa4ce73

Please sign in to comment.