aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2016-12-07 12:18:21 -0800
committerDaniel Stenberg <daniel@haxx.se>2016-12-07 23:53:03 +0100
commit71a55534fa61b80373271a13de4473d4660364e2 (patch)
tree85585cb736af0006100bb8069c18057215b507df /lib/vtls
parentdacfecb7b676b6ace6d707d65fefdadd28301bd4 (diff)
openssl: don't use OpenSSL's ERR_PACK.
ERR_PACK is an internal detail of OpenSSL. Also, when using it, a function name must be specified which is overly specific: the test will break whenever OpenSSL internally change things so that a different function creates the error. Closes #1157
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 8507f866f..559e71087 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -3159,8 +3159,8 @@ static ssize_t ossl_send(struct connectdata *conn,
/* A failure in the SSL library occurred, usually a protocol error.
The OpenSSL error queue contains more information on the error. */
sslerror = ERR_get_error();
- if(sslerror ==
- ERR_PACK(ERR_LIB_SSL, SSL_F_SSL3_WRITE_PENDING, SSL_R_BIO_NOT_SET) &&
+ if(ERR_GET_LIB(sslerror) == ERR_LIB_SSL &&
+ ERR_GET_REASON(sslerror) == SSL_R_BIO_NOT_SET &&
conn->ssl[sockindex].state == ssl_connection_complete &&
conn->proxy_ssl[sockindex].state == ssl_connection_complete) {
char ver[120];