Skip to content

Commit

Permalink
Fix unused variable warnings
Browse files Browse the repository at this point in the history
Motivation:
Some compilers complain if variables are not used

Modifications:
Remove an unused variable, and explicitly ignore another in case it isn't used.

Result:
Easier compilation time.
  • Loading branch information
carl-mastrangelo authored and normanmaurer committed Jul 19, 2016
1 parent 8fd6d83 commit 766b47f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion openssl-dynamic/src/main/c/sslcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,6 @@ static jobjectArray principalBytes(JNIEnv* e, const STACK_OF(X509_NAME)* names)
*/
static int cert_requested(SSL* ssl, X509** x509Out, EVP_PKEY** pkeyOut) {
tcn_ssl_ctxt_t *c = SSL_get_app_data2(ssl);
char ssl2_ctype = SSL3_CT_RSA_SIGN;
int ctype_num;
jbyte* ctype_bytes;
jobjectArray issuers;
Expand All @@ -1647,6 +1646,7 @@ static int cert_requested(SSL* ssl, X509** x509Out, EVP_PKEY** pkeyOut) {
*pkeyOut = NULL;

#if !defined(OPENSSL_IS_BORINGSSL) && (OPENSSL_VERSION_NUMBER < 0x1000200fL || LIBRESSL_VERSION_NUMBER < 0x20400000L)
char ssl2_ctype = SSL3_CT_RSA_SIGN;
switch (ssl->version) {
case SSL2_VERSION:
ctype_bytes = (jbyte*) &ssl2_ctype;
Expand Down
1 change: 0 additions & 1 deletion openssl-dynamic/src/main/c/sslutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ int SSL_use_certificate_chain_bio(SSL *ssl, BIO *bio,
X509 *x509;
unsigned long err;
int n;
STACK_OF(X509) *chain;

/* optionally skip a leading server certificate */
if (skipfirst) {
Expand Down

0 comments on commit 766b47f

Please sign in to comment.