Skip to content

Commit

Permalink
Use type-safe wrapper for STACK_OF(SSL_CIPHERS) lookup. (#394)
Browse files Browse the repository at this point in the history
Motivation:

The wrappers avoid casting and are more stable. This was mostly done in
94d4c41, but missed a spot.

Modifications:

Use sk_SSL_CIPHER_value instead of casting stack types manually.

Result:

Less casting.
  • Loading branch information
davidben authored and normanmaurer committed Sep 24, 2018
1 parent bc16a45 commit 19848b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openssl-dynamic/src/main/c/ssl.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 19848b6

Please sign in to comment.