You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
5.1 KiB

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