make sure error queue is totally emptied
PR: 359
This commit is contained in:
@@ -197,7 +197,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
if (e != ASN1_R_TOO_LONG)
|
if (e != ASN1_R_TOO_LONG)
|
||||||
goto err;
|
goto err;
|
||||||
else
|
else
|
||||||
ERR_get_error(); /* clear error */
|
ERR_clear_error(); /* clear error */
|
||||||
}
|
}
|
||||||
i=c.p-p;/* header length */
|
i=c.p-p;/* header length */
|
||||||
off+=i; /* end of data */
|
off+=i; /* end of data */
|
||||||
|
@@ -184,7 +184,7 @@ long CONF_get_number(LHASH *conf,const char *group,const char *name)
|
|||||||
if (status == 0)
|
if (status == 0)
|
||||||
{
|
{
|
||||||
/* This function does not believe in errors... */
|
/* This function does not believe in errors... */
|
||||||
ERR_get_error();
|
ERR_clear_error();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@@ -254,7 +254,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf, char *name, char *value,
|
|||||||
path = NCONF_get_string(cnf, value, "path");
|
path = NCONF_get_string(cnf, value, "path");
|
||||||
if (!path)
|
if (!path)
|
||||||
{
|
{
|
||||||
ERR_get_error();
|
ERR_clear_error();
|
||||||
path = name;
|
path = name;
|
||||||
}
|
}
|
||||||
dso = DSO_load(NULL, path, NULL, 0);
|
dso = DSO_load(NULL, path, NULL, 0);
|
||||||
|
@@ -414,7 +414,7 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
|
|||||||
i=a2d_ASN1_OBJECT(NULL,0,s,-1);
|
i=a2d_ASN1_OBJECT(NULL,0,s,-1);
|
||||||
if (i <= 0) {
|
if (i <= 0) {
|
||||||
/* Clear the error */
|
/* Clear the error */
|
||||||
ERR_get_error();
|
ERR_clear_error();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* Work out total size */
|
/* Work out total size */
|
||||||
|
@@ -204,7 +204,7 @@ int bio_ber_get_header(BIO *bio, BIO_BER_CTX *ctx)
|
|||||||
if ((ctx->buf_len < BER_BUF_SIZE) &&
|
if ((ctx->buf_len < BER_BUF_SIZE) &&
|
||||||
(ERR_GET_REASON(ERR_peek_error()) == ASN1_R_TOO_LONG))
|
(ERR_GET_REASON(ERR_peek_error()) == ASN1_R_TOO_LONG))
|
||||||
{
|
{
|
||||||
ERR_get_error(); /* clear the error */
|
ERR_clear_error(); /* clear the error */
|
||||||
BIO_set_retry_read(b);
|
BIO_set_retry_read(b);
|
||||||
}
|
}
|
||||||
return(-1);
|
return(-1);
|
||||||
|
@@ -520,7 +520,7 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
|
|||||||
err = ERR_peek_error();
|
err = ERR_peek_error();
|
||||||
if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
|
if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
|
||||||
ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
|
ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
|
||||||
(void)ERR_get_error();
|
ERR_clear_error();
|
||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user