Anon added to compatibility layer

This commit is contained in:
kaleb-himes
2015-01-05 11:21:40 -07:00
parent cf3ba3f0e8
commit dcbfae1c31
2 changed files with 10 additions and 9 deletions

View File

@ -58,8 +58,8 @@
#define CYASSL_BIO WOLFSSL_BIO
#define CYASSL_CIPHER WOLFSSL_CIPHER
#define CYASSL_MD4_CTX WOLFSSL_MD4_CTX
#define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9
#define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13
#define CYASSL_MFL_2_9 WOLFSSL_MFL_2_9 /**/
#define CYASSL_MFL_2_13 WOLFSSL_MFL_2_13 /**/
#define CYASSL_EVP_PKEY WOLFSSL_EVP_PKEY
#define CYASSL_X509_CRL WOLFSSL_X509_CRL
#define CYASSL_ASN1_TIME WOLFSSL_ASN1_TIME
@ -154,9 +154,7 @@
#define cyassl_chacha wolfssl_chacha
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
//#define wolfcrypt_test ctaocrypt_test
/* src/eys.c */
/* src/keys.c */
#define cyassl_triple_des wolfssl_triple_des
/* Initialization and Shutdown */
@ -270,6 +268,9 @@
#define CyaSSL_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*/
#define CyaSSL_get_error wolfSSL_get_error
#define CyaSSL_want_read wolfSSL_want_read

View File

@ -1889,10 +1889,10 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
#ifndef NO_CERTS
/* make sure server has cert and key unless using PSK or Anon */
if (ssl->options.side == WOLFSSL_SERVER_END && !havePSK
#ifdef HAVE_ANON
&& !haveAnon
#endif
)
#ifdef HAVE_ANON
&& !haveAnon
#endif
)
if (!ssl->buffers.certificate.buffer || !ssl->buffers.key.buffer) {
WOLFSSL_MSG("Server missing certificate and/or private key");
return NO_PRIVATE_KEY;