2 /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
3 /* Published under the GNU General Public License V.2, see file COPYING */
5 #ifndef __sslcls_h_included
6 #define __sslcls_h_included 1
11 void sycSSL_load_error_strings(void);
12 int sycSSL_library_init(void);
13 const SSL_METHOD
*sycSSLv2_client_method(void);
14 const SSL_METHOD
*sycSSLv2_server_method(void);
15 const SSL_METHOD
*sycSSLv3_client_method(void);
16 const SSL_METHOD
*sycSSLv3_server_method(void);
17 const SSL_METHOD
*sycSSLv23_client_method(void);
18 const SSL_METHOD
*sycSSLv23_server_method(void);
19 const SSL_METHOD
*sycTLSv1_client_method(void);
20 const SSL_METHOD
*sycTLSv1_server_method(void);
21 const SSL_METHOD
*sycTLSv1_1_client_method(void);
22 const SSL_METHOD
*sycTLSv1_1_server_method(void);
23 const SSL_METHOD
*sycTLSv1_2_client_method(void);
24 const SSL_METHOD
*sycTLSv1_2_server_method(void);
25 const SSL_METHOD
*sycDTLSv1_client_method(void);
26 const SSL_METHOD
*sycDTLSv1_server_method(void);
27 SSL_CTX
*sycSSL_CTX_new(const SSL_METHOD
*method
);
28 SSL
*sycSSL_new(SSL_CTX
*ctx
);
29 int sycSSL_CTX_load_verify_locations(SSL_CTX
*ctx
, const char *CAfile
,
31 int sycSSL_CTX_use_certificate_file(SSL_CTX
*ctx
, const char *file
, int type
);
32 int sycSSL_CTX_use_certificate_chain_file(SSL_CTX
*ctx
, const char *file
);
33 int sycSSL_CTX_use_PrivateKey_file(SSL_CTX
*ctx
, const char *file
, int type
);
34 void sycSSL_CTX_set_verify(SSL_CTX
*ctx
, int mode
,
35 int (*verify_callback
)(int, X509_STORE_CTX
*));
36 int sycSSL_CTX_set_tmp_dh(SSL_CTX
*ctx
, DH
*dh
);
37 int sycSSL_CTX_set_cipher_list(SSL_CTX
*ctx
, const char *str
);
38 int sycSSL_set_cipher_list(SSL
*ssl
, const char *str
);
39 long sycSSL_get_verify_result(SSL
*ssl
);
40 int sycSSL_set_fd(SSL
*ssl
, int fd
);
41 int sycSSL_connect(SSL
*ssl
);
42 int sycSSL_accept(SSL
*ssl
);
43 int sycSSL_read(SSL
*ssl
, void *buf
, int num
);
44 int sycSSL_pending(SSL
*ssl
);
45 int sycSSL_write(SSL
*ssl
, const void *buf
, int num
);
46 X509
*sycSSL_get_peer_certificate(SSL
*ssl
);
47 int sycSSL_shutdown(SSL
*ssl
);
48 void sycSSL_CTX_free(SSL_CTX
*ctx
);
49 void sycSSL_free(SSL
*ssl
);
50 int sycRAND_egd(const char *path
);
52 DH
*sycPEM_read_bio_DHparams(BIO
*bp
, DH
**x
, pem_password_cb
*cb
, void *u
);
54 BIO
*sycBIO_new_file(const char *filename
, const char *mode
);
56 int sycFIPS_mode_set(int onoff
);
58 #if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
59 const COMP_METHOD
*sycSSL_get_current_compression(SSL
*ssl
);
60 const COMP_METHOD
*sycSSL_get_current_expansion(SSL
*ssl
);
61 const char *sycSSL_COMP_get_name(const COMP_METHOD
*comp
);
64 #endif /* WITH_OPENSSL */
66 #else /* !WITH_SYCLS */
70 #define sycSSL_load_error_strings() SSL_load_error_strings()
71 #define sycSSL_library_init() SSL_library_init()
72 #define sycSSLv2_client_method() SSLv2_client_method()
73 #define sycSSLv2_server_method() SSLv2_server_method()
74 #define sycSSLv3_client_method() SSLv3_client_method()
75 #define sycSSLv3_server_method() SSLv3_server_method()
76 #define sycSSLv23_client_method() SSLv23_client_method()
77 #define sycSSLv23_server_method() SSLv23_server_method()
78 #define sycTLSv1_client_method() TLSv1_client_method()
79 #define sycTLSv1_server_method() TLSv1_server_method()
80 #define sycTLSv1_1_client_method() TLSv1_1_client_method()
81 #define sycTLSv1_1_server_method() TLSv1_1_server_method()
82 #define sycTLSv1_2_client_method() TLSv1_2_client_method()
83 #define sycTLSv1_2_server_method() TLSv1_2_server_method()
84 #define sycDTLSv1_client_method() DTLSv1_client_method()
85 #define sycDTLSv1_server_method() DTLSv1_server_method()
86 #define sycSSL_CTX_new(m) SSL_CTX_new(m)
87 #define sycSSL_new(c) SSL_new(c)
88 #define sycSSL_CTX_load_verify_locations(c,f,p) SSL_CTX_load_verify_locations(c,f,p)
89 #define sycSSL_CTX_use_certificate_file(c,f,t) SSL_CTX_use_certificate_file(c,f,t)
90 #define sycSSL_CTX_use_certificate_chain_file(c,f) SSL_CTX_use_certificate_chain_file(c,f)
91 #define sycSSL_CTX_use_PrivateKey_file(c,f,t) SSL_CTX_use_PrivateKey_file(c,f,t)
92 #define sycSSL_CTX_set_verify(c,m,v) SSL_CTX_set_verify(c,m,v)
93 #define sycSSL_CTX_set_tmp_dh(c,d) SSL_CTX_set_tmp_dh(c,d)
94 #define sycSSL_CTX_set_cipher_list(c,s) SSL_CTX_set_cipher_list(c,s)
95 #define sycSSL_set_cipher_list(s,t) SSL_set_cipher_list(s,t)
96 #define sycSSL_get_verify_result(s) SSL_get_verify_result(s)
97 #define sycSSL_set_fd(s,f) SSL_set_fd(s,f)
98 #define sycSSL_connect(s) SSL_connect(s)
99 #define sycSSL_accept(s) SSL_accept(s)
100 #define sycSSL_read(s,b,n) SSL_read(s,b,n)
101 #define sycSSL_pending(s) SSL_pending(s)
102 #define sycSSL_write(s,b,n) SSL_write(s,b,n)
103 #define sycSSL_get_peer_certificate(s) SSL_get_peer_certificate(s)
104 #define sycSSL_shutdown(s) SSL_shutdown(s)
105 #define sycSSL_CTX_free(c) SSL_CTX_free(c)
106 #define sycSSL_free(s) SSL_free(s)
107 #define sycRAND_egd(p) RAND_egd(p)
109 #define sycPEM_read_bio_DHparams(b,x,p,u) PEM_read_bio_DHparams(b,x,p,u)
111 #define sycBIO_new_file(f,m) BIO_new_file(f,m)
113 #define sycSSL_get_current_compression(s) SSL_get_current_compression(s)
114 #define sycSSL_get_current_expansion(s) SSL_get_current_expansion(s)
115 #define sycSSL_COMP_get_name(c) SSL_COMP_get_name(c)
117 #endif /* WITH_OPENSSL */
119 #define sycFIPS_mode_set(o) FIPS_mode_set(o)
121 #endif /* !WITH_SYCLS */
123 #endif /* !defined(__sslcls_h_included) */