forked from wolfSSL/wolfssl
NTRU suites from earlier code
This commit is contained in:
@@ -181,6 +181,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
||||
int useAnon = 0;
|
||||
int doDTLS = 0;
|
||||
int needDH = 0;
|
||||
int useNtruKey = 0;
|
||||
int nonBlocking = 0;
|
||||
int trackMemory = 0;
|
||||
int fewerPackets = 0;
|
||||
@@ -221,6 +222,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
||||
(void)ourCert;
|
||||
(void)ourDhParam;
|
||||
(void)verifyCert;
|
||||
(void)useNtruKey;
|
||||
(void)doCliCertCheck;
|
||||
(void)minDhKeyBits;
|
||||
|
||||
@@ -253,6 +255,10 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 'n' :
|
||||
useNtruKey = 1;
|
||||
break;
|
||||
|
||||
case 'u' :
|
||||
doDTLS = 1;
|
||||
break;
|
||||
@@ -474,8 +480,16 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
||||
wolfSSL_CTX_SetMinDhKey_Sz(ctx, (word16)minDhKeyBits);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NTRU
|
||||
if (useNtruKey) {
|
||||
if (CyaSSL_CTX_use_NTRUPrivateKey_file(ctx, ourKey)
|
||||
!= SSL_SUCCESS)
|
||||
err_sys("can't load ntru key file, "
|
||||
"Please run from wolfSSL home dir");
|
||||
}
|
||||
#endif
|
||||
#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
|
||||
if (!usePsk && !useAnon) {
|
||||
if (!useNtruKey && !usePsk && !useAnon) {
|
||||
if (SSL_CTX_use_PrivateKey_file(ctx, ourKey, SSL_FILETYPE_PEM)
|
||||
!= SSL_SUCCESS)
|
||||
err_sys("can't load server private key file, check file and run "
|
||||
|
||||
Reference in New Issue
Block a user