From 8fb3ccacb7e7901013c745acfd7a8e7596371592 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 12 Mar 2018 18:05:24 -0600 Subject: [PATCH] opensslextra fixs and warning for unused variable --- src/ssl.c | 19 ++++++++++++++++++- wolfcrypt/src/asn.c | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index 22911a1ad..7c0ef5b76 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -29435,20 +29435,25 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl) #endif /* HAVE_ECC */ /* oidBlkType */ + #ifdef WOLFSSL_AES_128 case AES128CBCb: sName = "AES-128-CBC"; type = oidBlkType; break; - + #endif + #ifdef WOLFSSL_AES_192 case AES192CBCb: sName = "AES-192-CBC"; type = oidBlkType; break; + #endif + #ifdef WOLFSSL_AES_256 case AES256CBCb: sName = "AES-256-CBC"; type = oidBlkType; break; + #endif #ifndef NO_DES3 case NID_des: @@ -29607,20 +29612,26 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl) break; /* oidKeyWrapType */ + #ifdef WOLFSSL_AES_128 case AES128_WRAP: sName = "AES-128 wrap"; type = oidKeyWrapType; break; + #endif + #ifdef WOLFSSL_AES_192 case AES192_WRAP: sName = "AES-192 wrap"; type = oidKeyWrapType; break; + #endif + #ifdef WOLFSSL_AES_256 case AES256_WRAP: sName = "AES-256 wrap"; type = oidKeyWrapType; break; + #endif /* oidCmsKeyAgreeType */ #ifndef NO_SHA @@ -30203,12 +30214,18 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl) /* oidKeyWrapType */ case oidKeyWrapType: switch (oid) { + #ifdef WOLFSSL_AES_128 case AES128_WRAP: return AES128_WRAP; + #endif + #ifdef WOLFSSL_AES_192 case AES192_WRAP: return AES192_WRAP; + #endif + #ifdef WOLFSSL_AES_256 case AES256_WRAP: return AES256_WRAP; + #endif } break; diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 48aa63c33..8f3fbac79 100755 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -2431,6 +2431,7 @@ static int CheckAlgo(int first, int second, int* id, int* version) < 0 on error */ static int CheckAlgoV2(int oid, int* id) { + (void)id; /* not used if AES and DES3 disabled */ switch (oid) { #ifndef NO_DES3 case DESb: