修订版 | 6580 (tree) |
---|---|
时间 | 2017-01-17 23:57:45 |
作者 | (del#24082) |
SSL_library_init関数はOpenSSL 1.1.0でdeprecatedとなり、OPENSSL_init_ssl関数に置き換わった。
SSL_load_error_strings関数はOpenSSL 1.1.0でdeprecatedとなり、呼び出し不要となった。
@@ -61,7 +61,6 @@ | ||
61 | 61 | DECLARE_SSLEAY32_API_v(SSL_free, (SSL *ssl), (ssl)) |
62 | 62 | DECLARE_SSLEAY32_API(int, SSL_get_error, (const SSL *s,int ret_code), (s,ret_code)) |
63 | 63 | DECLARE_SSLEAY32_API(X509 *, SSL_get_peer_certificate, (const SSL *s), (s)) |
64 | -DECLARE_SSLEAY32_API_v(SSL_load_error_strings, (void ), ()) | |
65 | 64 | DECLARE_SSLEAY32_API(SSL *, SSL_new, (SSL_CTX *ctx), (ctx)) |
66 | 65 | DECLARE_SSLEAY32_API(int, SSL_read, (SSL *ssl,void *buf,int num), (ssl, buf, num)) |
67 | 66 | DECLARE_SSLEAY32_API(int, SSL_set_fd, (SSL *s, int fd), (s, fd)) |
@@ -74,6 +73,6 @@ | ||
74 | 73 | #endif |
75 | 74 | DECLARE_SSLEAY32_API(int, SSL_CTX_load_verify_locations, (SSL_CTX *ctx, const char *CAfile, const char *CApath), (ctx, CAfile, CApath)) |
76 | 75 | DECLARE_SSLEAY32_API(long, SSL_get_verify_result, (const SSL *ssl), (ssl)) |
77 | -DECLARE_SSLEAY32_API(int, SSL_library_init, (void), ()) | |
76 | +DECLARE_SSLEAY32_API(int, OPENSSL_init_ssl, (uint64_t opts, const OPENSSL_INIT_SETTINGS *settings), (opts, settings)) | |
78 | 77 | |
79 | 78 | #endif//_SSLLIB_h_ |
\ No newline at end of file |
@@ -54,8 +54,12 @@ | ||
54 | 54 | |
55 | 55 | private: |
56 | 56 | SSLContext():ctx(NULL) { |
57 | - SSL_library_init(); | |
58 | - SSL_load_error_strings(); | |
57 | + // SSL_library_init関数はOpenSSL 1.1.0でdeprecatedとなり、 | |
58 | + // OPENSSL_init_ssl関数に置き換わった。 | |
59 | + OPENSSL_init_ssl(0, NULL); | |
60 | + | |
61 | + // SSL_load_error_strings関数はOpenSSL 1.1.0でdeprecatedとなり、 | |
62 | + // 呼び出し不要となっている。 | |
59 | 63 | ctx = SSL_CTX_new(SSLv23_client_method()); |
60 | 64 | SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); |
61 | 65 | } |