~paulliu/ubuntu/precise/freerdp/fixext

« back to all changes in this revision

Viewing changes to libfreerdp-core/tls.h

  • Committer: Package Import Robot
  • Author(s): Otavio Salvador
  • Date: 2012-02-11 10:34:05 UTC
  • mfrom: (1.2.2)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: package-import@ubuntu.com-20120211103405-x2wgdb6x8plb7cdk
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define __TLS_H
22
22
 
23
23
#include "crypto.h"
 
24
#include "certificate.h"
24
25
 
25
26
#include <openssl/ssl.h>
26
27
#include <openssl/err.h>
35
36
        SSL* ssl;
36
37
        int sockfd;
37
38
        SSL_CTX* ctx;
 
39
        rdpSettings* settings;
 
40
        rdpCertificateStore* certificate_store;
38
41
};
39
42
 
40
43
boolean tls_connect(rdpTls* tls);
41
44
boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file);
42
45
boolean tls_disconnect(rdpTls* tls);
 
46
 
43
47
int tls_read(rdpTls* tls, uint8* data, int length);
44
48
int tls_write(rdpTls* tls, uint8* data, int length);
 
49
 
45
50
CryptoCert tls_get_certificate(rdpTls* tls);
46
 
int tls_verify_certificate(CryptoCert cert, rdpSettings* settings, char* hostname);
47
 
void tls_print_cert_error();
 
51
boolean tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname);
 
52
void tls_print_certificate_error(char* hostname, char* fingerprint);
 
53
void tls_print_certificate_name_mismatch_error(char* hostname, char* common_name, char** alt_names, int alt_names_count);
 
54
 
48
55
boolean tls_print_error(char* func, SSL* connection, int value);
49
 
rdpTls* tls_new();
 
56
 
 
57
rdpTls* tls_new(rdpSettings* settings);
50
58
void tls_free(rdpTls* tls);
51
59
 
52
60
#endif /* __TLS_H */