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";
|
"bag dolor terry richardson sapiente.\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NO_WOLFSSL_SERVER) && !defined(NO_DH)
|
#if !defined(NO_DH)
|
||||||
/* dh2048 p */
|
|
||||||
#define MIN_DHKEY_BITS 1024
|
#define MIN_DHKEY_BITS 1024
|
||||||
|
|
||||||
|
#if !defined(NO_WOLFSSL_SERVER)
|
||||||
|
/* dh2048 p */
|
||||||
static const unsigned char p[] =
|
static const unsigned char p[] =
|
||||||
{
|
{
|
||||||
0xb0, 0xa1, 0x08, 0x06, 0x9c, 0x08, 0x13, 0xba, 0x59, 0x06, 0x3c, 0xbc, 0x30,
|
0xb0, 0xa1, 0x08, 0x06, 0x9c, 0x08, 0x13, 0xba, 0x59, 0x06, 0x3c, 0xbc, 0x30,
|
||||||
@@ -201,7 +204,8 @@ static const unsigned char g[] =
|
|||||||
{
|
{
|
||||||
0x02,
|
0x02,
|
||||||
};
|
};
|
||||||
#endif /* !NO_WOLFSSL_SERVER && !NO_DH */
|
#endif /* !NO_WOLFSSL_SERVER */
|
||||||
|
#endif /* !NO_DH */
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD
|
#ifdef HAVE_PTHREAD
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -1225,8 +1229,10 @@ int bench_tls(void* args)
|
|||||||
#ifdef HAVE_PTHREAD
|
#ifdef HAVE_PTHREAD
|
||||||
int doShutdown;
|
int doShutdown;
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(NO_WOLFSSL_SERVER) || defined(HAVE_PTHREAD)
|
||||||
int argLocalMem = 0;
|
int argLocalMem = 0;
|
||||||
int listenFd = -1;
|
int listenFd = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (args)
|
if (args)
|
||||||
((func_args*)args)->return_code = -1; /* error state */
|
((func_args*)args)->return_code = -1; /* error state */
|
||||||
@@ -1379,7 +1385,9 @@ int bench_tls(void* args)
|
|||||||
info->runTimeSec = argRuntimeSec;
|
info->runTimeSec = argRuntimeSec;
|
||||||
info->showPeerInfo = argShowPeerInfo;
|
info->showPeerInfo = argShowPeerInfo;
|
||||||
info->showVerbose = argShowVerbose;
|
info->showVerbose = argShowVerbose;
|
||||||
|
#ifndef NO_WOLFSSL_SERVER
|
||||||
info->listenFd = listenFd;
|
info->listenFd = listenFd;
|
||||||
|
#endif
|
||||||
info->client.sockFd = -1;
|
info->client.sockFd = -1;
|
||||||
info->server.sockFd = -1;
|
info->server.sockFd = -1;
|
||||||
|
|
||||||
|
@@ -271,7 +271,7 @@
|
|||||||
#define dhParamFile "certs/dh2048.pem"
|
#define dhParamFile "certs/dh2048.pem"
|
||||||
#define cliEccKeyFile "certs/ecc-client-key.pem"
|
#define cliEccKeyFile "certs/ecc-client-key.pem"
|
||||||
#define cliEccCertFile "certs/client-ecc-cert.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 crlPemDir "certs/crl"
|
||||||
#define edCertFile "certs/ed25519/server-ed25519-cert.pem"
|
#define edCertFile "certs/ed25519/server-ed25519-cert.pem"
|
||||||
#define edKeyFile "certs/ed25519/server-ed25519-priv.pem"
|
#define edKeyFile "certs/ed25519/server-ed25519-priv.pem"
|
||||||
@@ -564,7 +564,7 @@ static const char* client_showx509_msg[][5] = {
|
|||||||
|
|
||||||
/* lng_index is to specify the language for displaying message. */
|
/* lng_index is to specify the language for displaying message. */
|
||||||
/* 0:English, 1:Japanese */
|
/* 0:English, 1:Japanese */
|
||||||
static WC_INLINE void ShowX509Ex(WOLFSSL_X509* x509, const char* hdr,
|
static WC_INLINE void ShowX509Ex(WOLFSSL_X509* x509, const char* hdr,
|
||||||
int lng_index)
|
int lng_index)
|
||||||
{
|
{
|
||||||
char* altName;
|
char* altName;
|
||||||
@@ -1196,7 +1196,6 @@ static WC_INLINE unsigned int my_psk_client_cb(WOLFSSL* ssl, const char* hint,
|
|||||||
key[2] = 0x3c;
|
key[2] = 0x3c;
|
||||||
key[3] = 0x4d;
|
key[3] = 0x4d;
|
||||||
|
|
||||||
|
|
||||||
return 4; /* length of key in octets or 0 for error */
|
return 4; /* length of key in octets or 0 for error */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1232,7 +1231,6 @@ static WC_INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identit
|
|||||||
key[2] = 0x3c;
|
key[2] = 0x3c;
|
||||||
key[3] = 0x4d;
|
key[3] = 0x4d;
|
||||||
|
|
||||||
|
|
||||||
return 4; /* length of key in octets or 0 for error */
|
return 4; /* length of key in octets or 0 for error */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user