Added stubs for the set_msg_callback functions. Cleanup of the SSL_ST_* and SSL_CB_* enums.
This commit is contained in:
parent
7c7b1233f7
commit
fc6217e4f6
31
src/ssl.c
31
src/ssl.c
@ -21602,4 +21602,35 @@ int wolfSSL_AsyncPoll(WOLFSSL* ssl, WOLF_EVENT_FLAG flags)
|
||||
#endif /* WOLFSSL_ASYNC_CRYPT */
|
||||
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
int wolfSSL_CTX_set_msg_callback(WOLFSSL_CTX *ctx, SSL_Msg_Cb cb)
|
||||
{
|
||||
WOLFSSL_STUB("SSL_CTX_set_msg_callback");
|
||||
(void)ctx;
|
||||
(void)cb;
|
||||
return SSL_FAILURE;
|
||||
}
|
||||
int wolfSSL_set_msg_callback(WOLFSSL *ssl, SSL_Msg_Cb cb)
|
||||
{
|
||||
WOLFSSL_STUB("SSL_set_msg_callback");
|
||||
(void)ssl;
|
||||
(void)cb;
|
||||
return SSL_FAILURE;
|
||||
}
|
||||
int wolfSSL_CTX_set_msg_callback_arg(WOLFSSL_CTX *ctx, void* arg)
|
||||
{
|
||||
WOLFSSL_STUB("SSL_CTX_set_msg_callback_arg");
|
||||
(void)ctx;
|
||||
(void)arg;
|
||||
return SSL_FAILURE;
|
||||
}
|
||||
int wolfSSL_set_msg_callback_arg(WOLFSSL *ssl, void* arg)
|
||||
{
|
||||
WOLFSSL_STUB("SSL_set_msg_callback_arg");
|
||||
(void)ssl;
|
||||
(void)arg;
|
||||
return SSL_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WOLFCRYPT_ONLY */
|
||||
|
@ -476,7 +476,6 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX;
|
||||
#if defined(HAVE_LIGHTY) || defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(HAVE_STUNNEL)
|
||||
typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
|
||||
|
||||
#define SSL_CB_HANDSHAKE_START 0x10
|
||||
#define X509_NAME_free wolfSSL_X509_NAME_free
|
||||
#define SSL_CTX_use_certificate wolfSSL_CTX_use_certificate
|
||||
#define SSL_CTX_use_PrivateKey wolfSSL_CTX_use_PrivateKey
|
||||
@ -603,8 +602,6 @@ typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
|
||||
#ifdef HAVE_STUNNEL
|
||||
#include <wolfssl/openssl/asn1.h>
|
||||
|
||||
/* defined as: (SSL_ST_ACCEPT|SSL_CB_LOOP), which becomes 0x2001*/
|
||||
#define SSL_CB_ACCEPT_LOOP 0x2001
|
||||
#define SSL2_VERSION 0x0002
|
||||
#define SSL3_VERSION 0x0300
|
||||
#define TLS1_VERSION 0x0301
|
||||
@ -681,6 +678,13 @@ typedef WOLFSSL_ASN1_BIT_STRING ASN1_BIT_STRING;
|
||||
#define NID_inhibit_any_policy 168 /* 2.5.29.54 */
|
||||
#define NID_tlsfeature 92 /* id-pe 24 */
|
||||
|
||||
|
||||
#define SSL_CTX_set_msg_callback wolfSSL_CTX_set_msg_callback
|
||||
#define SSL_set_msg_callback wolfSSL_set_msg_callback
|
||||
#define SSL_CTX_set_msg_callback_arg wolfSSL_CTX_set_msg_callback_arg
|
||||
#define SSL_set_msg_callback_arg wolfSSL_set_msg_callback_arg
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
@ -800,15 +800,22 @@ enum {
|
||||
|
||||
EVP_R_BAD_DECRYPT = 2,
|
||||
|
||||
SSL_CB_LOOP = 4,
|
||||
SSL_ST_CONNECT = 5,
|
||||
SSL_ST_ACCEPT = 6,
|
||||
SSL_CB_ALERT = 7,
|
||||
SSL_CB_READ = 8,
|
||||
SSL_CB_HANDSHAKE_DONE = 9,
|
||||
/* additional SSL_CB_* enums not used in wolfSSL */
|
||||
SSL_CB_HANDSHAKE_START,
|
||||
SSL_CB_EXIT,
|
||||
SSL_ST_CONNECT = 0x1000,
|
||||
SSL_ST_ACCEPT = 0x2000,
|
||||
|
||||
SSL_CB_LOOP = 0x01,
|
||||
SSL_CB_EXIT = 0x02,
|
||||
SSL_CB_READ = 0x04,
|
||||
SSL_CB_WRITE = 0x08,
|
||||
SSL_CB_HANDSHAKE_START = 0x10,
|
||||
SSL_CB_HANDSHAKE_DONE = 0x20,
|
||||
SSL_CB_ALERT = 0x4000,
|
||||
SSL_CB_READ_ALERT = (SSL_CB_ALERT | SSL_CB_READ),
|
||||
SSL_CB_WRITE_ALERT = (SSL_CB_ALERT | SSL_CB_WRITE),
|
||||
SSL_CB_ACCEPT_LOOP = (SSL_ST_ACCEPT | SSL_CB_LOOP),
|
||||
SSL_CB_ACCEPT_EXIT = (SSL_ST_ACCEPT | SSL_CB_EXIT),
|
||||
SSL_CB_CONNECT_LOOP = (SSL_ST_CONNECT | SSL_CB_LOOP),
|
||||
SSL_CB_CONNECT_EXIT = (SSL_ST_CONNECT | SSL_CB_EXIT),
|
||||
|
||||
SSL_MODE_ENABLE_PARTIAL_WRITE = 2,
|
||||
|
||||
@ -2173,6 +2180,16 @@ WOLFSSL_API int wolfSSL_CTX_AsyncPoll(WOLFSSL_CTX* ctx, WOLF_EVENT** events, int
|
||||
WOLF_EVENT_FLAG flags, int* eventCount);
|
||||
#endif /* WOLFSSL_ASYNC_CRYPT */
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
typedef void (*SSL_Msg_Cb)(int write_p, int version, int content_type,
|
||||
const void *buf, size_t len, WOLFSSL *ssl, void *arg);
|
||||
|
||||
WOLFSSL_API int wolfSSL_CTX_set_msg_callback(WOLFSSL_CTX *ctx, SSL_Msg_Cb cb);
|
||||
WOLFSSL_API int wolfSSL_set_msg_callback(WOLFSSL *ssl, SSL_Msg_Cb cb);
|
||||
WOLFSSL_API int wolfSSL_CTX_set_msg_callback_arg(WOLFSSL_CTX *ctx, void* arg);
|
||||
WOLFSSL_API int wolfSSL_set_msg_callback_arg(WOLFSSL *ssl, void* arg);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
Loading…
x
Reference in New Issue
Block a user