aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2015-09-18 17:07:22 +0200
committerKamil Dudka <kdudka@redhat.com>2015-09-18 17:07:22 +0200
commita9fd53887ba07cd8313a8b9706f2dc71d6b8ed1b (patch)
treec2194bf0c2fbc624c6723bd0a71babaec967ad3b /lib/vtls
parent65ca3b083c70df9430e816aab874ffa968726494 (diff)
nss: check return values of NSS functions
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/nss.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index c66c60b56..048273cf2 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -1798,9 +1798,13 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
/* Force handshake on next I/O */
- SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE);
+ if(SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE)
+ != SECSuccess)
+ goto error;
- SSL_SetURL(connssl->handle, conn->host.name);
+ /* propagate hostname to the TLS layer */
+ if(SSL_SetURL(connssl->handle, conn->host.name) != SECSuccess)
+ goto error;
return CURLE_OK;