From a9fd53887ba07cd8313a8b9706f2dc71d6b8ed1b Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Fri, 18 Sep 2015 17:07:22 +0200 Subject: nss: check return values of NSS functions --- lib/vtls/nss.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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; -- cgit v1.2.3