mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
addressed review comments
This commit is contained in:
@ -329,29 +329,6 @@ static void SetKeyShare(WOLFSSL* ssl, int onlyKeyShare, int useX25519,
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
static void EarlyDataStatus(WOLFSSL* ssl)
|
||||
{
|
||||
int earlyData_status;
|
||||
|
||||
earlyData_status = wolfSSL_get_early_data_status(ssl);
|
||||
if (earlyData_status < 0) return;
|
||||
|
||||
printf("Early Data was ");
|
||||
|
||||
switch(earlyData_status) {
|
||||
case WOLFSSL_EARLY_DATA_NOT_SENT:
|
||||
printf("not sent.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_REJECTED:
|
||||
printf("rejected.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_ACCEPTED:
|
||||
printf("accepted\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown...\n");
|
||||
}
|
||||
}
|
||||
static void EarlyData(WOLFSSL_CTX* ctx, WOLFSSL* ssl, const char* msg,
|
||||
int msgSz, char* buffer)
|
||||
{
|
||||
|
@ -844,32 +844,6 @@ static const char* server_usage_msg[][56] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
static void EarlyDataStatus(WOLFSSL* ssl)
|
||||
{
|
||||
int earlyData_status;
|
||||
|
||||
earlyData_status = wolfSSL_get_early_data_status(ssl);
|
||||
if (earlyData_status < 0) return;
|
||||
|
||||
printf("Early Data was ");
|
||||
|
||||
switch(earlyData_status) {
|
||||
case WOLFSSL_EARLY_DATA_NOT_SENT:
|
||||
printf("not sent.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_REJECTED:
|
||||
printf("rejected.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_ACCEPTED:
|
||||
printf("accepted.\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown...\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void Usage(void)
|
||||
{
|
||||
int msgId = 0;
|
||||
|
10
src/ssl.c
10
src/ssl.c
@ -42976,16 +42976,6 @@ err:
|
||||
defined(WOLFSSL_HAPROXY)
|
||||
|
||||
#ifndef NO_SHA
|
||||
/* One shot SHA hash of message.
|
||||
*
|
||||
* Wrap SHA1 one shot
|
||||
*/
|
||||
unsigned char *wolfSSL_SHA(const unsigned char *d, size_t n,
|
||||
unsigned char *md)
|
||||
{
|
||||
return wolfSSL_SHA1(d, n, md);
|
||||
}
|
||||
|
||||
/* One shot SHA1 hash of message.
|
||||
*
|
||||
* d message to hash
|
||||
|
@ -4367,7 +4367,7 @@ struct WOLFSSL {
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
EarlyDataState earlyData;
|
||||
word32 earlyDataSz;
|
||||
word32 earlyDataStatus;
|
||||
byte earlyDataStatus;
|
||||
#endif
|
||||
#ifdef OPENSSL_ALL
|
||||
long verifyCallbackResult;
|
||||
|
@ -75,7 +75,7 @@ typedef WOLFSSL_SHA_CTX SHA_CTX;
|
||||
(defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION > 2))
|
||||
/* SHA is only available in non-fips mode or fips version > 2 mode
|
||||
* because of SHA enum in FIPS build. */
|
||||
#define SHA wolfSSL_SHA
|
||||
#define SHA wolfSSL_SHA1
|
||||
#endif
|
||||
|
||||
#define SHA1_Init wolfSSL_SHA1_Init
|
||||
|
@ -3638,7 +3638,6 @@ WOLFSSL_API void wolfSSL_set_verify_depth(WOLFSSL *ssl,int depth);
|
||||
WOLFSSL_API void* wolfSSL_get_app_data( const WOLFSSL *ssl);
|
||||
WOLFSSL_API int wolfSSL_set_app_data(WOLFSSL *ssl, void *arg);
|
||||
WOLFSSL_API WOLFSSL_ASN1_OBJECT * wolfSSL_X509_NAME_ENTRY_get_object(WOLFSSL_X509_NAME_ENTRY *ne);
|
||||
WOLFSSL_API unsigned char *wolfSSL_SHA(const unsigned char *d, size_t n, unsigned char *md);
|
||||
WOLFSSL_API unsigned char *wolfSSL_SHA1(const unsigned char *d, size_t n, unsigned char *md);
|
||||
WOLFSSL_API unsigned char *wolfSSL_SHA224(const unsigned char *d, size_t n, unsigned char *md);
|
||||
WOLFSSL_API unsigned char *wolfSSL_SHA256(const unsigned char *d, size_t n, unsigned char *md);
|
||||
|
@ -4088,4 +4088,30 @@ static WC_INLINE word16 GetRandomPort(void)
|
||||
return port;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
static WC_INLINE void EarlyDataStatus(WOLFSSL* ssl)
|
||||
{
|
||||
int earlyData_status;
|
||||
|
||||
earlyData_status = wolfSSL_get_early_data_status(ssl);
|
||||
if (earlyData_status < 0) return;
|
||||
|
||||
printf("Early Data was ");
|
||||
|
||||
switch(earlyData_status) {
|
||||
case WOLFSSL_EARLY_DATA_NOT_SENT:
|
||||
printf("not sent.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_REJECTED:
|
||||
printf("rejected.\n");
|
||||
break;
|
||||
case WOLFSSL_EARLY_DATA_ACCEPTED:
|
||||
printf("accepted\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown...\n");
|
||||
}
|
||||
}
|
||||
#endif /* WOLFSSL_EARLY_DATA */
|
||||
|
||||
#endif /* wolfSSL_TEST_H */
|
||||
|
Reference in New Issue
Block a user