forked from wolfSSL/wolfssl
Fixes for building with NO_WOLFSSL_SERVER
. Minor test.h cleanups.
This commit is contained in:
@@ -169,9 +169,12 @@ static const char* kTestStr =
|
||||
"bag dolor terry richardson sapiente.\n";
|
||||
#endif
|
||||
|
||||
#if !defined(NO_WOLFSSL_SERVER) && !defined(NO_DH)
|
||||
/* dh2048 p */
|
||||
#if !defined(NO_DH)
|
||||
|
||||
#define MIN_DHKEY_BITS 1024
|
||||
|
||||
#if !defined(NO_WOLFSSL_SERVER)
|
||||
/* dh2048 p */
|
||||
static const unsigned char p[] =
|
||||
{
|
||||
0xb0, 0xa1, 0x08, 0x06, 0x9c, 0x08, 0x13, 0xba, 0x59, 0x06, 0x3c, 0xbc, 0x30,
|
||||
@@ -201,7 +204,8 @@ static const unsigned char g[] =
|
||||
{
|
||||
0x02,
|
||||
};
|
||||
#endif /* !NO_WOLFSSL_SERVER && !NO_DH */
|
||||
#endif /* !NO_WOLFSSL_SERVER */
|
||||
#endif /* !NO_DH */
|
||||
|
||||
#ifdef HAVE_PTHREAD
|
||||
typedef struct {
|
||||
@@ -1225,8 +1229,10 @@ int bench_tls(void* args)
|
||||
#ifdef HAVE_PTHREAD
|
||||
int doShutdown;
|
||||
#endif
|
||||
#if !defined(NO_WOLFSSL_SERVER) || defined(HAVE_PTHREAD)
|
||||
int argLocalMem = 0;
|
||||
int listenFd = -1;
|
||||
#endif
|
||||
|
||||
if (args)
|
||||
((func_args*)args)->return_code = -1; /* error state */
|
||||
@@ -1379,7 +1385,9 @@ int bench_tls(void* args)
|
||||
info->runTimeSec = argRuntimeSec;
|
||||
info->showPeerInfo = argShowPeerInfo;
|
||||
info->showVerbose = argShowVerbose;
|
||||
#ifndef NO_WOLFSSL_SERVER
|
||||
info->listenFd = listenFd;
|
||||
#endif
|
||||
info->client.sockFd = -1;
|
||||
info->server.sockFd = -1;
|
||||
|
||||
|
@@ -271,7 +271,7 @@
|
||||
#define dhParamFile "certs/dh2048.pem"
|
||||
#define cliEccKeyFile "certs/ecc-client-key.pem"
|
||||
#define cliEccCertFile "certs/client-ecc-cert.pem"
|
||||
#define caEccCertFile "certs/ca-ecc-cert/pem"
|
||||
#define caEccCertFile "certs/ca-ecc-cert.pem"
|
||||
#define crlPemDir "certs/crl"
|
||||
#define edCertFile "certs/ed25519/server-ed25519-cert.pem"
|
||||
#define edKeyFile "certs/ed25519/server-ed25519-priv.pem"
|
||||
@@ -1196,7 +1196,6 @@ static WC_INLINE unsigned int my_psk_client_cb(WOLFSSL* ssl, const char* hint,
|
||||
key[2] = 0x3c;
|
||||
key[3] = 0x4d;
|
||||
|
||||
|
||||
return 4; /* length of key in octets or 0 for error */
|
||||
}
|
||||
else {
|
||||
@@ -1232,7 +1231,6 @@ static WC_INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identit
|
||||
key[2] = 0x3c;
|
||||
key[3] = 0x4d;
|
||||
|
||||
|
||||
return 4; /* length of key in octets or 0 for error */
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user