Skip to content

Commit

Permalink
Cleanup; manual sync to upstream. Fix openssl/aes.h error
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed May 30, 2024
1 parent 4102d54 commit fbce624
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 65 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -541,3 +541,4 @@ debian/control
/IDE/PlatformIO/PlatformIO_wolfSSL/wolfssl
/IDE/PlatformIO/examples/wolfssl_benchmark/.gitignore

/examples-extra/dtls
4 changes: 1 addition & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ egs:
$(MAKE) examples/client/client; \
$(MAKE) examples/echoclient/echoclient;\
$(MAKE) examples/server/server; \
$(MAKE) examples/echoserver/echoserver; \
$(MAKE) examples/dtls13_client/client; \
$(MAKE) examples/dtls13_server/server;
$(MAKE) examples/echoserver/echoserver;

wc_egs:
$(MAKE) wolfcrypt/test/testwolfcrypt; \
Expand Down
33 changes: 23 additions & 10 deletions examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3324,9 +3324,13 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
if (useClientCert && !loadCertKeyIntoSSLObj){
#if defined(NO_FILESYSTEM) && defined(USE_CERT_BUFFERS_2048)
if (wolfSSL_CTX_use_certificate_chain_buffer_format(ctx,
// client_cert_der_2048, sizeof_client_cert_der_2048,
client_sm2, sizeof_client_sm2,
WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
client_cert_der_2048, sizeof_client_cert_der_2048,
WOLFSSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS)

// if (wolfSSL_CTX_use_certificate_chain_buffer_format(ctx,
// // client_cert_der_2048, sizeof_client_cert_der_2048,
// client_sm2, sizeof_client_sm2,
// WOLFSSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
err_sys("can't load client cert buffer");
#elif !defined(TEST_LOAD_BUFFER)
if (wolfSSL_CTX_use_certificate_chain_file_format(ctx, ourCert, fileFormat)
Expand All @@ -3349,10 +3353,13 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#endif
) {
#ifdef NO_FILESYSTEM
if (wolfSSL_CTX_use_PrivateKey_buffer(ctx,
//client_key_der_2048, sizeof_client_key_der_2048,
client_sm2_priv, sizeof_client_sm2_priv,
SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
if (wolfSSL_CTX_use_PrivateKey_buffer(ctx, client_key_der_2048,
sizeof_client_key_der_2048, SSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS)

// if (wolfSSL_CTX_use_PrivateKey_buffer(ctx,
// //client_key_der_2048, sizeof_client_key_der_2048,
// client_sm2_priv, sizeof_client_sm2_priv,
// SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS)
err_sys("can't load client private key buffer");
#elif !defined(TEST_LOAD_BUFFER)
if (wolfSSL_CTX_use_PrivateKey_file(ctx, ourKey, fileFormat)
Expand Down Expand Up @@ -3391,12 +3398,18 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
} else {
#endif
#ifdef NO_FILESYSTEM
if (wolfSSL_CTX_load_verify_buffer(ctx,
root_sm2, sizeof_root_sm2,
SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) {
if (wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,
sizeof_ca_cert_der_2048, SSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) {
wolfSSL_CTX_free(ctx); ctx = NULL;
err_sys("can't load ca buffer, Please run from wolfSSL home dir");
}

// if (wolfSSL_CTX_load_verify_buffer(ctx,
// root_sm2, sizeof_root_sm2,
// SSL_FILETYPE_PEM) != WOLFSSL_SUCCESS) {
// wolfSSL_CTX_free(ctx); ctx = NULL;
// err_sys("can't load ca buffer, Please run from wolfSSL home dir");
// }
#elif !defined(TEST_LOAD_BUFFER)
unsigned int verify_flags = 0;
#ifdef TEST_BEFORE_DATE
Expand Down
48 changes: 0 additions & 48 deletions examples/server/dtls-common.h

This file was deleted.

2 changes: 1 addition & 1 deletion examples/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#ifndef WOLFSSL_SERVER_H
#define WOLFSSL_SERVER_H
#include <wolfssl/ssl.h>


THREAD_RETURN WOLFSSL_THREAD server_test(void* args);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -3552,9 +3552,9 @@ extern void uITRON4_free(void *p) ;
/* Ciphersuite check done in internal.h */
#endif

#if defined(HAVE_FFDHE) && !defined(HAVE_DH)
#error "HAVE_FFDHE requires HAVE_DH"
#endif
//#if defined(HAVE_FFDHE) && !defined(HAVE_DH)
// #error "HAVE_FFDHE requires HAVE_DH"
//#endif

/* Some final sanity checks */
#ifdef WOLFSSL_APPLE_HOMEKIT
Expand Down

0 comments on commit fbce624

Please sign in to comment.