mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/openssl/ossl_ssl.c: Use const declaration if LibreSSL >= 2.8.0
to suppress a warning in OpenBSD. ``` ossl_ssl.c:938:31: warning: incompatible pointer types passing 'SSL_SESSION *(SSL *, unsigned char *, int, int *)' (aka 'struct ssl_session_st *(struct ssl_st *, unsigned char *, int, int *)') to parameter of type 'SSL_SESSION *(*)(struct ssl_st *, const unsigned char *, int, int *)' (aka 'struct ssl_session_st *(*)(struct ssl_st *, const unsigned char *, int, int *)') [-Wincompatible-pointer-types] SSL_CTX_sess_set_get_cb(ctx, ossl_sslctx_session_get_cb); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/openssl/ssl.h:738:20: note: passing argument to parameter 'get_session_cb' here SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, ^ 1 warning generated. ```
This commit is contained in:
parent
96452373fd
commit
06a04a1aa3
1 changed files with 1 additions and 1 deletions
|
@ -380,7 +380,7 @@ ossl_call_session_get_cb(VALUE ary)
|
|||
}
|
||||
|
||||
static SSL_SESSION *
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if (!defined(LIBRESSL_VERSION_NUMBER) ? OPENSSL_VERSION_NUMBER >= 0x10100000 : LIBRESSL_VERSION_NUMBER >= 0x2080000f)
|
||||
ossl_sslctx_session_get_cb(SSL *ssl, const unsigned char *buf, int len, int *copy)
|
||||
#else
|
||||
ossl_sslctx_session_get_cb(SSL *ssl, unsigned char *buf, int len, int *copy)
|
||||
|
|
Loading…
Reference in a new issue