From 3d7f86cf3a125788e3ad1a2e0a0f24225313a2ef Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 24 Sep 2018 01:19:25 -0500 Subject: [PATCH] Use type-safe wrapper for STACK_OF(SSL_CIPHERS) lookup. (#394) Motivation: The wrappers avoid casting and are more stable. This was mostly done in 94d4c41b98d37dcc26960098bd41c1624852b13a, but missed a spot. Modifications: Use sk_SSL_CIPHER_value instead of casting stack types manually. Result: Less casting. --- openssl-dynamic/src/main/c/ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssl-dynamic/src/main/c/ssl.c b/openssl-dynamic/src/main/c/ssl.c index 3005fda74..c2bcc1eee 100644 --- a/openssl-dynamic/src/main/c/ssl.c +++ b/openssl-dynamic/src/main/c/ssl.c @@ -1722,7 +1722,7 @@ TCN_IMPLEMENT_CALL(jobjectArray, SSL, authenticationMethods)(TCN_STDARGS, jlong for (i = 0; i < len; i++) { (*e)->SetObjectArrayElement(e, array, i, - (*e)->NewStringUTF(e, tcn_SSL_cipher_authentication_method((SSL_CIPHER*) sk_value((_STACK*) ciphers, i)))); + (*e)->NewStringUTF(e, tcn_SSL_cipher_authentication_method(sk_SSL_CIPHER_value(ciphers, i)))); } return array; }