forked from wolfSSL/wolfssl
Added new --disable-oldnames
option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA). Add --enable-opensslcoexist
which makes sure oldnames
is disabled. Refactor of SSL_
to WOLF_SSL_
. Refactor of SHA
, MD5
, SHA224
, SHA256
, SHA512
and SHA384
to WC_
naming.
This commit is contained in:
@@ -28,18 +28,20 @@
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/test.h>
|
||||
#include "wolfcrypt/test/test.h"
|
||||
#include <wolfcrypt/test/test.h>
|
||||
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
#include <wolfssl/openssl/ssl.h>
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/sha256.h>
|
||||
|
||||
#include "examples/echoclient/echoclient.h"
|
||||
#include "examples/echoserver/echoserver.h"
|
||||
#include "examples/server/server.h"
|
||||
#include "examples/client/client.h"
|
||||
#include <examples/echoclient/echoclient.h>
|
||||
#include <examples/echoserver/echoserver.h>
|
||||
#include <examples/server/server.h>
|
||||
#include <examples/client/client.h>
|
||||
|
||||
|
||||
#ifndef NO_SHA256
|
||||
@@ -187,8 +189,8 @@ int testsuite_test(int argc, char** argv)
|
||||
/* validate output equals input */
|
||||
{
|
||||
#ifndef NO_SHA256
|
||||
byte input[SHA256_DIGEST_SIZE];
|
||||
byte output[SHA256_DIGEST_SIZE];
|
||||
byte input[WC_SHA256_DIGEST_SIZE];
|
||||
byte output[WC_SHA256_DIGEST_SIZE];
|
||||
|
||||
file_test("input", input);
|
||||
file_test(outputName, output);
|
||||
@@ -362,9 +364,9 @@ void file_test(const char* file, byte* check)
|
||||
{
|
||||
FILE* f;
|
||||
int i = 0, j, ret;
|
||||
Sha256 sha256;
|
||||
wc_Sha256 sha256;
|
||||
byte buf[1024];
|
||||
byte shasum[SHA256_DIGEST_SIZE];
|
||||
byte shasum[WC_SHA256_DIGEST_SIZE];
|
||||
|
||||
ret = wc_InitSha256(&sha256);
|
||||
if (ret != 0) {
|
||||
@@ -393,7 +395,7 @@ void file_test(const char* file, byte* check)
|
||||
|
||||
XMEMCPY(check, shasum, sizeof(shasum));
|
||||
|
||||
for(j = 0; j < SHA256_DIGEST_SIZE; ++j )
|
||||
for(j = 0; j < WC_SHA256_DIGEST_SIZE; ++j )
|
||||
printf( "%02x", shasum[j] );
|
||||
|
||||
printf(" %s\n", file);
|
||||
|
Reference in New Issue
Block a user