mirror of https://github.com/adamdruppe/arsd.git
newer openssl api internally
This commit is contained in:
parent
427b325296
commit
9263a88bf7
31
http2.d
31
http2.d
|
@ -1432,11 +1432,32 @@ void main() {
|
||||||
version(use_openssl) {
|
version(use_openssl) {
|
||||||
alias SslClientSocket = OpenSslSocket;
|
alias SslClientSocket = OpenSslSocket;
|
||||||
|
|
||||||
|
// macros in the original C
|
||||||
|
void SSL_library_init() {
|
||||||
|
OPENSSL_init_ssl(0, null);
|
||||||
|
}
|
||||||
|
void OpenSSL_add_all_ciphers() {
|
||||||
|
OPENSSL_init_crypto(0 /*OPENSSL_INIT_ADD_ALL_CIPHERS*/, null);
|
||||||
|
}
|
||||||
|
void OpenSSL_add_all_digests() {
|
||||||
|
OPENSSL_init_crypto(0 /*OPENSSL_INIT_ADD_ALL_DIGESTS*/, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SSL_load_error_strings() {
|
||||||
|
OPENSSL_init_ssl(0x00200000L, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
SSL_METHOD* SSLv23_client_method() {
|
||||||
|
return TLS_client_method();
|
||||||
|
}
|
||||||
|
|
||||||
extern(C) {
|
extern(C) {
|
||||||
int SSL_library_init();
|
//int SSL_library_init();
|
||||||
void OpenSSL_add_all_ciphers();
|
void OPENSSL_init_ssl(ulong, void*);
|
||||||
void OpenSSL_add_all_digests();
|
//void OpenSSL_add_all_ciphers();
|
||||||
void SSL_load_error_strings();
|
//void OpenSSL_add_all_digests();
|
||||||
|
void OPENSSL_init_crypto(ulong, void*);
|
||||||
|
//void SSL_load_error_strings();
|
||||||
|
|
||||||
struct SSL {}
|
struct SSL {}
|
||||||
struct SSL_CTX {}
|
struct SSL_CTX {}
|
||||||
|
@ -1458,7 +1479,7 @@ version(use_openssl) {
|
||||||
|
|
||||||
SSL_METHOD* SSLv3_client_method();
|
SSL_METHOD* SSLv3_client_method();
|
||||||
SSL_METHOD* TLS_client_method();
|
SSL_METHOD* TLS_client_method();
|
||||||
SSL_METHOD* SSLv23_client_method();
|
//SSL_METHOD* SSLv23_client_method();
|
||||||
|
|
||||||
void ERR_print_errors_fp(FILE*);
|
void ERR_print_errors_fp(FILE*);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue