forked from wolfSSL/wolfssl
Anon added to compatibility layer
This commit is contained in:
11
cyassl/ssl.h
11
cyassl/ssl.h
@ -58,8 +58,8 @@
|
|||||||
#define CYASSL_BIO WOLFSSL_BIO
|
#define CYASSL_BIO WOLFSSL_BIO
|
||||||
#define CYASSL_CIPHER WOLFSSL_CIPHER
|
#define CYASSL_CIPHER WOLFSSL_CIPHER
|
||||||
#define CYASSL_MD4_CTX WOLFSSL_MD4_CTX
|
#define CYASSL_MD4_CTX WOLFSSL_MD4_CTX
|
||||||
#define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9
|
#define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9 /**/
|
||||||
#define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13
|
#define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13 /**/
|
||||||
#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
|
#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
|
||||||
#define CYASSL_X509_CRL WOLFSSL_X509_CRL
|
#define CYASSL_X509_CRL WOLFSSL_X509_CRL
|
||||||
#define CYASSL_ASN1_TIME WOLFSSL_ASN1_TIME
|
#define CYASSL_ASN1_TIME WOLFSSL_ASN1_TIME
|
||||||
@ -154,9 +154,7 @@
|
|||||||
#define cyassl_chacha wolfssl_chacha
|
#define cyassl_chacha wolfssl_chacha
|
||||||
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
||||||
|
|
||||||
//#define wolfcrypt_test ctaocrypt_test
|
/* src/keys.c */
|
||||||
|
|
||||||
/* src/eys.c */
|
|
||||||
#define cyassl_triple_des wolfssl_triple_des
|
#define cyassl_triple_des wolfssl_triple_des
|
||||||
|
|
||||||
/* Initialization and Shutdown */
|
/* Initialization and Shutdown */
|
||||||
@ -270,6 +268,9 @@
|
|||||||
#define CyaSSL_CTX_set_psk_server_callback \
|
#define CyaSSL_CTX_set_psk_server_callback \
|
||||||
wolfSSL_CTX_set_psk_server_callback /**/
|
wolfSSL_CTX_set_psk_server_callback /**/
|
||||||
|
|
||||||
|
/* Anonymous */
|
||||||
|
#define CyaSSL_CTX_allow_anon_cipher wolfSSL_CTX_allow_anon_cipher
|
||||||
|
|
||||||
/* Error Handling and Debugging*/
|
/* Error Handling and Debugging*/
|
||||||
#define CyaSSL_get_error wolfSSL_get_error
|
#define CyaSSL_get_error wolfSSL_get_error
|
||||||
#define CyaSSL_want_read wolfSSL_want_read
|
#define CyaSSL_want_read wolfSSL_want_read
|
||||||
|
@ -1889,10 +1889,10 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
|
|||||||
#ifndef NO_CERTS
|
#ifndef NO_CERTS
|
||||||
/* make sure server has cert and key unless using PSK or Anon */
|
/* make sure server has cert and key unless using PSK or Anon */
|
||||||
if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK
|
if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK
|
||||||
#ifdef HAVE_ANON
|
#ifdef HAVE_ANON
|
||||||
&& !haveAnon
|
&& !haveAnon
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) {
|
if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) {
|
||||||
WOLFSSL_MSG("Server missing certificate and/or private key");
|
WOLFSSL_MSG("Server missing certificate and/or private key");
|
||||||
return NO_PRIVATE_KEY;
|
return NO_PRIVATE_KEY;
|
||||||
|
Reference in New Issue
Block a user