diff --git a/src/internal.c b/src/internal.c index 02e34dbc23..80305f0e71 100644 --- a/src/internal.c +++ b/src/internal.c @@ -37860,7 +37860,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, #endif if (sess == NULL) { ret = TlsSessionCacheGetAndRdLock(id, &sess, &freeCtx->row, - ssl->options.side); + (byte)ssl->options.side); if (ret != 0) sess = NULL; } diff --git a/src/x509.c b/src/x509.c index 56fd9aa402..29a718730c 100644 --- a/src/x509.c +++ b/src/x509.c @@ -11678,8 +11678,9 @@ int wolfSSL_i2d_X509_NAME(WOLFSSL_X509_NAME* name, unsigned char** out) "-----BEGIN X509 CRL-----")) { /* We have a crl */ WOLFSSL_MSG("Parsing crl"); - if((PemToDer((const unsigned char*) header, footerEnd - header, - CRL_TYPE, &der, NULL, NULL, NULL)) < 0) { + if((PemToDer((const unsigned char*) header, + (long)(footerEnd - header), CRL_TYPE, &der, NULL, NULL, + NULL)) < 0) { WOLFSSL_MSG("PemToDer error"); goto err; } diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 5dc398a916..e91442ed30 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -1679,7 +1679,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ #if defined(USE_CERT_BUFFERS_2048) && \ defined(HAVE_PKCS12) && \ !defined(NO_ASN) && !defined(NO_PWDBASED) && !defined(NO_HMAC) && \ - !defined(NO_CERTS) + !defined(NO_CERTS) && !defined(NO_DES3) if ( (ret = pkcs12_test()) != 0) TEST_FAIL("PKCS12 test failed!\n", ret); else @@ -24870,7 +24870,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pwdbased_test(void) #if defined(USE_CERT_BUFFERS_2048) && \ defined(HAVE_PKCS12) && \ !defined(NO_ASN) && !defined(NO_PWDBASED) && !defined(NO_HMAC) && \ - !defined(NO_CERTS) + !defined(NO_CERTS) && !defined(NO_DES3) WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs12_test(void) { wc_test_ret_t ret = 0; diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index df538986f4..706765295d 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -37,6 +37,7 @@ #include #include #include +#include /* For the types */ #include @@ -2973,7 +2974,6 @@ WOLFSSL_API int wolfSSL_connect_cert(WOLFSSL* ssl); /* PKCS12 compatibility */ -typedef struct WC_PKCS12 WC_PKCS12; WOLFSSL_API WC_PKCS12* wolfSSL_d2i_PKCS12_bio(WOLFSSL_BIO* bio, WC_PKCS12** pkcs12); WOLFSSL_API int wolfSSL_i2d_PKCS12_bio(WOLFSSL_BIO *bio, WC_PKCS12 *pkcs12); diff --git a/wolfssl/wolfcrypt/pkcs12.h b/wolfssl/wolfcrypt/pkcs12.h index 9a3e3f0f73..dc06c9df25 100644 --- a/wolfssl/wolfcrypt/pkcs12.h +++ b/wolfssl/wolfcrypt/pkcs12.h @@ -29,9 +29,7 @@ extern "C" { #endif -#ifndef WOLFSSL_TYPES_DEFINED /* do not redeclare from ssl.h */ - typedef struct WC_PKCS12 WC_PKCS12; -#endif +typedef struct WC_PKCS12 WC_PKCS12; typedef struct WC_DerCertList { /* dereferenced in ssl.c */ byte* buffer;