commit-test and jenkins fixes

This commit is contained in:
Juliusz Sosinowicz
2021-10-19 17:02:44 +02:00
parent 44d8ab20e1
commit 79b738b5a6
3 changed files with 7 additions and 55 deletions

View File

@@ -542,50 +542,6 @@ static int DeriveEarlyTrafficSecret(WOLFSSL* ssl, byte* key)
return ret;
}
#ifdef HAVE_KEYING_MATERIAL
/* The length of the early exporter label. */
#define EARLY_EXPORTER_LABEL_SZ 12
/* The early exporter label. */
static const byte earlyExporterLabel[EARLY_EXPORTER_LABEL_SZ + 1] =
"e exp master";
/* Derive the early exporter key.
*
* ssl The SSL/TLS object.
* key The derived key.
* returns 0 on success, otherwise failure.
*/
static int DeriveEarlyExporterSecret(WOLFSSL* ssl, byte* key)
{
int ret;
WOLFSSL_MSG("Derive Early Exporter Secret");
if (ssl == NULL || ssl->arrays == NULL) {
return BAD_FUNC_ARG;
}
ret = DeriveKey(ssl, key, -1, ssl->arrays->secret,
earlyExporterLabel, EARLY_EXPORTER_LABEL_SZ,
ssl->specs.mac_algorithm, 1);
#ifdef HAVE_SECRET_CALLBACK
if (ret == 0 && ssl->tls13SecretCb != NULL) {
ret = ssl->tls13SecretCb(ssl, EARLY_EXPORTER_SECRET, key,
ssl->specs.hash_size, ssl->tls13SecretCtx);
if (ret != 0) {
return TLS13_SECRET_CB_E;
}
}
#ifdef OPENSSL_EXTRA
if (ret == 0 && ssl->tls13KeyLogCb != NULL) {
ret = ssl->tls13KeyLogCb(ssl, EARLY_EXPORTER_SECRET, key,
ssl->specs.hash_size, NULL);
if (ret != 0) {
return TLS13_SECRET_CB_E;
}
}
#endif /* OPENSSL_EXTRA */
#endif /* HAVE_SECRET_CALLBACK */
return ret;
}
#endif
#endif
/* The length of the client handshake label. */

View File

@@ -310,7 +310,6 @@
#include <wolfssl/openssl/pem.h>
#include <wolfssl/openssl/ec.h>
#include <wolfssl/openssl/engine.h>
#include <wolfssl/openssl/crypto.h>
#include <wolfssl/openssl/hmac.h>
#include <wolfssl/openssl/objects.h>
#include <wolfssl/openssl/rand.h>
@@ -6572,7 +6571,7 @@ static void test_wolfSSL_UseTrustedCA(void)
#ifndef NO_WOLFSSL_SERVER
AssertNotNull((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method())));
AssertTrue(wolfSSL_CTX_use_certificate_file(ctx, svrCertFile, SSL_FILETYPE_PEM));
AssertTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, SSL_FILETYPE_PEM));
AssertTrue(wolfSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, SSL_FILETYPE_PEM));
#else
AssertNotNull((ctx = wolfSSL_CTX_new(wolfSSLv23_client_method())));
#endif
@@ -6616,7 +6615,7 @@ static void test_wolfSSL_UseMaxFragment(void)
#ifndef NO_WOLFSSL_SERVER
WOLFSSL_CTX* ctx = wolfSSL_CTX_new(wolfSSLv23_server_method());
AssertTrue(wolfSSL_CTX_use_certificate_file(ctx, svrCertFile, WOLFSSL_FILETYPE_PEM));
AssertTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM));
AssertTrue(wolfSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM));
#else
WOLFSSL_CTX* ctx = wolfSSL_CTX_new(wolfSSLv23_client_method());
#endif
@@ -6689,7 +6688,7 @@ static void test_wolfSSL_UseTruncatedHMAC(void)
#ifndef NO_WOLFSSL_SERVER
WOLFSSL_CTX* ctx = wolfSSL_CTX_new(wolfSSLv23_server_method());
AssertTrue(wolfSSL_CTX_use_certificate_file(ctx, svrCertFile, WOLFSSL_FILETYPE_PEM));
AssertTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM));
AssertTrue(wolfSSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM));
#else
WOLFSSL_CTX* ctx = wolfSSL_CTX_new(wolfSSLv23_client_method());
#endif
@@ -48762,9 +48761,9 @@ static void test_export_keying_material(void)
static int test_wolfSSL_THREADID_hash(void)
{
int ret = 0;
CRYPTO_THREADID id;
unsigned long res;
#if defined(OPENSSL_EXTRA)
CRYPTO_THREADID id;
printf(testingFmt, "wolfSSL_THREADID_hash");
CRYPTO_THREADID_current(NULL);
AssertTrue(1);
@@ -48775,7 +48774,6 @@ static int test_wolfSSL_THREADID_hash(void)
AssertTrue( res == 0UL);
printf(resultFmt, passed);
#endif /* OPENSSL_EXTRA */
(void)id;
(void)res;
return ret;
}
@@ -49650,10 +49648,6 @@ static void test_wolfSSL_ERR_strings(void)
err = wolfSSL_ERR_func_error_string(UNSUPPORTED_SUITE);
AssertTrue(err != NULL);
AssertIntEQ((*err == '\0'), 1);
err = wolfSSL_ERR_lib_error_string(PEM_R_PROBLEMS_GETTING_PASSWORD);
AssertTrue(err != NULL);
AssertIntEQ((*err == ('\0')), 1);
#endif
printf(resultFmt, passed);
#endif

View File

@@ -37,6 +37,9 @@
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/memory.h>
/* For the types */
#include <wolfssl/openssl/compat_types.h>
#ifdef HAVE_WOLF_EVENT
#include <wolfssl/wolfcrypt/wolfevent.h>
#endif
@@ -87,7 +90,6 @@
#endif
#elif (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
#include <wolfssl/openssl/compat_types.h>
#include <wolfssl/openssl/bn.h>
#include <wolfssl/openssl/hmac.h>
#include <wolfssl/openssl/rsa.h>