Skip to content

Commit 5135000

Browse files
committed
tlshd: Return after performing anonymous x.509 handshake
Fix a logic bug introduced when converting to a single public x.509 handshake function. Fixes: a38e1f8 ("Initial commit") Signed-off-by: Chuck Lever <[email protected]>
1 parent c0927d0 commit 5135000

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tlshd/x509.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ void tlshd_client_x509_handshake(int sock, const char *peername)
178178
tlshd_log_perror("Failed to fetch TLS peer ID");
179179
peerid = TLSH_NO_PEERID;
180180
}
181-
if (peerid == TLSH_NO_PEERID)
181+
if (peerid == TLSH_NO_PEERID) {
182182
tlshd_client_anon_x509_handshake(sock, peername);
183+
return;
184+
}
183185

184186
ret = gnutls_certificate_allocate_credentials(&xcred);
185187
if (ret != GNUTLS_E_SUCCESS) {

0 commit comments

Comments
 (0)