diff --git a/configure.ac b/configure.ac index fadc35735f..45562135ab 100644 --- a/configure.ac +++ b/configure.ac @@ -8462,7 +8462,7 @@ AM_CONDITIONAL([BUILD_TESTS],[test "x$ENABLED_EXAMPLES" = "xyes"]) AM_CONDITIONAL([BUILD_THREADED_EXAMPLES],[test "x$ENABLED_SINGLETHREADED" = "xno" && test "x$ENABLED_EXAMPLES" = "xyes" && test "x$ENABLED_LEANTLS" = "xno"]) AM_CONDITIONAL([BUILD_WOLFCRYPT_TESTS],[test "x$ENABLED_CRYPT_TESTS" = "xyes"]) AM_CONDITIONAL([BUILD_WOLFCRYPT_TESTS_LIBS],[test "x$ENABLED_CRYPT_TESTS_LIBS" = "xyes"]) -AM_CONDITIONAL([BUILD_LIBZ],[test "x$ENABLED_LIBZ" = "xyes"]) +AM_CONDITIONAL([BUILD_LIBZ],[test "x$ENABLED_LIBZ" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_PKCS11],[test "x$ENABLED_PKCS11" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_PKCS12],[test "x$ENABLED_PKCS12" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) AM_CONDITIONAL([BUILD_PKCS8],[test "x$ENABLED_PKCS8" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"]) diff --git a/src/tls13.c b/src/tls13.c index fb1e97bc44..45c9366ab9 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -3655,7 +3655,10 @@ static int SetupPskKey(WOLFSSL* ssl, PreSharedKey* psk, int clientHello) ssl->options.cipherSuite = psk->cipherSuite; } else { - byte pskCS[2] = { psk->cipherSuite0, psk->cipherSuite }; + byte pskCS[2]; + pskCS[0] = psk->cipherSuite0; + pskCS[1] = psk->cipherSuite; + /* Ensure PSK and negotiated cipher suites have same hash. */ if (SuiteMac(pskCS) != SuiteMac(suite)) { WOLFSSL_ERROR_VERBOSE(PSK_KEY_ERROR);