mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-13 19:00:25 -04:00
BUILD/CLEANUP: ssl: Check BIO_reset() return code
The BIO_reset function can fails, and the error is not processed. This patch just take in account the return code of the BIO_reset() function.
This commit is contained in:
parent
8b068c2993
commit
d44ea3f77c
1 changed files with 5 additions and 1 deletions
|
|
@ -1830,7 +1830,11 @@ static int ssl_sock_load_crt_file_into_ckch(const char *path, struct cert_key_an
|
|||
}
|
||||
|
||||
/* Seek back to beginning of file */
|
||||
BIO_reset(in);
|
||||
if (BIO_reset(in) == -1) {
|
||||
memprintf(err, "%san error occurred while reading the file '%s'.\n",
|
||||
err && *err ? *err : "", path);
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* Read Certificate */
|
||||
ckch->cert = PEM_read_bio_X509_AUX(in, NULL, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue