Skip to content

Commit

Permalink
fix issue FreeRDP#530 "NLA password asked after certificate refusal"
Browse files Browse the repository at this point in the history
close connection when the certificate is not trusted
  • Loading branch information
Raphaël Rigo committed Apr 10, 2012
1 parent 02439d3 commit 26e49f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libfreerdp-crypto/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ boolean tls_connect(rdpTls* tls)
return false;
}

if (!tls_verify_certificate(tls, cert, tls->settings->hostname))
if (!tls_verify_certificate(tls, cert, tls->settings->hostname)) {
printf("tls_connect: certificate not trusted, aborting.\n");
tls_disconnect(tls);
tls_free_certificate(cert);
return false;
}

tls_free_certificate(cert);

Expand Down

0 comments on commit 26e49f2

Please sign in to comment.