projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b068c2
)
BUILD/CLEANUP: ssl: Check BIO_reset() return code
author
Thierry FOURNIER / OZON.IO
<thierry.fournier@ozon.io>
Thu, 13 Oct 2016 22:49:21 +0000
(
00:49
+0200)
committer
Willy Tarreau
<w@1wt.eu>
Mon, 24 Oct 2016 17:13:12 +0000
(19:13 +0200)
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.
src/ssl_sock.c
patch
|
blob
|
history
diff --git
a/src/ssl_sock.c
b/src/ssl_sock.c
index
f00b358
..
4b1e885
100644
(file)
--- a/
src/ssl_sock.c
+++ b/
src/ssl_sock.c
@@
-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);