asio: option to use wolfSSL as TLS stack for ASIO

Plus other minor update, make openssl aware of current modes (SSL_set_mode)
Update coding style in examples and tests, including copyright notices
This commit is contained in:
David Cermak
2020-06-05 17:17:55 +02:00
committed by bot
parent 213bbe51fc
commit 1c8171c3e8
32 changed files with 359 additions and 113 deletions

View File

@@ -23,6 +23,10 @@
#include "tls1.h"
#include "x509_vfy.h"
/* Used in SSL_set_mode() -- supported mode when using BIO */
#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001L
#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
# define SSL_SENT_SHUTDOWN 1
# define SSL_RECEIVED_SHUTDOWN 2

View File

@@ -21,6 +21,7 @@
#include "ssl_code.h"
#include <stddef.h>
#include <stdint.h>
typedef void SSL_CIPHER;
@@ -256,7 +257,7 @@ struct ssl_st
X509_VERIFY_PARAM param;
int err;
uint32_t mode;
void (*info_callback) (const SSL *ssl, int type, int val);

View File

@@ -22,8 +22,8 @@ extern "C" {
#endif
/**
* @note This file contains a very simple implementation of error stack provided
* OpenSSL library. It is OFF by default.
* @note This file contains a very simple implementation of error stack
* for ESP APIs stubs to OpenSSL
*/
#define OPENSSL_PUT_SYSTEM_ERROR() \

View File

@@ -22,7 +22,7 @@
#include "internal/ssl_x509.h"
#include "internal/ssl_pkey.h"
#include "openssl/bio.h"
#include "openssl/openssl_err.h"
#include "openssl/err.h"
/*
{
@@ -1888,6 +1888,15 @@ openssl_verify_callback SSL_get_verify_callback(const SSL *s);
*/
void RSA_free(RSA *r);
/**
* @brief Sets SSL mode, partially implemented
*
* @param ssl SSL context
*
* @return the new mode bitmask after adding mode
*/
uint32_t SSL_set_mode(SSL *ssl, uint32_t mode);
#ifdef __cplusplus
}
#endif