Skip to content

Commit a9fd538

Browse files
committed
nss: check return values of NSS functions
1 parent 65ca3b0 commit a9fd538

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/vtls/nss.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,9 +1798,13 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex)
17981798

17991799

18001800
/* Force handshake on next I/O */
1801-
SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE);
1801+
if(SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE)
1802+
!= SECSuccess)
1803+
goto error;
18021804

1803-
SSL_SetURL(connssl->handle, conn->host.name);
1805+
/* propagate hostname to the TLS layer */
1806+
if(SSL_SetURL(connssl->handle, conn->host.name) != SECSuccess)
1807+
goto error;
18041808

18051809
return CURLE_OK;
18061810

0 commit comments

Comments
 (0)