Permalink
Browse files

fix issue #530 "NLA password asked after certificate refusal"

close connection when the certificate is not trusted
  • Loading branch information...
1 parent 02439d3 commit 26e49f28606eb29256fe17356e0b1fe455962f9d Raphaël Rigo committed Apr 10, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 libfreerdp-crypto/tls.c
View
@@ -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);

0 comments on commit 26e49f2

Please sign in to comment.