Merge pull request #420 from pjd/fixes
Fix for storing fingerprints in known_hosts file and some resource leaks fixes.
This commit is contained in:
commit
657e6c6a55
@ -664,7 +664,7 @@ void certificate_data_print(rdpCertificateStore* certificate_store, rdpCertifica
|
||||
if (!fp)
|
||||
return;
|
||||
|
||||
fprintf(certificate_store->fp,"%s %s\n", certificate_data->hostname, certificate_data->fingerprint);
|
||||
fprintf(fp, "%s %s\n", certificate_data->hostname, certificate_data->fingerprint);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
|
@ -48,12 +48,15 @@ boolean tls_connect(rdpTls* tls)
|
||||
|
||||
if (tls->ssl == NULL)
|
||||
{
|
||||
SSL_CTX_free(tls->ctx);
|
||||
printf("SSL_new failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (SSL_set_fd(tls->ssl, tls->sockfd) < 1)
|
||||
{
|
||||
SSL_free(tls->ssl);
|
||||
SSL_CTX_free(tls->ctx);
|
||||
printf("SSL_set_fd failed\n");
|
||||
return false;
|
||||
}
|
||||
@ -63,7 +66,11 @@ boolean tls_connect(rdpTls* tls)
|
||||
if (connection_status <= 0)
|
||||
{
|
||||
if (tls_print_error("SSL_connect", tls->ssl, connection_status))
|
||||
{
|
||||
SSL_free(tls->ssl);
|
||||
SSL_CTX_free(tls->ctx);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user