summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@ruby-lang.org>2015-07-23 00:10:40 +0000
committernobu <nobu@ruby-lang.org>2015-07-23 00:10:40 +0000
commit1ae24a8753f889a210e4a4c71ebcb30482a871bc (patch)
treefb2469d0027ae842a5c3882e08bd16697f3e3adf
parent68c3f74a3bcb9e30d9016b81203ed986cf3b715d (diff)
downloadruby-openssl-history-1ae24a8753f889a210e4a4c71ebcb30482a871bc.tar.gz
ossl_ssl.c: suppress warnings
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): fix argument types to suppress shorten-64-to-32 and shorten-64-to-32 warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/openssl/ossl_ssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 47bbac9..81b5a40 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -869,7 +869,7 @@ ossl_sslctx_setup(VALUE self)
val = rb_iv_get(self, "@alpn_protocols");
if (!NIL_P(val)) {
VALUE rprotos = ssl_encode_npn_protocols(val);
- SSL_CTX_set_alpn_protos(ctx, StringValueCStr(rprotos), RSTRING_LEN(rprotos));
+ SSL_CTX_set_alpn_protos(ctx, (const unsigned char *)StringValueCStr(rprotos), RSTRING_LENINT(rprotos));
OSSL_Debug("SSL ALPN values added");
}
if (RTEST(rb_iv_get(self, "@alpn_select_cb"))) {