33#include <wolfssl/wolfcrypt/settings.h>
34#include <wolfssl/version.h>
40 #include <wolfssl/wolfcrypt/wolfevent.h>
44#include <wolfssl/callbacks.h>
47 #include "prefix_ssl.h"
50#ifdef LIBWOLFSSL_VERSION_STRING
51 #define WOLFSSL_VERSION LIBWOLFSSL_VERSION_STRING
62 #ifdef TEST_OPENSSL_COEXIST
68 #include <openssl/ssl.h>
69 #include <openssl/rand.h>
70 #include <openssl/err.h>
71 #include <openssl/ec.h>
72 #include <openssl/hmac.h>
77 #ifndef NO_OLD_SSL_NAMES
78 #define NO_OLD_SSL_NAMES
80 #ifndef NO_OLD_WC_NAMES
81 #define NO_OLD_WC_NAMES
84#elif (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
86 #include <wolfssl/openssl/hmac.h>
89 #ifdef NO_OLD_SSL_NAMES
90 #undef NO_OLD_SSL_NAMES
92 #ifdef NO_OLD_WC_NAMES
93 #undef NO_OLD_WC_NAMES
101#ifndef WOLFSSL_WOLFSSL_TYPE_DEFINED
102#define WOLFSSL_WOLFSSL_TYPE_DEFINED
107#ifndef WOLFSSL_WOLFSSL_CTX_TYPE_DEFINED
108#define WOLFSSL_WOLFSSL_CTX_TYPE_DEFINED
119typedef struct WC_PKCS12 WOLFSSL_X509_PKCS12;
130#define WOLFSSL_TYPES_DEFINED
135#ifndef WOLFSSL_RSA_TYPE_DEFINED
137#define WOLFSSL_RSA_TYPE_DEFINED
140#ifndef WC_RNG_TYPE_DEFINED
142 #define WC_RNG_TYPE_DEFINED
145#ifndef WOLFSSL_DSA_TYPE_DEFINED
147#define WOLFSSL_DSA_TYPE_DEFINED
150#ifndef WOLFSSL_EC_TYPE_DEFINED
157#define WOLFSSL_EC_TYPE_DEFINED
160#ifndef WOLFSSL_ECDSA_TYPE_DEFINED
162#define WOLFSSL_ECDSA_TYPE_DEFINED
174typedef struct WOLFSSL_CONF_VALUE WOLFSSL_CONF_VALUE;
181typedef struct WOLFSSL_dynlock_value WOLFSSL_dynlock_value;
182#ifndef WOLFSSL_DH_TYPE_DEFINED
184#define WOLFSSL_DH_TYPE_DEFINED
194#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA)
209#define WOLFSSL_ASN1_UTCTIME WOLFSSL_ASN1_TIME
210#define WOLFSSL_ASN1_GENERALIZEDTIME WOLFSSL_ASN1_TIME
213 char strData[CTC_NAME_SIZE];
218 unsigned int isDynamic:1;
221#define WOLFSSL_MAX_SNAME 40
224#define WOLFSSL_ASN1_DYNAMIC 0x1
225#define WOLFSSL_ASN1_DYNAMIC_DATA 0x2
266 const unsigned char* obj;
268 char sName[WOLFSSL_MAX_SNAME];
273#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) || defined(WOLFSSL_APACHE_HTTPD)
277 unsigned char dynamic;
279#if defined(WOLFSSL_APACHE_HTTPD)
287#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
308 WOLFSSL_ASN1_UTCTIME* utctime;
309 WOLFSSL_ASN1_GENERALIZEDTIME* generalizedtime;
322 wolfSSL_Mutex refMutex;
327 #if (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
351#ifndef WOLFSSL_EVP_TYPE_DEFINED
354typedef char WOLFSSL_EVP_MD;
355#define WOLFSSL_EVP_TYPE_DEFINED
374#define WOLFSSL_EVP_PKEY_DEFAULT EVP_PKEY_RSA
376#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
377 #define wolfSSL_SSL_MODE_RELEASE_BUFFERS 0x00000010U
378 #define wolfSSL_SSL_CTRL_SET_TMP_ECDH 4
394 WOLFSSL_BIO_BUFFER = 1,
395 WOLFSSL_BIO_SOCKET = 2,
397 WOLFSSL_BIO_MEMORY = 4,
399 WOLFSSL_BIO_FILE = 6,
400 WOLFSSL_BIO_BASE64 = 7,
405 WOLFSSL_BIO_FLAG_BASE64_NO_NL = 0x01,
406 WOLFSSL_BIO_FLAG_READ = 0x02,
407 WOLFSSL_BIO_FLAG_WRITE = 0x04,
408 WOLFSSL_BIO_FLAG_IO_SPECIAL = 0x08,
409 WOLFSSL_BIO_FLAG_RETRY = 0x10
413 WOLFSSL_BIO_CB_FREE = 0x01,
414 WOLFSSL_BIO_CB_READ = 0x02,
415 WOLFSSL_BIO_CB_WRITE = 0x03,
416 WOLFSSL_BIO_CB_PUTS = 0x04,
417 WOLFSSL_BIO_CB_GETS = 0x05,
418 WOLFSSL_BIO_CB_CTRL = 0x06,
419 WOLFSSL_BIO_CB_RETURN = 0x80
429typedef int (*wolfSSL_BIO_meth_write_cb)(
WOLFSSL_BIO*,
const char*, int);
430typedef int (*wolfSSL_BIO_meth_read_cb)(
WOLFSSL_BIO *,
char *, int);
431typedef int (*wolfSSL_BIO_meth_puts_cb)(
WOLFSSL_BIO*,
const char*);
432typedef int (*wolfSSL_BIO_meth_gets_cb)(
WOLFSSL_BIO*,
char*, int);
433typedef long (*wolfSSL_BIO_meth_ctrl_get_cb)(
WOLFSSL_BIO*, int, long,
void*);
434typedef int (*wolfSSL_BIO_meth_create_cb)(
WOLFSSL_BIO*);
435typedef int (*wolfSSL_BIO_meth_destroy_cb)(
WOLFSSL_BIO*);
437typedef int wolfSSL_BIO_info_cb(
WOLFSSL_BIO *,
int,
int);
438typedef long (*wolfssl_BIO_meth_ctrl_info_cb)(
WOLFSSL_BIO*, int, wolfSSL_BIO_info_cb*);
441#ifndef MAX_BIO_METHOD_NAME
442#define MAX_BIO_METHOD_NAME 256
446 char name[MAX_BIO_METHOD_NAME];
447 wolfSSL_BIO_meth_write_cb writeCb;
448 wolfSSL_BIO_meth_read_cb readCb;
449 wolfSSL_BIO_meth_puts_cb putsCb;
450 wolfSSL_BIO_meth_gets_cb getsCb;
451 wolfSSL_BIO_meth_ctrl_get_cb ctrlCb;
452 wolfSSL_BIO_meth_create_cb createCb;
453 wolfSSL_BIO_meth_destroy_cb freeCb;
454 wolfssl_BIO_meth_ctrl_info_cb ctrlInfoCb;
458typedef long (*wolf_bio_info_cb)(
WOLFSSL_BIO *bio,
int event,
const char *parg,
459 int iarg,
long larg,
long return_value);
471 wolf_bio_info_cb infoCb;
483 WOLFSSL_CRYPTO_EX_DATA ex_data;
513#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
514 WOLFSSL_X509_STORE_CTX_verify_cb verify_cb;
517 WOLFSSL_CRYPTO_EX_DATA ex_data;
519#if defined(OPENSSL_EXTRA) && defined(HAVE_CRL)
525#define WOLFSSL_USE_CHECK_TIME 0x2
526#define WOLFSSL_NO_CHECK_TIME 0x200000
527#define WOLFSSL_NO_WILDCARDS 0x4
528#define WOLFSSL_HOST_NAME_MAX 256
529#define WOLFSSL_MAX_IPSTR 46
533 char hostName[WOLFSSL_HOST_NAME_MAX];
534 unsigned int hostFlags;
535 char ipasc[WOLFSSL_MAX_IPSTR];
562#define WOLFSSL_ASN1_BOOLEAN int
565 unsigned char* buffer;
581#if defined(HAVE_EX_DATA) || defined(FORTRESS)
582 WOLFSSL_CRYPTO_EX_DATA ex_data;
584#if defined(WOLFSSL_APACHE_HTTPD) || defined(OPENSSL_EXTRA)
590 int discardSessionCerts;
593 WOLFSSL_X509_STORE_CTX_verify_cb verify_cb;
596typedef char* WOLFSSL_STRING;
603 unexpected_message = 10,
605 record_overflow = 22,
606 decompression_failure = 30,
607 handshake_failure = 40,
609 bad_certificate = 42,
610 unsupported_certificate = 43,
611 certificate_revoked = 44,
612 certificate_expired = 45,
613 certificate_unknown = 46,
614 illegal_parameter = 47,
618 #ifdef WOLFSSL_MYSQL_COMPATIBLE
620 wc_protocol_version = 70,
622 protocol_version = 70,
624 inappropriate_fallback = 86,
625 no_renegotiation = 100,
626 missing_extension = 109,
632 no_application_protocol = 120
642#define WOLFSSL_MAX_MASTER_KEY_LENGTH 48
644#define WOLFSSL_MAX_GROUP_COUNT 10
646#if defined(HAVE_SECRET_CALLBACK) && defined(WOLFSSL_TLS13)
648 CLIENT_EARLY_TRAFFIC_SECRET,
649 CLIENT_HANDSHAKE_TRAFFIC_SECRET,
650 SERVER_HANDSHAKE_TRAFFIC_SECRET,
651 CLIENT_TRAFFIC_SECRET,
652 SERVER_TRAFFIC_SECRET,
653 EARLY_EXPORTER_SECRET,
665WOLFSSL_API
WOLFSSL_METHOD *wolfSSLv3_server_method_ex(
void* heap);
666WOLFSSL_API
WOLFSSL_METHOD *wolfSSLv3_client_method_ex(
void* heap);
668WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_server_method_ex(
void* heap);
669WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_client_method_ex(
void* heap);
671WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_1_server_method_ex(
void* heap);
672WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_1_client_method_ex(
void* heap);
674WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_2_server_method_ex(
void* heap);
675WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_2_client_method_ex(
void* heap);
678 WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_3_server_method_ex(
void* heap);
679 WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_3_client_method_ex(
void* heap);
683WOLFSSL_API
WOLFSSL_METHOD *wolfSSLv23_server_method_ex(
void* heap);
684WOLFSSL_API
WOLFSSL_METHOD *wolfSSLv23_client_method_ex(
void* heap);
688 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLS_client_method_ex(
void* heap);
689 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLS_server_method_ex(
void* heap);
691 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLSv1_client_method_ex(
void* heap);
692 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLSv1_server_method_ex(
void* heap);
694 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLSv1_2_client_method_ex(
void* heap);
695 WOLFSSL_API
WOLFSSL_METHOD *wolfDTLSv1_2_server_method_ex(
void* heap);
717 WOLFSSL_ABI WOLFSSL_API
WOLFSSL_METHOD *wolfTLSv1_3_client_method(
void);
736#ifdef WOLFSSL_SESSION_EXPORT
739#ifndef WOLFSSL_DTLS_EXPORT_TYPES
740typedef int (*wc_dtls_export)(
WOLFSSL* ssl,
741 unsigned char* exportBuffer,
unsigned int sz,
void* userCtx);
742#define WOLFSSL_DTLS_EXPORT_TYPES
745WOLFSSL_API
int wolfSSL_dtls_import(
WOLFSSL* ssl,
unsigned char* buf,
747WOLFSSL_API
int wolfSSL_CTX_dtls_set_export(
WOLFSSL_CTX* ctx,
748 wc_dtls_export func);
749WOLFSSL_API
int wolfSSL_dtls_set_export(
WOLFSSL* ssl, wc_dtls_export func);
750WOLFSSL_API
int wolfSSL_dtls_export(
WOLFSSL* ssl,
unsigned char* buf,
752WOLFSSL_API
int wolfSSL_dtls_export_state_only(
WOLFSSL* ssl,
unsigned char* buf,
757#ifdef WOLFSSL_STATIC_MEMORY
758#ifndef WOLFSSL_MEM_GUARD
759#define WOLFSSL_MEM_GUARD
763WOLFSSL_API
int wolfSSL_CTX_load_static_memory(
WOLFSSL_CTX** ctx,
764 wolfSSL_method_func method,
765 unsigned char* buf,
unsigned int sz,
767WOLFSSL_API
int wolfSSL_CTX_is_static_memory(
WOLFSSL_CTX* ctx,
769WOLFSSL_API
int wolfSSL_is_static_memory(
WOLFSSL* ssl,
773#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
783#define WOLFSSL_LOAD_FLAG_NONE 0x00000000
784#define WOLFSSL_LOAD_FLAG_IGNORE_ERR 0x00000001
785#define WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY 0x00000002
786#define WOLFSSL_LOAD_FLAG_PEM_CA_ONLY 0x00000004
788#ifndef WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS
789#define WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS WOLFSSL_LOAD_FLAG_NONE
793#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
796 const char*,
unsigned int);
798 const char*,
const char*);
799#ifdef WOLFSSL_TRUST_PEER_CERT
804WOLFSSL_API
int wolfSSL_CTX_use_certificate_chain_file_format(
WOLFSSL_CTX *,
805 const char *file,
int format);
810WOLFSSL_API
void wolfSSL_CTX_set_verify_depth(
WOLFSSL_CTX *ctx,
int depth);
817WOLFSSL_API
int wolfSSL_use_certificate_chain_file_format(
WOLFSSL*,
818 const char *file,
int format);
821#ifdef WOLFSSL_DER_LOAD
841WOLFSSL_API
int wolfSSL_is_server(
WOLFSSL*);
844WOLFSSL_API
int wolfSSL_set_write_fd (
WOLFSSL*,
int);
845WOLFSSL_API
int wolfSSL_set_read_fd (
WOLFSSL*,
int);
849WOLFSSL_API
int wolfSSL_get_ciphers_iana(
char*,
int);
851WOLFSSL_API
const char* wolfSSL_get_cipher_name_from_suite(
const unsigned char,
852 const unsigned char);
853WOLFSSL_API
const char* wolfSSL_get_cipher_name_iana_from_suite(
854 const unsigned char,
const unsigned char);
855WOLFSSL_API
const char* wolfSSL_get_shared_ciphers(
WOLFSSL* ssl,
char* buf,
857WOLFSSL_API
const char* wolfSSL_get_curve_name(
WOLFSSL* ssl);
860WOLFSSL_ABI WOLFSSL_API
int wolfSSL_connect(
WOLFSSL*);
865WOLFSSL_API
int wolfSSL_CTX_mutual_auth(
WOLFSSL_CTX* ctx,
int req);
866WOLFSSL_API
int wolfSSL_mutual_auth(
WOLFSSL* ssl,
int req);
868WOLFSSL_API
int wolfSSL_send_hrr_cookie(
WOLFSSL* ssl,
869 const unsigned char* secret,
unsigned int secretSz);
870WOLFSSL_API
int wolfSSL_CTX_no_ticket_TLSv13(
WOLFSSL_CTX* ctx);
871WOLFSSL_API
int wolfSSL_no_ticket_TLSv13(
WOLFSSL* ssl);
872WOLFSSL_API
int wolfSSL_CTX_no_dhe_psk(
WOLFSSL_CTX* ctx);
873WOLFSSL_API
int wolfSSL_no_dhe_psk(
WOLFSSL* ssl);
874WOLFSSL_API
int wolfSSL_update_keys(
WOLFSSL* ssl);
875WOLFSSL_API
int wolfSSL_CTX_allow_post_handshake_auth(
WOLFSSL_CTX* ctx);
876WOLFSSL_API
int wolfSSL_allow_post_handshake_auth(
WOLFSSL* ssl);
877WOLFSSL_API
int wolfSSL_request_certificate(
WOLFSSL* ssl);
879WOLFSSL_API
int wolfSSL_CTX_set1_groups_list(
WOLFSSL_CTX *ctx,
char *list);
880WOLFSSL_API
int wolfSSL_set1_groups_list(
WOLFSSL *ssl,
char *list);
882WOLFSSL_API
int wolfSSL_preferred_group(
WOLFSSL* ssl);
883WOLFSSL_API
int wolfSSL_CTX_set_groups(
WOLFSSL_CTX* ctx,
int* groups,
885WOLFSSL_API
int wolfSSL_set_groups(
WOLFSSL* ssl,
int* groups,
int count);
887WOLFSSL_API
int wolfSSL_connect_TLSv13(
WOLFSSL*);
888WOLFSSL_API
int wolfSSL_accept_TLSv13(
WOLFSSL*);
890#ifdef WOLFSSL_EARLY_DATA
891WOLFSSL_API
int wolfSSL_CTX_set_max_early_data(
WOLFSSL_CTX* ctx,
893WOLFSSL_API
int wolfSSL_set_max_early_data(
WOLFSSL* ssl,
unsigned int sz);
894WOLFSSL_API
int wolfSSL_write_early_data(
WOLFSSL*,
const void*,
int,
int*);
895WOLFSSL_API
int wolfSSL_read_early_data(
WOLFSSL*,
void*,
int,
int*);
904WOLFSSL_API
void wolfSSL_CTX_set_quiet_shutdown(
WOLFSSL_CTX*,
int);
905WOLFSSL_API
void wolfSSL_set_quiet_shutdown(
WOLFSSL*,
int);
911WOLFSSL_API
long wolfSSL_SSL_SESSION_set_timeout(
WOLFSSL_SESSION*,
long);
916#if defined(OPENSSL_ALL) || defined(WOLFSSL_ASIO) || defined(WOLFSSL_HAPROXY) \
917 || defined(WOLFSSL_NGINX)
918WOLFSSL_API
int wolfSSL_BIO_new_bio_pair(
WOLFSSL_BIO**,
size_t,
921WOLFSSL_API
int wolfSSL_RSA_padding_add_PKCS1_PSS(
WOLFSSL_RSA *rsa,
unsigned char *EM,
922 const unsigned char *mHash,
923 const WOLFSSL_EVP_MD *
Hash,
int saltLen);
924WOLFSSL_API
int wolfSSL_RSA_verify_PKCS1_PSS(
WOLFSSL_RSA *rsa,
const unsigned char *mHash,
925 const WOLFSSL_EVP_MD *hashAlg,
926 const unsigned char *EM,
int saltLen);
928WOLFSSL_API
int wolfSSL_CTX_use_certificate_ASN1(
WOLFSSL_CTX*,
929 int,
const unsigned char*);
939#if defined(SESSION_CERTS)
946typedef void (CallbackInfoState)(
const WOLFSSL*, int, int);
948#if defined(HAVE_EX_DATA) || defined(FORTRESS)
949typedef int (WOLFSSL_CRYPTO_EX_new)(
void* p,
void* ptr,
950 WOLFSSL_CRYPTO_EX_DATA* a,
int idx,
long argValue,
void* arg);
951typedef int (WOLFSSL_CRYPTO_EX_dup)(WOLFSSL_CRYPTO_EX_DATA* out,
952 WOLFSSL_CRYPTO_EX_DATA* in,
void* inPtr,
int idx,
long argV,
void* arg);
953typedef void (WOLFSSL_CRYPTO_EX_free)(
void* p,
void* ptr,
954 WOLFSSL_CRYPTO_EX_DATA* a,
int idx,
long argValue,
void* arg);
956WOLFSSL_API
int wolfSSL_get_ex_new_index(
long argValue,
void* arg,
957 WOLFSSL_CRYPTO_EX_new* a, WOLFSSL_CRYPTO_EX_dup* b,
958 WOLFSSL_CRYPTO_EX_free* c);
962 VerifyCallback verify_callback);
966WOLFSSL_API
void wolfSSL_CTX_set_cert_verify_callback(
WOLFSSL_CTX* ctx,
967 CertVerifyCallback cb,
void* arg);
971WOLFSSL_API
void wolfSSL_set_verify_result(
WOLFSSL*,
long);
981#ifdef HAVE_SECRET_CALLBACK
982typedef int (*SessionSecretCb)(
WOLFSSL* ssl,
void* secret,
int* secretSz,
984WOLFSSL_API
int wolfSSL_set_session_secret_cb(
WOLFSSL*, SessionSecretCb,
987typedef int (*Tls13SecretCb)(
WOLFSSL* ssl,
int id,
const unsigned char* secret,
988 int secretSz,
void* ctx);
989WOLFSSL_API
int wolfSSL_set_tls13_secret_cb(
WOLFSSL*, Tls13SecretCb,
void*);
1012WOLFSSL_API
void wolfSSL_dtls_set_using_nonblock(
WOLFSSL*,
int);
1013WOLFSSL_API
int wolfSSL_dtls_get_using_nonblock(
WOLFSSL*);
1014#define wolfSSL_set_using_nonblock wolfSSL_dtls_set_using_nonblock
1015#define wolfSSL_get_using_nonblock wolfSSL_dtls_get_using_nonblock
1017WOLFSSL_API
int wolfSSL_dtls_get_current_timeout(
WOLFSSL* ssl);
1018WOLFSSL_API
int wolfSSL_DTLSv1_get_timeout(
WOLFSSL* ssl,
1020WOLFSSL_API
void wolfSSL_DTLSv1_set_initial_timeout_duration(
WOLFSSL* ssl,
1021 word32 duration_ms);
1022WOLFSSL_API
int wolfSSL_DTLSv1_handle_timeout(
WOLFSSL* ssl);
1025WOLFSSL_API
int wolfSSL_dtls_set_timeout_max(
WOLFSSL* ssl,
int);
1026WOLFSSL_API
int wolfSSL_dtls_got_timeout(
WOLFSSL* ssl);
1027WOLFSSL_API
int wolfSSL_dtls_retransmit(
WOLFSSL*);
1028WOLFSSL_API
int wolfSSL_dtls(
WOLFSSL* ssl);
1030WOLFSSL_API
int wolfSSL_dtls_set_peer(
WOLFSSL*,
void*,
unsigned int);
1031WOLFSSL_API
int wolfSSL_dtls_get_peer(
WOLFSSL*,
void*,
unsigned int*);
1033WOLFSSL_API
int wolfSSL_CTX_dtls_set_sctp(
WOLFSSL_CTX*);
1034WOLFSSL_API
int wolfSSL_dtls_set_sctp(
WOLFSSL*);
1035WOLFSSL_API
int wolfSSL_CTX_dtls_set_mtu(
WOLFSSL_CTX*,
unsigned short);
1036WOLFSSL_API
int wolfSSL_dtls_set_mtu(
WOLFSSL*,
unsigned short);
1038WOLFSSL_API
int wolfSSL_dtls_get_drop_stats(
WOLFSSL*,
1039 unsigned int*,
unsigned int*);
1040WOLFSSL_API
int wolfSSL_CTX_mcast_set_member_id(
WOLFSSL_CTX*,
unsigned short);
1041WOLFSSL_API
int wolfSSL_set_secret(
WOLFSSL*,
unsigned short,
1042 const unsigned char*,
unsigned int,
1043 const unsigned char*,
const unsigned char*,
1044 const unsigned char*);
1045WOLFSSL_API
int wolfSSL_mcast_read(
WOLFSSL*,
unsigned short*,
void*,
int);
1046WOLFSSL_API
int wolfSSL_mcast_peer_add(
WOLFSSL*,
unsigned short,
int);
1047WOLFSSL_API
int wolfSSL_mcast_peer_known(
WOLFSSL*,
unsigned short);
1048WOLFSSL_API
int wolfSSL_mcast_get_max_peers(
void);
1049typedef int (*CallbackMcastHighwater)(
unsigned short peerId,
1050 unsigned int maxSeq,
1051 unsigned int curSeq,
void* ctx);
1052WOLFSSL_API
int wolfSSL_CTX_mcast_set_highwater_cb(
WOLFSSL_CTX*,
1056 CallbackMcastHighwater);
1057WOLFSSL_API
int wolfSSL_mcast_set_highwater_ctx(
WOLFSSL*,
void*);
1059WOLFSSL_API
int wolfSSL_ERR_GET_LIB(
unsigned long err);
1060WOLFSSL_API
int wolfSSL_ERR_GET_REASON(
unsigned long err);
1064WOLFSSL_API
const char* wolfSSL_ERR_reason_error_string(
unsigned long);
1070typedef int WOLFSSL_LHASH;
1071#ifndef WOLF_LHASH_OF
1072 #define WOLF_LHASH_OF(x) WOLFSSL_LHASH
1075#ifndef WOLF_STACK_OF
1076 #define WOLF_STACK_OF(x) WOLFSSL_STACK
1078#ifndef DECLARE_STACK_OF
1079 #define DECLARE_STACK_OF(x) WOLF_STACK_OF(x);
1087WOLFSSL_API
int wolfSSL_sk_push(
WOLFSSL_STACK *st,
const void *data);
1089#if defined(HAVE_OCSP)
1090#include "wolfssl/ocsp.h"
1094#if defined(OPENSSL_ALL) || defined(WOLFSSL_QT)
1095WOLFSSL_API
int wolfSSL_sk_ACCESS_DESCRIPTION_push(
1113WOLFSSL_API
int wolfSSL_sk_GENERAL_NAME_num(
WOLFSSL_STACK* sk);
1114WOLFSSL_API
void wolfSSL_sk_GENERAL_NAME_pop_free(
WOLFSSL_STACK* sk,
1116WOLFSSL_API
void wolfSSL_sk_GENERAL_NAME_free(
WOLFSSL_STACK* sk);
1117WOLFSSL_API
void wolfSSL_GENERAL_NAMES_free(WOLFSSL_GENERAL_NAMES* name);
1118WOLFSSL_API
int wolfSSL_sk_ACCESS_DESCRIPTION_num(
WOLFSSL_STACK* sk);
1119WOLFSSL_API
void wolfSSL_AUTHORITY_INFO_ACCESS_free(
1123WOLFSSL_API
void wolfSSL_sk_ACCESS_DESCRIPTION_free(
WOLFSSL_STACK* sk);
1124WOLFSSL_API
void wolfSSL_sk_ACCESS_DESCRIPTION_pop_free(
WOLFSSL_STACK* sk,
1127WOLFSSL_API
void wolfSSL_sk_X509_EXTENSION_pop_free(
1134WOLFSSL_API
int wolfSSL_sk_ASN1_OBJECT_push(
WOLF_STACK_OF(WOLFSSL_ASN1_OBJEXT)* sk,
1139WOLFSSL_API
void wolfSSL_sk_ASN1_OBJECT_pop_free(
1146WOLFSSL_API
int wolfSSL_set_ex_data(
WOLFSSL*,
int,
void*);
1148WOLFSSL_API
int wolfSSL_set_rfd(
WOLFSSL*,
int);
1149WOLFSSL_API
int wolfSSL_set_wfd(
WOLFSSL*,
int);
1150WOLFSSL_API
void wolfSSL_set_shutdown(
WOLFSSL*,
int);
1151WOLFSSL_API
int wolfSSL_set_session_id_context(
WOLFSSL*,
const unsigned char*,
1153WOLFSSL_API
void wolfSSL_set_connect_state(
WOLFSSL*);
1154WOLFSSL_API
void wolfSSL_set_accept_state(
WOLFSSL*);
1163WOLFSSL_API
char* wolfSSL_CIPHER_description(
const WOLFSSL_CIPHER*,
char*,
int);
1165WOLFSSL_API
const char* wolfSSL_CIPHER_get_version(
const WOLFSSL_CIPHER* cipher);
1166WOLFSSL_API word32 wolfSSL_CIPHER_get_id(
const WOLFSSL_CIPHER* cipher);
1167WOLFSSL_API
const WOLFSSL_CIPHER* wolfSSL_get_cipher_by_value(word16 value);
1168WOLFSSL_API
const char* wolfSSL_SESSION_CIPHER_get_name(
WOLFSSL_SESSION* session);
1175#if defined(OPENSSL_EXTRA_X509_SMALL) || defined(OPENSSL_ALL)
1176WOLFSSL_API
int wolfSSL_RSA_up_ref(
WOLFSSL_RSA* rsa);
1177WOLFSSL_API
int wolfSSL_X509_up_ref(
WOLFSSL_X509* x509);
1181WOLFSSL_API
int wolfSSL_OCSP_parse_url(
char* url,
char** host,
char** port,
1182 char** path,
int* ssl);
1191WOLFSSL_API
int wolfSSL_BIO_free_all(
WOLFSSL_BIO*);
1192WOLFSSL_API
int wolfSSL_BIO_gets(
WOLFSSL_BIO* bio,
char* buf,
int sz);
1193WOLFSSL_API
int wolfSSL_BIO_puts(
WOLFSSL_BIO* bio,
const char* buf);
1196WOLFSSL_API
int wolfSSL_BIO_read(
WOLFSSL_BIO*,
void*,
int);
1197WOLFSSL_API
int wolfSSL_BIO_write(
WOLFSSL_BIO*,
const void*,
int);
1202WOLFSSL_API
void wolfSSL_BIO_set_callback(
WOLFSSL_BIO *bio,
1203 wolf_bio_info_cb callback_func);
1204WOLFSSL_API wolf_bio_info_cb wolfSSL_BIO_get_callback(
WOLFSSL_BIO *bio);
1205WOLFSSL_API
void wolfSSL_BIO_set_callback_arg(
WOLFSSL_BIO *bio,
char *arg);
1206WOLFSSL_API
char* wolfSSL_BIO_get_callback_arg(
const WOLFSSL_BIO *bio);
1209WOLFSSL_API
int wolfSSL_BIO_get_md_ctx(
WOLFSSL_BIO *bio,
1213WOLFSSL_API
long wolfSSL_BIO_set_write_buffer_size(
WOLFSSL_BIO*,
long size);
1215WOLFSSL_API
WOLFSSL_BIO* wolfSSL_BIO_new_socket(
int sfd,
int flag);
1220WOLFSSL_API
void wolfSSL_BIO_set_flags(
WOLFSSL_BIO*,
int);
1221WOLFSSL_API
void wolfSSL_BIO_clear_flags(
WOLFSSL_BIO *bio,
int flags);
1222WOLFSSL_API
int wolfSSL_BIO_set_ex_data(
WOLFSSL_BIO *bio,
int idx,
void *data);
1223WOLFSSL_API
void *wolfSSL_BIO_get_ex_data(
WOLFSSL_BIO *bio,
int idx);
1224WOLFSSL_API
long wolfSSL_BIO_set_nbio(
WOLFSSL_BIO*,
long);
1228WOLFSSL_API
void wolfSSL_BIO_set_init(
WOLFSSL_BIO*,
int);
1229WOLFSSL_API
void wolfSSL_BIO_set_data(
WOLFSSL_BIO*,
void*);
1230WOLFSSL_API
void* wolfSSL_BIO_get_data(
WOLFSSL_BIO*);
1231WOLFSSL_API
void wolfSSL_BIO_set_shutdown(
WOLFSSL_BIO*,
int);
1232WOLFSSL_API
int wolfSSL_BIO_get_shutdown(
WOLFSSL_BIO*);
1233WOLFSSL_API
void wolfSSL_BIO_clear_retry_flags(
WOLFSSL_BIO*);
1234WOLFSSL_API
int wolfSSL_BIO_should_retry(
WOLFSSL_BIO *bio);
1238WOLFSSL_API
int wolfSSL_BIO_meth_set_write(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_write_cb);
1239WOLFSSL_API
int wolfSSL_BIO_meth_set_read(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_read_cb);
1240WOLFSSL_API
int wolfSSL_BIO_meth_set_puts(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_puts_cb);
1241WOLFSSL_API
int wolfSSL_BIO_meth_set_gets(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_gets_cb);
1242WOLFSSL_API
int wolfSSL_BIO_meth_set_ctrl(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_ctrl_get_cb);
1243WOLFSSL_API
int wolfSSL_BIO_meth_set_create(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_create_cb);
1244WOLFSSL_API
int wolfSSL_BIO_meth_set_destroy(
WOLFSSL_BIO_METHOD*, wolfSSL_BIO_meth_destroy_cb);
1245WOLFSSL_API
WOLFSSL_BIO* wolfSSL_BIO_new_mem_buf(
const void* buf,
int len);
1248#ifndef NO_FILESYSTEM
1254#ifndef NO_FILESYSTEM
1261WOLFSSL_API
long wolfSSL_BIO_ctrl(
WOLFSSL_BIO *bp,
int cmd,
long larg,
void *parg);
1262WOLFSSL_API
long wolfSSL_BIO_int_ctrl(
WOLFSSL_BIO *bp,
int cmd,
long larg,
int iarg);
1276WOLFSSL_API
int wolfSSL_BIO_get_len(
WOLFSSL_BIO *bio);
1278WOLFSSL_API
void wolfSSL_RAND_screen(
void);
1279WOLFSSL_API
const char* wolfSSL_RAND_file_name(
char*,
unsigned long);
1280WOLFSSL_API
int wolfSSL_RAND_write_file(
const char*);
1281WOLFSSL_API
int wolfSSL_RAND_load_file(
const char*,
long);
1282WOLFSSL_API
int wolfSSL_RAND_egd(
const char*);
1283WOLFSSL_API
int wolfSSL_RAND_seed(
const void*,
int);
1284WOLFSSL_API
void wolfSSL_RAND_Cleanup(
void);
1285WOLFSSL_API
void wolfSSL_RAND_add(
const void*,
int,
double);
1286WOLFSSL_API
int wolfSSL_RAND_poll(
void);
1290WOLFSSL_API
int wolfSSL_COMP_add_compression_method(
int,
void*);
1292WOLFSSL_API
unsigned long wolfSSL_thread_id(
void);
1293WOLFSSL_API
void wolfSSL_set_id_callback(
unsigned long (*f)(
void));
1294WOLFSSL_API
void wolfSSL_set_locking_callback(
void (*f)(
int,
int,
const char*,
1296WOLFSSL_API
void wolfSSL_set_dynlock_create_callback(WOLFSSL_dynlock_value* (*f)
1297 (
const char*,
int));
1298WOLFSSL_API
void wolfSSL_set_dynlock_lock_callback(
void (*f)(
int,
1299 WOLFSSL_dynlock_value*,
const char*,
int));
1300WOLFSSL_API
void wolfSSL_set_dynlock_destroy_callback(
void (*f)
1301 (WOLFSSL_dynlock_value*,
const char*,
int));
1302WOLFSSL_API
int wolfSSL_num_locks(
void);
1304WOLFSSL_API
WOLFSSL_X509* wolfSSL_X509_STORE_CTX_get_current_cert(
1310 WOLFSSL_X509_STORE_CTX_verify_cb verify_cb);
1312 WOLFSSL_X509_STORE_CTX_verify_cb verify_cb);
1314 unsigned char** out);
1319 unsigned long nmflags,
unsigned long cflag);
1323#if defined(OPENSSL_EXTRA) && defined(XSNPRINTF)
1330WOLFSSL_API
int wolfSSL_X509_ext_isSet_by_NID(
WOLFSSL_X509*,
int);
1331WOLFSSL_API
int wolfSSL_X509_ext_get_critical_by_NID(
WOLFSSL_X509*,
int);
1333WOLFSSL_API
int wolfSSL_X509_get_isSet_pathLength(
WOLFSSL_X509*);
1334WOLFSSL_API
unsigned int wolfSSL_X509_get_pathLength(
WOLFSSL_X509*);
1335WOLFSSL_API
unsigned int wolfSSL_X509_get_keyUsage(
WOLFSSL_X509*);
1336WOLFSSL_API
unsigned char* wolfSSL_X509_get_authorityKeyID(
1338WOLFSSL_API
unsigned char* wolfSSL_X509_get_subjectKeyID(
1342WOLFSSL_API
int wolfSSL_X509_set_subject_name(
WOLFSSL_X509*,
1344WOLFSSL_API
int wolfSSL_X509_set_issuer_name(
WOLFSSL_X509*,
1347WOLFSSL_API
int wolfSSL_X509_set_notAfter(
WOLFSSL_X509* x509,
1349WOLFSSL_API
int wolfSSL_X509_set_notBefore(
WOLFSSL_X509* x509,
1353WOLFSSL_API
int wolfSSL_X509_set_serialNumber(
WOLFSSL_X509* x509,
1355WOLFSSL_API
int wolfSSL_X509_set_version(
WOLFSSL_X509* x509,
long v);
1357 const WOLFSSL_EVP_MD* md);
1363WOLFSSL_API
int wolfSSL_X509_NAME_get_index_by_NID(
1373 const void* data,
int dataSz);
1377WOLFSSL_API
const char* wolfSSL_X509_verify_cert_error_string(
long);
1380WOLFSSL_API
int wolfSSL_X509_get_pubkey_buffer(
WOLFSSL_X509*,
unsigned char*,
1382WOLFSSL_API
int wolfSSL_X509_get_pubkey_type(
WOLFSSL_X509* x509);
1398WOLFSSL_API
WOLFSSL_STACK* wolfSSL_X509_STORE_CTX_get1_chain(
1401 unsigned long flag);
1423 const unsigned char** in,
long inSz);
1427 unsigned char** in,
long inSz);
1429 unsigned char** der);
1435 int offset_day,
long offset_sec, time_t *in_tm);
1437 long offset_sec, time_t *in_tm);
1440 unsigned long flags,
1442WOLFSSL_API
void wolfSSL_X509_VERIFY_PARAM_set_hostflags(
1446 unsigned int nameSz);
1447WOLFSSL_API
int wolfSSL_X509_VERIFY_PARAM_set1_ip_asc(
1463 char* buf,
int len);
1470 WOLFSSL_BIGNUM *bn);
1481#define wolfSSL_SSL_CTX_get_client_CA_list wolfSSL_CTX_get_client_CA_list
1483WOLFSSL_API
void wolfSSL_CTX_set_client_CA_list(
WOLFSSL_CTX*,
1490WOLFSSL_API
void wolfSSL_CTX_set_client_cert_cb(
WOLFSSL_CTX *ctx, client_cert_cb);
1492WOLFSSL_API
void* wolfSSL_X509_STORE_CTX_get_ex_data(
1495 int idx,
void *data);
1498WOLFSSL_API
WOLFSSL_X509* wolfSSL_X509_STORE_CTX_get0_current_issuer(
1502WOLFSSL_API
WOLFSSL_X509* wolfSSL_X509_STORE_CTX_get0_cert(
1504WOLFSSL_API
int wolfSSL_get_ex_data_X509_STORE_CTX_idx(
void);
1505WOLFSSL_API
void wolfSSL_X509_STORE_CTX_set_error(
1509WOLFSSL_API
void* wolfSSL_get_ex_data(
const WOLFSSL*,
int);
1511WOLFSSL_API
void wolfSSL_CTX_set_default_passwd_cb_userdata(
WOLFSSL_CTX*,
1513WOLFSSL_API
void wolfSSL_CTX_set_default_passwd_cb(
WOLFSSL_CTX*,
1518WOLFSSL_API
void wolfSSL_CTX_set_info_callback(
WOLFSSL_CTX*,
1519 void (*)(
const WOLFSSL* ssl,
int type,
int val));
1521WOLFSSL_API
unsigned long wolfSSL_ERR_peek_error(
void);
1522WOLFSSL_API
int wolfSSL_GET_REASON(
int);
1524WOLFSSL_API
const char* wolfSSL_alert_type_string_long(
int);
1525WOLFSSL_API
const char* wolfSSL_alert_desc_string_long(
int);
1526WOLFSSL_API
const char* wolfSSL_state_string_long(
const WOLFSSL*);
1528WOLFSSL_API
WOLFSSL_RSA* wolfSSL_RSA_generate_key(
int,
unsigned long,
1529 void(*)(
int,
int,
void*),
void*);
1531 const unsigned char **pp,
long len);
1533 const unsigned char**,
long);
1534WOLFSSL_API
int wolfSSL_i2d_RSAPublicKey(
WOLFSSL_RSA *r,
const unsigned char **pp);
1535WOLFSSL_API
int wolfSSL_i2d_RSAPrivateKey(
WOLFSSL_RSA *r,
unsigned char **pp);
1536WOLFSSL_API
void wolfSSL_CTX_set_tmp_rsa_callback(
WOLFSSL_CTX *,
1539WOLFSSL_API
int wolfSSL_PEM_def_callback(
char*,
int num,
int w,
void* key);
1541WOLFSSL_API
long wolfSSL_CTX_sess_accept(
WOLFSSL_CTX*);
1542WOLFSSL_API
long wolfSSL_CTX_sess_connect(
WOLFSSL_CTX*);
1543WOLFSSL_API
long wolfSSL_CTX_sess_accept_good(
WOLFSSL_CTX*);
1544WOLFSSL_API
long wolfSSL_CTX_sess_connect_good(
WOLFSSL_CTX*);
1545WOLFSSL_API
long wolfSSL_CTX_sess_accept_renegotiate(
WOLFSSL_CTX*);
1546WOLFSSL_API
long wolfSSL_CTX_sess_connect_renegotiate(
WOLFSSL_CTX*);
1547WOLFSSL_API
long wolfSSL_CTX_sess_hits(
WOLFSSL_CTX*);
1548WOLFSSL_API
long wolfSSL_CTX_sess_cb_hits(
WOLFSSL_CTX*);
1549WOLFSSL_API
long wolfSSL_CTX_sess_cache_full(
WOLFSSL_CTX*);
1550WOLFSSL_API
long wolfSSL_CTX_sess_misses(
WOLFSSL_CTX*);
1551WOLFSSL_API
long wolfSSL_CTX_sess_timeouts(
WOLFSSL_CTX*);
1552WOLFSSL_API
long wolfSSL_CTX_sess_number(
WOLFSSL_CTX*);
1555WOLFSSL_API
long wolfSSL_CTX_sess_set_cache_size(
WOLFSSL_CTX*,
long);
1556WOLFSSL_API
long wolfSSL_CTX_sess_get_cache_size(
WOLFSSL_CTX*);
1558WOLFSSL_API
long wolfSSL_CTX_get_session_cache_mode(
WOLFSSL_CTX*);
1565WOLFSSL_API
int wolfSSL_CTX_set_srp_password(
WOLFSSL_CTX*,
char*);
1566WOLFSSL_API
int wolfSSL_CTX_set_srp_username(
WOLFSSL_CTX*,
char*);
1570WOLFSSL_API
long wolfSSL_clear_options(
WOLFSSL *s,
long op);
1571WOLFSSL_API
long wolfSSL_clear_num_renegotiations(
WOLFSSL *s);
1572WOLFSSL_API
long wolfSSL_total_renegotiations(
WOLFSSL *s);
1573WOLFSSL_API
long wolfSSL_num_renegotiations(
WOLFSSL* s);
1577WOLFSSL_API
long wolfSSL_set_tlsext_status_exts(
WOLFSSL *s,
void *arg);
1578WOLFSSL_API
long wolfSSL_get_tlsext_status_ids(
WOLFSSL *s,
void *arg);
1579WOLFSSL_API
long wolfSSL_set_tlsext_status_ids(
WOLFSSL *s,
void *arg);
1580WOLFSSL_API
long wolfSSL_get_tlsext_status_ocsp_resp(
WOLFSSL *s,
unsigned char **resp);
1581WOLFSSL_API
long wolfSSL_set_tlsext_status_ocsp_resp(
WOLFSSL *s,
unsigned char *resp,
int len);
1583WOLFSSL_API
void wolfSSL_CONF_modules_unload(
int all);
1584WOLFSSL_API
char* wolfSSL_CONF_get1_default_config_file(
void);
1585WOLFSSL_API
long wolfSSL_get_tlsext_status_exts(
WOLFSSL *s,
void *arg);
1588#define WOLFSSL_DEFAULT_CIPHER_LIST ""
1592 WOLFSSL_OCSP_URL_OVERRIDE = 1,
1593 WOLFSSL_OCSP_NO_NONCE = 2,
1594 WOLFSSL_OCSP_CHECKALL = 4,
1596 WOLFSSL_CRL_CHECKALL = 1,
1597 WOLFSSL_CRL_CHECK = 2,
1600#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL) || \
1601 defined(HAVE_WEBSERVER)
1604 SSL_OP_MICROSOFT_SESS_ID_BUG = 0x00000001,
1605 SSL_OP_NETSCAPE_CHALLENGE_BUG = 0x00000002,
1606 SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = 0x00000004,
1607 SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = 0x00000008,
1608 SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = 0x00000010,
1609 SSL_OP_MSIE_SSLV2_RSA_PADDING = 0x00000020,
1610 SSL_OP_SSLEAY_080_CLIENT_DH_BUG = 0x00000040,
1611 SSL_OP_TLS_D5_BUG = 0x00000080,
1612 SSL_OP_TLS_BLOCK_PADDING_BUG = 0x00000100,
1613 SSL_OP_TLS_ROLLBACK_BUG = 0x00000200,
1614 SSL_OP_EPHEMERAL_RSA = 0x00000800,
1615 WOLFSSL_OP_NO_SSLv3 = 0x00001000,
1616 WOLFSSL_OP_NO_TLSv1 = 0x00002000,
1617 SSL_OP_PKCS1_CHECK_1 = 0x00004000,
1618 SSL_OP_PKCS1_CHECK_2 = 0x00008000,
1619 SSL_OP_NETSCAPE_CA_DN_BUG = 0x00010000,
1620 SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = 0x00020000,
1621 SSL_OP_SINGLE_DH_USE = 0x00040000,
1622 SSL_OP_NO_TICKET = 0x00080000,
1623 SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 0x00100000,
1624 SSL_OP_NO_QUERY_MTU = 0x00200000,
1625 SSL_OP_COOKIE_EXCHANGE = 0x00400000,
1626 SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 0x00800000,
1627 SSL_OP_SINGLE_ECDH_USE = 0x01000000,
1628 SSL_OP_CIPHER_SERVER_PREFERENCE = 0x02000000,
1629 WOLFSSL_OP_NO_TLSv1_1 = 0x04000000,
1630 WOLFSSL_OP_NO_TLSv1_2 = 0x08000000,
1631 SSL_OP_NO_COMPRESSION = 0x10000000,
1632 WOLFSSL_OP_NO_TLSv1_3 = 0x20000000,
1633 WOLFSSL_OP_NO_SSLv2 = 0x40000000,
1635 (SSL_OP_MICROSOFT_SESS_ID_BUG
1636 | SSL_OP_NETSCAPE_CHALLENGE_BUG
1637 | SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
1638 | SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
1639 | SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
1640 | SSL_OP_MSIE_SSLV2_RSA_PADDING
1641 | SSL_OP_SSLEAY_080_CLIENT_DH_BUG
1643 | SSL_OP_TLS_BLOCK_PADDING_BUG
1644 | SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
1645 | SSL_OP_TLS_ROLLBACK_BUG),
1649#define SSL_OP_NO_SSLv2 WOLFSSL_OP_NO_SSLv2
1650#define SSL_OP_NO_SSLv3 WOLFSSL_OP_NO_SSLv3
1651#define SSL_OP_NO_TLSv1 WOLFSSL_OP_NO_TLSv1
1652#define SSL_OP_NO_TLSv1_1 WOLFSSL_OP_NO_TLSv1_1
1653#define SSL_OP_NO_TLSv1_2 WOLFSSL_OP_NO_TLSv1_2
1654#if !(!defined(WOLFSSL_TLS13) && defined(WOLFSSL_APACHE_HTTPD))
1655#define SSL_OP_NO_TLSv1_3 WOLFSSL_OP_NO_TLSv1_3
1658#define SSL_OP_NO_SSL_MASK (SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | \
1659 SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2 | SSL_OP_NO_TLSv1_3)
1661#define SSL_NOTHING 1
1662#define SSL_WRITING 2
1663#define SSL_READING 3
1673 OCSP_NOEXPLICIT = 32,
1675 OCSP_NODELEGATED = 128,
1676 OCSP_NOCHECKS = 256,
1677 OCSP_TRUSTOTHER = 512,
1678 OCSP_RESPID_KEY = 1024,
1685 OCSP_BASICRESP = 16,
1688 ASN1_GENERALIZEDTIME = 4,
1689 SSL_MAX_SSL_SESSION_ID_LENGTH = 32,
1691 SSL_ST_CONNECT = 0x1000,
1692 SSL_ST_ACCEPT = 0x2000,
1693 SSL_ST_MASK = 0x0FFF,
1698 SSL_CB_WRITE = 0x08,
1699 SSL_CB_HANDSHAKE_START = 0x10,
1700 SSL_CB_HANDSHAKE_DONE = 0x20,
1701 SSL_CB_ALERT = 0x4000,
1702 SSL_CB_READ_ALERT = (SSL_CB_ALERT | SSL_CB_READ),
1703 SSL_CB_WRITE_ALERT = (SSL_CB_ALERT | SSL_CB_WRITE),
1704 SSL_CB_ACCEPT_LOOP = (SSL_ST_ACCEPT | SSL_CB_LOOP),
1705 SSL_CB_ACCEPT_EXIT = (SSL_ST_ACCEPT | SSL_CB_EXIT),
1706 SSL_CB_CONNECT_LOOP = (SSL_ST_CONNECT | SSL_CB_LOOP),
1707 SSL_CB_CONNECT_EXIT = (SSL_ST_CONNECT | SSL_CB_EXIT),
1708 SSL_CB_MODE_READ = 1,
1709 SSL_CB_MODE_WRITE = 2,
1711 SSL_MODE_ENABLE_PARTIAL_WRITE = 2,
1712 SSL_MODE_AUTO_RETRY = 3,
1714 SSL_MODE_RELEASE_BUFFERS = -1,
1716 BIO_FLAGS_BASE64_NO_NL = 1,
1720 X509_FILETYPE_PEM = 8,
1725 X509_V_ERR_CRL_SIGNATURE_FAILURE = 13,
1726 X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD = 14,
1727 X509_V_ERR_CRL_HAS_EXPIRED = 15,
1728 X509_V_ERR_CERT_REVOKED = 16,
1729 X509_V_ERR_CERT_CHAIN_TOO_LONG = 17,
1730 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT = 18,
1731 X509_V_ERR_CERT_NOT_YET_VALID = 19,
1732 X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD = 20,
1733 X509_V_ERR_CERT_HAS_EXPIRED = 21,
1734 X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD = 22,
1735 X509_V_ERR_CERT_REJECTED = 23,
1737 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT = 24,
1738 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN = 25,
1739 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY = 26,
1740 X509_V_ERR_CERT_UNTRUSTED = 27,
1741 X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE = 28,
1742 X509_V_ERR_SUBJECT_ISSUER_MISMATCH = 29,
1744 X509_V_ERR_UNABLE_TO_GET_CRL,
1745 X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,
1746 X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,
1747 X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
1748 X509_V_ERR_CERT_SIGNATURE_FAILURE,
1749 X509_V_ERR_CRL_NOT_YET_VALID,
1750 X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,
1751 X509_V_ERR_OUT_OF_MEM,
1752 X509_V_ERR_INVALID_CA,
1753 X509_V_ERR_PATH_LENGTH_EXCEEDED,
1754 X509_V_ERR_INVALID_PURPOSE,
1755 X509_V_ERR_AKID_SKID_MISMATCH,
1756 X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,
1757 X509_V_ERR_KEYUSAGE_NO_CERTSIGN,
1758 X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER,
1759 X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION,
1760 X509_V_ERR_KEYUSAGE_NO_CRL_SIGN,
1761 X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION,
1762 X509_V_ERR_INVALID_NON_CA,
1763 X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED,
1764 X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE,
1765 X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED,
1766 X509_V_ERR_INVALID_EXTENSION,
1767 X509_V_ERR_INVALID_POLICY_EXTENSION,
1768 X509_V_ERR_NO_EXPLICIT_POLICY,
1769 X509_V_ERR_UNNESTED_RESOURCE,
1770 X509_V_ERR_APPLICATION_VERIFICATION,
1772 X509_R_CERT_ALREADY_IN_HASH_TABLE,
1774 XN_FLAG_SPC_EQ = (1 << 23),
1775 XN_FLAG_SEP_CPLUS_SPC = (2 << 16),
1776 XN_FLAG_ONELINE = 0,
1777 XN_FLAG_RFC2253 = 1,
1778 XN_FLAG_DN_REV = (1 << 20),
1781 CRYPTO_NUM_LOCKS = 10,
1783 ASN1_STRFLGS_ESC_MSB = 4
1789#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
1794#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
1795WOLFSSL_API
void wolfSSL_ERR_dump_errors_fp(XFILE fp);
1797 size_t len,
void *u),
void *u);
1800WOLFSSL_API
void wolfSSL_ERR_print_errors(
WOLFSSL_BIO *bio);
1803#ifndef NO_OLD_SSL_NAMES
1804 #define SSL_ERROR_NONE WOLFSSL_ERROR_NONE
1805 #define SSL_FAILURE WOLFSSL_FAILURE
1806 #define SSL_SUCCESS WOLFSSL_SUCCESS
1807 #define SSL_SHUTDOWN_NOT_DONE WOLFSSL_SHUTDOWN_NOT_DONE
1809 #define SSL_ALPN_NOT_FOUND WOLFSSL_ALPN_NOT_FOUND
1810 #define SSL_BAD_CERTTYPE WOLFSSL_BAD_CERTTYPE
1811 #define SSL_BAD_STAT WOLFSSL_BAD_STAT
1812 #define SSL_BAD_PATH WOLFSSL_BAD_PATH
1813 #define SSL_BAD_FILETYPE WOLFSSL_BAD_FILETYPE
1814 #define SSL_BAD_FILE WOLFSSL_BAD_FILE
1815 #define SSL_NOT_IMPLEMENTED WOLFSSL_NOT_IMPLEMENTED
1816 #define SSL_UNKNOWN WOLFSSL_UNKNOWN
1817 #define SSL_FATAL_ERROR WOLFSSL_FATAL_ERROR
1819 #define SSL_FILETYPE_ASN1 WOLFSSL_FILETYPE_ASN1
1820 #define SSL_FILETYPE_PEM WOLFSSL_FILETYPE_PEM
1821 #define SSL_FILETYPE_DEFAULT WOLFSSL_FILETYPE_DEFAULT
1822 #define SSL_FILETYPE_RAW WOLFSSL_FILETYPE_RAW
1824 #define SSL_VERIFY_NONE WOLFSSL_VERIFY_NONE
1825 #define SSL_VERIFY_PEER WOLFSSL_VERIFY_PEER
1826 #define SSL_VERIFY_FAIL_IF_NO_PEER_CERT WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT
1827 #define SSL_VERIFY_CLIENT_ONCE WOLFSSL_VERIFY_CLIENT_ONCE
1828 #define SSL_VERIFY_FAIL_EXCEPT_PSK WOLFSSL_VERIFY_FAIL_EXCEPT_PSK
1830 #define SSL_SESS_CACHE_OFF WOLFSSL_SESS_CACHE_OFF
1831 #define SSL_SESS_CACHE_CLIENT WOLFSSL_SESS_CACHE_CLIENT
1832 #define SSL_SESS_CACHE_SERVER WOLFSSL_SESS_CACHE_SERVER
1833 #define SSL_SESS_CACHE_BOTH WOLFSSL_SESS_CACHE_BOTH
1834 #define SSL_SESS_CACHE_NO_AUTO_CLEAR WOLFSSL_SESS_CACHE_NO_AUTO_CLEAR
1835 #define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP WOLFSSL_SESS_CACHE_NO_INTERNAL_LOOKUP
1836 #define SSL_SESS_CACHE_NO_INTERNAL_STORE WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE
1837 #define SSL_SESS_CACHE_NO_INTERNAL WOLFSSL_SESS_CACHE_NO_INTERNAL
1839 #define SSL_ERROR_WANT_READ WOLFSSL_ERROR_WANT_READ
1840 #define SSL_ERROR_WANT_WRITE WOLFSSL_ERROR_WANT_WRITE
1841 #define SSL_ERROR_WANT_CONNECT WOLFSSL_ERROR_WANT_CONNECT
1842 #define SSL_ERROR_WANT_ACCEPT WOLFSSL_ERROR_WANT_ACCEPT
1843 #define SSL_ERROR_SYSCALL WOLFSSL_ERROR_SYSCALL
1844 #define SSL_ERROR_WANT_X509_LOOKUP WOLFSSL_ERROR_WANT_X509_LOOKUP
1845 #define SSL_ERROR_ZERO_RETURN WOLFSSL_ERROR_ZERO_RETURN
1846 #define SSL_ERROR_SSL WOLFSSL_ERROR_SSL
1848 #define SSL_SENT_SHUTDOWN WOLFSSL_SENT_SHUTDOWN
1849 #define SSL_RECEIVED_SHUTDOWN WOLFSSL_RECEIVED_SHUTDOWN
1850 #define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER WOLFSSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
1852 #define SSL_R_SSL_HANDSHAKE_FAILURE WOLFSSL_R_SSL_HANDSHAKE_FAILURE
1853 #define SSL_R_TLSV1_ALERT_UNKNOWN_CA WOLFSSL_R_TLSV1_ALERT_UNKNOWN_CA
1854 #define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN WOLFSSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN
1855 #define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE WOLFSSL_R_SSLV3_ALERT_BAD_CERTIFICATE
1857 #define PEM_BUFSIZE WOLF_PEM_BUFSIZE
1861 WOLFSSL_ERROR_NONE = 0,
1862 WOLFSSL_FAILURE = 0,
1863 WOLFSSL_SUCCESS = 1,
1864 WOLFSSL_SHUTDOWN_NOT_DONE = 2,
1866 WOLFSSL_ALPN_NOT_FOUND = -9,
1867 WOLFSSL_BAD_CERTTYPE = -8,
1868 WOLFSSL_BAD_STAT = -7,
1869 WOLFSSL_BAD_PATH = -6,
1870 WOLFSSL_BAD_FILETYPE = -5,
1871 WOLFSSL_BAD_FILE = -4,
1872 WOLFSSL_NOT_IMPLEMENTED = -3,
1873 WOLFSSL_UNKNOWN = -2,
1874 WOLFSSL_FATAL_ERROR = -1,
1876 WOLFSSL_FILETYPE_ASN1 = 2,
1877 WOLFSSL_FILETYPE_PEM = 1,
1878 WOLFSSL_FILETYPE_DEFAULT = 2,
1879 WOLFSSL_FILETYPE_RAW = 3,
1881 WOLFSSL_VERIFY_NONE = 0,
1882 WOLFSSL_VERIFY_PEER = 1,
1883 WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT = 2,
1884 WOLFSSL_VERIFY_CLIENT_ONCE = 4,
1885 WOLFSSL_VERIFY_FAIL_EXCEPT_PSK = 8,
1887 WOLFSSL_SESS_CACHE_OFF = 0x0000,
1888 WOLFSSL_SESS_CACHE_CLIENT = 0x0001,
1889 WOLFSSL_SESS_CACHE_SERVER = 0x0002,
1890 WOLFSSL_SESS_CACHE_BOTH = 0x0003,
1891 WOLFSSL_SESS_CACHE_NO_AUTO_CLEAR = 0x0008,
1892 WOLFSSL_SESS_CACHE_NO_INTERNAL_LOOKUP = 0x0100,
1893 WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE = 0x0200,
1894 WOLFSSL_SESS_CACHE_NO_INTERNAL = 0x0300,
1896 WOLFSSL_ERROR_WANT_READ = 2,
1897 WOLFSSL_ERROR_WANT_WRITE = 3,
1898 WOLFSSL_ERROR_WANT_CONNECT = 7,
1899 WOLFSSL_ERROR_WANT_ACCEPT = 8,
1900 WOLFSSL_ERROR_SYSCALL = 5,
1901 WOLFSSL_ERROR_WANT_X509_LOOKUP = 83,
1902 WOLFSSL_ERROR_ZERO_RETURN = 6,
1903 WOLFSSL_ERROR_SSL = 85,
1905 WOLFSSL_SENT_SHUTDOWN = 1,
1906 WOLFSSL_RECEIVED_SHUTDOWN = 2,
1907 WOLFSSL_MODE_ACCEPT_MOVING_WRITE_BUFFER = 4,
1909 WOLFSSL_R_SSL_HANDSHAKE_FAILURE = 101,
1910 WOLFSSL_R_TLSV1_ALERT_UNKNOWN_CA = 102,
1911 WOLFSSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN = 103,
1912 WOLFSSL_R_SSLV3_ALERT_BAD_CERTIFICATE = 104,
1914 WOLF_PEM_BUFSIZE = 1024
1918 typedef unsigned int (*wc_psk_client_callback)(
WOLFSSL*,
const char*,
char*,
1919 unsigned int,
unsigned char*,
unsigned int);
1920 WOLFSSL_API
void wolfSSL_CTX_set_psk_client_callback(
WOLFSSL_CTX*,
1921 wc_psk_client_callback);
1922 WOLFSSL_API
void wolfSSL_set_psk_client_callback(
WOLFSSL*,
1923 wc_psk_client_callback);
1925 typedef unsigned int (*wc_psk_client_tls13_callback)(
WOLFSSL*,
const char*,
1926 char*,
unsigned int,
unsigned char*,
unsigned int,
const char**);
1927 WOLFSSL_API
void wolfSSL_CTX_set_psk_client_tls13_callback(
WOLFSSL_CTX*,
1928 wc_psk_client_tls13_callback);
1929 WOLFSSL_API
void wolfSSL_set_psk_client_tls13_callback(
WOLFSSL*,
1930 wc_psk_client_tls13_callback);
1939 typedef unsigned int (*wc_psk_server_callback)(
WOLFSSL*,
const char*,
1940 unsigned char*,
unsigned int);
1941 WOLFSSL_API
void wolfSSL_CTX_set_psk_server_callback(
WOLFSSL_CTX*,
1942 wc_psk_server_callback);
1943 WOLFSSL_API
void wolfSSL_set_psk_server_callback(
WOLFSSL*,
1944 wc_psk_server_callback);
1946 typedef unsigned int (*wc_psk_server_tls13_callback)(
WOLFSSL*,
const char*,
1947 unsigned char*,
unsigned int,
const char**);
1948 WOLFSSL_API
void wolfSSL_CTX_set_psk_server_tls13_callback(
WOLFSSL_CTX*,
1949 wc_psk_server_tls13_callback);
1950 WOLFSSL_API
void wolfSSL_set_psk_server_tls13_callback(
WOLFSSL*,
1951 wc_psk_server_tls13_callback);
1954 #define PSK_TYPES_DEFINED
1971 WOLFSSL_BIO_ERROR = -1,
1972 WOLFSSL_BIO_UNSET = -2,
1973 WOLFSSL_BIO_SIZE = 17000
1977WOLFSSL_API
void wolfSSL_ERR_put_error(
int lib,
int fun,
int err,
1978 const char* file,
int line);
1979WOLFSSL_API
unsigned long wolfSSL_ERR_get_error_line(
const char**,
int*);
1980WOLFSSL_API
unsigned long wolfSSL_ERR_get_error_line_data(
const char**,
int*,
1981 const char**,
int *);
1983WOLFSSL_API
unsigned long wolfSSL_ERR_get_error(
void);
1984WOLFSSL_API
void wolfSSL_ERR_clear_error(
void);
1987WOLFSSL_API
int wolfSSL_RAND_status(
void);
1988WOLFSSL_API
int wolfSSL_RAND_pseudo_bytes(
unsigned char* buf,
int num);
1989WOLFSSL_API
int wolfSSL_RAND_bytes(
unsigned char* buf,
int num);
1991WOLFSSL_API
long wolfSSL_CTX_set_options(
WOLFSSL_CTX*,
long);
1992WOLFSSL_API
long wolfSSL_CTX_get_options(
WOLFSSL_CTX* ctx);
1996 WOLFSSL_API
int wolfSSL_CTX_check_private_key(
const WOLFSSL_CTX*);
1999WOLFSSL_API
void wolfSSL_ERR_free_strings(
void);
2000WOLFSSL_API
void wolfSSL_ERR_remove_state(
unsigned long);
2001WOLFSSL_API
int wolfSSL_clear(
WOLFSSL* ssl);
2004WOLFSSL_API
void wolfSSL_cleanup_all_ex_data(
void);
2005WOLFSSL_API
long wolfSSL_CTX_set_mode(
WOLFSSL_CTX* ctx,
long mode);
2006WOLFSSL_API
long wolfSSL_CTX_get_mode(
WOLFSSL_CTX* ctx);
2007WOLFSSL_API
void wolfSSL_CTX_set_default_read_ahead(
WOLFSSL_CTX* ctx,
int m);
2008WOLFSSL_API
long wolfSSL_SSL_get_mode(
WOLFSSL* ssl);
2011WOLFSSL_API
int wolfSSL_CTX_set_default_verify_paths(
WOLFSSL_CTX*);
2012WOLFSSL_API
int wolfSSL_CTX_set_session_id_context(
WOLFSSL_CTX*,
2013 const unsigned char*,
unsigned int);
2016#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
2021WOLFSSL_API
int wolfSSL_want(
WOLFSSL*);
2026#if !defined(NO_FILESYSTEM) && defined (OPENSSL_EXTRA)
2028WOLFSSL_API
int wolfSSL_BIO_vprintf(
WOLFSSL_BIO* bio,
const char* format,
2031WOLFSSL_API
int wolfSSL_BIO_printf(
WOLFSSL_BIO*,
const char*, ...);
2032WOLFSSL_API
int wolfSSL_BIO_dump(
WOLFSSL_BIO *bio,
const char*,
int);
2033WOLFSSL_API
int wolfSSL_ASN1_UTCTIME_print(
WOLFSSL_BIO*,
2034 const WOLFSSL_ASN1_UTCTIME*);
2035WOLFSSL_API
int wolfSSL_ASN1_GENERALIZEDTIME_print(
WOLFSSL_BIO*,
2036 const WOLFSSL_ASN1_GENERALIZEDTIME*);
2037WOLFSSL_API
void wolfSSL_ASN1_GENERALIZEDTIME_free(WOLFSSL_ASN1_GENERALIZEDTIME*);
2039WOLFSSL_API
int wolfSSL_ASN1_TIME_diff(
int *pday,
int *psec,
2046WOLFSSL_API
void* wolfSSL_sk_value(
WOLFSSL_STACK* sk,
int i);
2048#if defined(HAVE_EX_DATA) || defined(FORTRESS)
2049WOLFSSL_API
void* wolfSSL_CRYPTO_get_ex_data(
const WOLFSSL_CRYPTO_EX_DATA* ex_data,
2051WOLFSSL_API
int wolfSSL_CRYPTO_set_ex_data(WOLFSSL_CRYPTO_EX_DATA* ex_data,
int idx,
2056WOLFSSL_API
void* wolfSSL_CTX_get_ex_data(
const WOLFSSL_CTX*,
int);
2057WOLFSSL_API
int wolfSSL_CTX_set_ex_data(
WOLFSSL_CTX*,
int,
void*);
2058WOLFSSL_API
void wolfSSL_CTX_sess_set_get_cb(
WOLFSSL_CTX*,
2060WOLFSSL_API
void wolfSSL_CTX_sess_set_new_cb(
WOLFSSL_CTX*,
2062WOLFSSL_API
void wolfSSL_CTX_sess_set_remove_cb(
WOLFSSL_CTX*,
2065WOLFSSL_API
int wolfSSL_i2d_SSL_SESSION(
WOLFSSL_SESSION*,
unsigned char**);
2067 const unsigned char**,
long);
2071WOLFSSL_API
int wolfSSL_CTX_get_ex_new_index(
long,
void*,
void*,
void*,
void*);
2100WOLFSSL_API
void wolfSSL_CTX_set_current_time_cb(
WOLFSSL_CTX* ctx,
2105#ifdef WOLFSSL_ALT_CERT_CHAINS
2106WOLFSSL_API
int wolfSSL_is_peer_alt_cert_chain(
const WOLFSSL* ssl);
2119#define wolfSSL_FreeX509(x509) wolfSSL_X509_free((x509))
2120WOLFSSL_ABI WOLFSSL_API
void wolfSSL_X509_free(
WOLFSSL_X509*);
2123 unsigned char* buf,
int inLen,
int* outLen);
2129WOLFSSL_API
const unsigned char* wolfSSL_X509_get_tbs(
WOLFSSL_X509*,
int*);
2130WOLFSSL_ABI WOLFSSL_API
const byte* wolfSSL_X509_notBefore(
WOLFSSL_X509*);
2131WOLFSSL_ABI WOLFSSL_API
const byte* wolfSSL_X509_notAfter(
WOLFSSL_X509*);
2134WOLFSSL_API
int wolfSSL_cmp_peer_cert_to_file(
WOLFSSL*,
const char*);
2137WOLFSSL_API
int wolfSSL_X509_add_altname(
WOLFSSL_X509*,
const char*,
int);
2140 const unsigned char** in,
int len);
2142 wolfSSL_X509_d2i(
WOLFSSL_X509** x509,
const unsigned char* in,
int len);
2143WOLFSSL_API
int wolfSSL_i2d_X509(
WOLFSSL_X509* x509,
unsigned char** out);
2145 const unsigned char *in,
int len);
2146#ifndef NO_FILESYSTEM
2151#ifndef NO_FILESYSTEM
2152 #ifndef NO_STDIO_FILESYSTEM
2159WOLFSSL_API
WOLFSSL_X509* wolfSSL_X509_load_certificate_buffer(
2160 const unsigned char* buf,
int sz,
int format);
2163 WOLFSSL_API
unsigned char*
2165 WOLFSSL_API
unsigned char*
2167 WOLFSSL_API
unsigned char*
2177typedef struct WC_PKCS12 WC_PKCS12;
2179 WC_PKCS12** pkcs12);
2181#ifndef NO_FILESYSTEM
2182WOLFSSL_API WOLFSSL_X509_PKCS12* wolfSSL_d2i_PKCS12_fp(XFILE fp,
2183 WOLFSSL_X509_PKCS12** pkcs12);
2188WOLFSSL_API WC_PKCS12* wolfSSL_PKCS12_create(
char* pass,
char* name,
2191 int keyNID,
int certNID,
int itt,
int macItt,
int keytype);
2192WOLFSSL_API
void wolfSSL_PKCS12_PBE_add(
void);
2199 const unsigned char* g,
int gSz);
2202WOLFSSL_API
int wolfSSL_SetEnableDhKeyTest(
WOLFSSL*,
int);
2203#ifndef NO_FILESYSTEM
2209 int pSz,
const unsigned char* g,
int gSz);
2211 long sz,
int format);
2213#ifndef NO_FILESYSTEM
2235WOLFSSL_API
int wolfSSL_SetTmpEC_DHE_Sz(
WOLFSSL*, word16);
2236WOLFSSL_API
int wolfSSL_CTX_SetTmpEC_DHE_Sz(
WOLFSSL_CTX*, word16);
2240WOLFSSL_API
int wolfSSL_get_keyblock_size(
WOLFSSL*);
2241WOLFSSL_API
int wolfSSL_get_keys(
WOLFSSL*,
unsigned char** ms,
unsigned int* msLen,
2242 unsigned char** sr,
unsigned int* srLen,
2243 unsigned char** cr,
unsigned int* crLen);
2253 #include <sys/types.h>
2254 #include <sys/socket.h>
2255 #elif !defined(WOLFSSL_MDK_ARM) && !defined(WOLFSSL_IAR_ARM) && \
2256 !defined(WOLFSSL_PICOTCP) && !defined(WOLFSSL_ROWLEY_ARM) && \
2257 !defined(WOLFSSL_EMBOS) && !defined(WOLFSSL_FROSTED) && \
2258 !defined(WOLFSSL_CHIBIOS) && !defined(WOLFSSL_CONTIKI) && \
2259 !defined(WOLFSSL_ZEPHYR)
2260 #include <sys/uio.h>
2272#ifdef WOLFSSL_TRUST_PEER_CERT
2275 const unsigned char*,
long,
int);
2277 WOLFSSL_API
int wolfSSL_CTX_load_verify_buffer_ex(
WOLFSSL_CTX*,
2278 const unsigned char*,
long,
int,
2281 const unsigned char*,
long,
int);
2283 const unsigned char*,
long,
int);
2285 const unsigned char*,
long,
int);
2287 const unsigned char*,
long,
int);
2288 WOLFSSL_API
int wolfSSL_CTX_use_PrivateKey_id(
WOLFSSL_CTX*,
2289 const unsigned char*,
long,
int,
long);
2290 WOLFSSL_API
int wolfSSL_CTX_use_certificate_chain_buffer_format(
WOLFSSL_CTX*,
2291 const unsigned char*,
long,
int);
2293 const unsigned char*,
long);
2299 const unsigned char* der,
int derSz);
2302 WOLFSSL_API
int wolfSSL_use_PrivateKey_id(
WOLFSSL*,
const unsigned char*,
2304 WOLFSSL_API
int wolfSSL_use_certificate_chain_buffer_format(
WOLFSSL*,
2305 const unsigned char*,
long,
int);
2307 const unsigned char*,
long);
2310 #if (defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)) && \
2311 defined(KEEP_OUR_CERT)
2329typedef int (*CallbackFuzzer)(
WOLFSSL* ssl,
const unsigned char* buf,
int sz,
2330 int type,
void* fuzzCtx);
2332WOLFSSL_API
void wolfSSL_SetFuzzerCb(
WOLFSSL* ssl, CallbackFuzzer cbf,
void* fCtx);
2336WOLFSSL_API
int wolfSSL_DTLS_SetCookieSecret(
WOLFSSL*,
const byte*, word32);
2341 WOLFSSL_CBIO_ERR_GENERAL = -1,
2342 WOLFSSL_CBIO_ERR_WANT_READ = -2,
2343 WOLFSSL_CBIO_ERR_WANT_WRITE = -2,
2344 WOLFSSL_CBIO_ERR_CONN_RST = -3,
2345 WOLFSSL_CBIO_ERR_ISR = -4,
2346 WOLFSSL_CBIO_ERR_CONN_CLOSE = -5,
2347 WOLFSSL_CBIO_ERR_TIMEOUT = -6
2355 WOLFSSL_TLSV1_1 = 2,
2356 WOLFSSL_TLSV1_2 = 3,
2357 WOLFSSL_TLSV1_3 = 4,
2358 WOLFSSL_USER_CA = 1,
2359 WOLFSSL_CHAIN_CA = 2
2366WOLFSSL_API
int wolfSSL_GetObjectSize(
void);
2367WOLFSSL_API
int wolfSSL_CTX_GetObjectSize(
void);
2368WOLFSSL_API
int wolfSSL_METHOD_GetObjectSize(
void);
2369WOLFSSL_API
int wolfSSL_GetOutputSize(
WOLFSSL*,
int);
2370WOLFSSL_API
int wolfSSL_GetMaxOutputSize(
WOLFSSL*);
2371WOLFSSL_API
int wolfSSL_GetVersion(
WOLFSSL* ssl);
2375#define wolfSSL_KeyPemToDer wc_KeyPemToDer
2376#define wolfSSL_CertPemToDer wc_CertPemToDer
2377#define wolfSSL_PemPubKeyToDer wc_PemPubKeyToDer
2378#define wolfSSL_PubKeyPemToDer wc_PubKeyPemToDer
2379#define wolfSSL_PemCertToDer wc_PemCertToDer
2382typedef void (*CallbackCACache)(
unsigned char* der,
int sz,
int type);
2383typedef void (*CbMissingCRL)(
const char* url);
2384typedef int (*CbOCSPIO)(
void*,
const char*, int,
2385 unsigned char*, int,
unsigned char**);
2386typedef void (*CbOCSPRespFree)(
void*,
unsigned char*);
2389typedef int (*CbCrlIO)(
WOLFSSL_CRL* crl,
const char* url,
int urlSz);
2393typedef int (*CallbackMacEncrypt)(
WOLFSSL* ssl,
unsigned char* macOut,
2394 const unsigned char* macIn,
unsigned int macInSz,
int macContent,
2395 int macVerify,
unsigned char* encOut,
const unsigned char* encIn,
2396 unsigned int encSz,
void* ctx);
2397WOLFSSL_API
void wolfSSL_CTX_SetMacEncryptCb(
WOLFSSL_CTX*, CallbackMacEncrypt);
2398WOLFSSL_API
void wolfSSL_SetMacEncryptCtx(
WOLFSSL* ssl,
void *ctx);
2399WOLFSSL_API
void* wolfSSL_GetMacEncryptCtx(
WOLFSSL* ssl);
2401typedef int (*CallbackDecryptVerify)(
WOLFSSL* ssl,
2402 unsigned char* decOut,
const unsigned char* decIn,
2403 unsigned int decSz,
int content,
int verify,
unsigned int* padSz,
2405WOLFSSL_API
void wolfSSL_CTX_SetDecryptVerifyCb(
WOLFSSL_CTX*,
2406 CallbackDecryptVerify);
2407WOLFSSL_API
void wolfSSL_SetDecryptVerifyCtx(
WOLFSSL* ssl,
void *ctx);
2408WOLFSSL_API
void* wolfSSL_GetDecryptVerifyCtx(
WOLFSSL* ssl);
2410typedef int (*CallbackEncryptMac)(
WOLFSSL* ssl,
unsigned char* macOut,
2411 int content,
int macVerify,
unsigned char* encOut,
2412 const unsigned char* encIn,
unsigned int encSz,
void* ctx);
2417typedef int (*CallbackVerifyDecrypt)(
WOLFSSL* ssl,
2418 unsigned char* decOut,
const unsigned char* decIn,
2419 unsigned int decSz,
int content,
int verify,
unsigned int* padSz,
2422 CallbackVerifyDecrypt);
2426WOLFSSL_API
const unsigned char* wolfSSL_GetMacSecret(
WOLFSSL*,
int);
2427WOLFSSL_API
const unsigned char* wolfSSL_GetClientWriteKey(
WOLFSSL*);
2428WOLFSSL_API
const unsigned char* wolfSSL_GetClientWriteIV(
WOLFSSL*);
2429WOLFSSL_API
const unsigned char* wolfSSL_GetServerWriteKey(
WOLFSSL*);
2430WOLFSSL_API
const unsigned char* wolfSSL_GetServerWriteIV(
WOLFSSL*);
2431WOLFSSL_API
int wolfSSL_GetKeySize(
WOLFSSL*);
2433WOLFSSL_API
int wolfSSL_GetSide(
WOLFSSL*);
2434WOLFSSL_API
int wolfSSL_IsTLSv1_1(
WOLFSSL*);
2435WOLFSSL_API
int wolfSSL_GetBulkCipher(
WOLFSSL*);
2436WOLFSSL_API
int wolfSSL_GetCipherBlockSize(
WOLFSSL*);
2437WOLFSSL_API
int wolfSSL_GetAeadMacSize(
WOLFSSL*);
2438WOLFSSL_API
int wolfSSL_GetHmacSize(
WOLFSSL*);
2439WOLFSSL_API
int wolfSSL_GetHmacType(
WOLFSSL*);
2440WOLFSSL_API
int wolfSSL_GetCipherType(
WOLFSSL*);
2441WOLFSSL_API
int wolfSSL_SetTlsHmacInner(
WOLFSSL*,
unsigned char*,
2446 WOLFSSL_SERVER_END = 0,
2447 WOLFSSL_CLIENT_END = 1,
2448 WOLFSSL_NEITHER_END = 3,
2449 WOLFSSL_BLOCK_TYPE = 2,
2450 WOLFSSL_STREAM_TYPE = 3,
2451 WOLFSSL_AEAD_TYPE = 4,
2452 WOLFSSL_TLS_HMAC_INNER_SZ = 13
2456enum BulkCipherAlgorithm {
2457 wolfssl_cipher_null,
2477enum KDF_MacAlgorithm {
2485#ifdef HAVE_PK_CALLBACKS
2490typedef int (*CallbackEccKeyGen)(
WOLFSSL* ssl,
struct ecc_key* key,
2491 unsigned int keySz,
int ecc_curve,
void* ctx);
2492WOLFSSL_API
void wolfSSL_CTX_SetEccKeyGenCb(
WOLFSSL_CTX*, CallbackEccKeyGen);
2493WOLFSSL_API
void wolfSSL_SetEccKeyGenCtx(
WOLFSSL* ssl,
void *ctx);
2494WOLFSSL_API
void* wolfSSL_GetEccKeyGenCtx(
WOLFSSL* ssl);
2496typedef int (*CallbackEccSign)(
WOLFSSL* ssl,
2497 const unsigned char* in,
unsigned int inSz,
2498 unsigned char* out, word32* outSz,
2499 const unsigned char* keyDer,
unsigned int keySz,
2501WOLFSSL_ABI WOLFSSL_API
void wolfSSL_CTX_SetEccSignCb(
WOLFSSL_CTX*,
2503WOLFSSL_API
void wolfSSL_SetEccSignCtx(
WOLFSSL* ssl,
void *ctx);
2504WOLFSSL_API
void* wolfSSL_GetEccSignCtx(
WOLFSSL* ssl);
2506typedef int (*CallbackEccVerify)(
WOLFSSL* ssl,
2507 const unsigned char* sig,
unsigned int sigSz,
2508 const unsigned char* hash,
unsigned int hashSz,
2509 const unsigned char* keyDer,
unsigned int keySz,
2510 int* result,
void* ctx);
2511WOLFSSL_API
void wolfSSL_CTX_SetEccVerifyCb(
WOLFSSL_CTX*, CallbackEccVerify);
2512WOLFSSL_API
void wolfSSL_SetEccVerifyCtx(
WOLFSSL* ssl,
void *ctx);
2513WOLFSSL_API
void* wolfSSL_GetEccVerifyCtx(
WOLFSSL* ssl);
2515typedef int (*CallbackEccSharedSecret)(
WOLFSSL* ssl,
struct ecc_key* otherKey,
2516 unsigned char* pubKeyDer, word32* pubKeySz,
2517 unsigned char* out, word32* outlen,
2518 int side,
void* ctx);
2519WOLFSSL_API
void wolfSSL_CTX_SetEccSharedSecretCb(
WOLFSSL_CTX*, CallbackEccSharedSecret);
2520WOLFSSL_API
void wolfSSL_SetEccSharedSecretCtx(
WOLFSSL* ssl,
void *ctx);
2521WOLFSSL_API
void* wolfSSL_GetEccSharedSecretCtx(
WOLFSSL* ssl);
2527typedef int (*CallbackDhAgree)(
WOLFSSL* ssl,
struct DhKey* key,
2528 const unsigned char* priv,
unsigned int privSz,
2529 const unsigned char* otherPubKeyDer,
unsigned int otherPubKeySz,
2530 unsigned char* out,
unsigned int* outlen,
2532WOLFSSL_API
void wolfSSL_CTX_SetDhAgreeCb(
WOLFSSL_CTX*, CallbackDhAgree);
2533WOLFSSL_API
void wolfSSL_SetDhAgreeCtx(
WOLFSSL* ssl,
void *ctx);
2534WOLFSSL_API
void* wolfSSL_GetDhAgreeCtx(
WOLFSSL* ssl);
2539typedef int (*CallbackEd25519Sign)(
WOLFSSL* ssl,
2540 const unsigned char* in,
unsigned int inSz,
2541 unsigned char* out,
unsigned int* outSz,
2542 const unsigned char* keyDer,
unsigned int keySz,
2544WOLFSSL_API
void wolfSSL_CTX_SetEd25519SignCb(
WOLFSSL_CTX*,
2545 CallbackEd25519Sign);
2546WOLFSSL_API
void wolfSSL_SetEd25519SignCtx(
WOLFSSL* ssl,
void *ctx);
2547WOLFSSL_API
void* wolfSSL_GetEd25519SignCtx(
WOLFSSL* ssl);
2549typedef int (*CallbackEd25519Verify)(
WOLFSSL* ssl,
2550 const unsigned char* sig,
unsigned int sigSz,
2551 const unsigned char* msg,
unsigned int msgSz,
2552 const unsigned char* keyDer,
unsigned int keySz,
2553 int* result,
void* ctx);
2554WOLFSSL_API
void wolfSSL_CTX_SetEd25519VerifyCb(
WOLFSSL_CTX*,
2555 CallbackEd25519Verify);
2556WOLFSSL_API
void wolfSSL_SetEd25519VerifyCtx(
WOLFSSL* ssl,
void *ctx);
2557WOLFSSL_API
void* wolfSSL_GetEd25519VerifyCtx(
WOLFSSL* ssl);
2560#ifdef HAVE_CURVE25519
2564 unsigned int keySz,
void* ctx);
2565WOLFSSL_API
void wolfSSL_CTX_SetX25519KeyGenCb(
WOLFSSL_CTX*, CallbackX25519KeyGen);
2566WOLFSSL_API
void wolfSSL_SetX25519KeyGenCtx(
WOLFSSL* ssl,
void *ctx);
2567WOLFSSL_API
void* wolfSSL_GetX25519KeyGenCtx(
WOLFSSL* ssl);
2569typedef int (*CallbackX25519SharedSecret)(
WOLFSSL* ssl,
2571 unsigned char* pubKeyDer,
unsigned int* pubKeySz,
2572 unsigned char* out,
unsigned int* outlen,
2573 int side,
void* ctx);
2575WOLFSSL_API
void wolfSSL_CTX_SetX25519SharedSecretCb(
WOLFSSL_CTX*,
2576 CallbackX25519SharedSecret);
2577WOLFSSL_API
void wolfSSL_SetX25519SharedSecretCtx(
WOLFSSL* ssl,
void *ctx);
2578WOLFSSL_API
void* wolfSSL_GetX25519SharedSecretCtx(
WOLFSSL* ssl);
2583typedef int (*CallbackEd448Sign)(
WOLFSSL* ssl,
2584 const unsigned char* in,
unsigned int inSz,
2585 unsigned char* out,
unsigned int* outSz,
2586 const unsigned char* keyDer,
unsigned int keySz,
2588WOLFSSL_API
void wolfSSL_CTX_SetEd448SignCb(
WOLFSSL_CTX*,
2590WOLFSSL_API
void wolfSSL_SetEd448SignCtx(
WOLFSSL* ssl,
void *ctx);
2591WOLFSSL_API
void* wolfSSL_GetEd448SignCtx(
WOLFSSL* ssl);
2593typedef int (*CallbackEd448Verify)(
WOLFSSL* ssl,
2594 const unsigned char* sig,
unsigned int sigSz,
2595 const unsigned char* msg,
unsigned int msgSz,
2596 const unsigned char* keyDer,
unsigned int keySz,
2597 int* result,
void* ctx);
2598WOLFSSL_API
void wolfSSL_CTX_SetEd448VerifyCb(
WOLFSSL_CTX*,
2599 CallbackEd448Verify);
2600WOLFSSL_API
void wolfSSL_SetEd448VerifyCtx(
WOLFSSL* ssl,
void *ctx);
2601WOLFSSL_API
void* wolfSSL_GetEd448VerifyCtx(
WOLFSSL* ssl);
2607typedef int (*CallbackX448KeyGen)(
WOLFSSL* ssl,
struct curve448_key* key,
2608 unsigned int keySz,
void* ctx);
2609WOLFSSL_API
void wolfSSL_CTX_SetX448KeyGenCb(
WOLFSSL_CTX*, CallbackX448KeyGen);
2610WOLFSSL_API
void wolfSSL_SetX448KeyGenCtx(
WOLFSSL* ssl,
void *ctx);
2611WOLFSSL_API
void* wolfSSL_GetX448KeyGenCtx(
WOLFSSL* ssl);
2613typedef int (*CallbackX448SharedSecret)(
WOLFSSL* ssl,
2614 struct curve448_key* otherKey,
2615 unsigned char* pubKeyDer,
unsigned int* pubKeySz,
2616 unsigned char* out,
unsigned int* outlen,
2617 int side,
void* ctx);
2619WOLFSSL_API
void wolfSSL_CTX_SetX448SharedSecretCb(
WOLFSSL_CTX*,
2620 CallbackX448SharedSecret);
2621WOLFSSL_API
void wolfSSL_SetX448SharedSecretCtx(
WOLFSSL* ssl,
void *ctx);
2622WOLFSSL_API
void* wolfSSL_GetX448SharedSecretCtx(
WOLFSSL* ssl);
2626typedef int (*CallbackRsaSign)(
WOLFSSL* ssl,
2627 const unsigned char* in,
unsigned int inSz,
2628 unsigned char* out,
unsigned int* outSz,
2629 const unsigned char* keyDer,
unsigned int keySz,
2631WOLFSSL_API
void wolfSSL_CTX_SetRsaSignCb(
WOLFSSL_CTX*, CallbackRsaSign);
2632WOLFSSL_API
void wolfSSL_SetRsaSignCtx(
WOLFSSL* ssl,
void *ctx);
2633WOLFSSL_API
void* wolfSSL_GetRsaSignCtx(
WOLFSSL* ssl);
2635typedef int (*CallbackRsaVerify)(
WOLFSSL* ssl,
2636 unsigned char* sig,
unsigned int sigSz,
2637 unsigned char** out,
2638 const unsigned char* keyDer,
unsigned int keySz,
2640WOLFSSL_API
void wolfSSL_CTX_SetRsaVerifyCb(
WOLFSSL_CTX*, CallbackRsaVerify);
2641WOLFSSL_API
void wolfSSL_CTX_SetRsaSignCheckCb(
WOLFSSL_CTX*, CallbackRsaVerify);
2642WOLFSSL_API
void wolfSSL_SetRsaVerifyCtx(
WOLFSSL* ssl,
void *ctx);
2643WOLFSSL_API
void* wolfSSL_GetRsaVerifyCtx(
WOLFSSL* ssl);
2646typedef int (*CallbackRsaPssSign)(
WOLFSSL* ssl,
2647 const unsigned char* in,
unsigned int inSz,
2648 unsigned char* out,
unsigned int* outSz,
2650 const unsigned char* keyDer,
unsigned int keySz,
2652WOLFSSL_API
void wolfSSL_CTX_SetRsaPssSignCb(
WOLFSSL_CTX*, CallbackRsaPssSign);
2653WOLFSSL_API
void wolfSSL_SetRsaPssSignCtx(
WOLFSSL* ssl,
void *ctx);
2654WOLFSSL_API
void* wolfSSL_GetRsaPssSignCtx(
WOLFSSL* ssl);
2656typedef int (*CallbackRsaPssVerify)(
WOLFSSL* ssl,
2657 unsigned char* sig,
unsigned int sigSz,
2658 unsigned char** out,
2660 const unsigned char* keyDer,
unsigned int keySz,
2662WOLFSSL_API
void wolfSSL_CTX_SetRsaPssVerifyCb(
WOLFSSL_CTX*,
2663 CallbackRsaPssVerify);
2664WOLFSSL_API
void wolfSSL_CTX_SetRsaPssSignCheckCb(
WOLFSSL_CTX*,
2665 CallbackRsaPssVerify);
2666WOLFSSL_API
void wolfSSL_SetRsaPssVerifyCtx(
WOLFSSL* ssl,
void *ctx);
2667WOLFSSL_API
void* wolfSSL_GetRsaPssVerifyCtx(
WOLFSSL* ssl);
2671typedef int (*CallbackRsaEnc)(
WOLFSSL* ssl,
2672 const unsigned char* in,
unsigned int inSz,
2673 unsigned char* out,
unsigned int* outSz,
2674 const unsigned char* keyDer,
unsigned int keySz,
2676WOLFSSL_API
void wolfSSL_CTX_SetRsaEncCb(
WOLFSSL_CTX*, CallbackRsaEnc);
2677WOLFSSL_API
void wolfSSL_SetRsaEncCtx(
WOLFSSL* ssl,
void *ctx);
2678WOLFSSL_API
void* wolfSSL_GetRsaEncCtx(
WOLFSSL* ssl);
2681typedef int (*CallbackRsaDec)(
WOLFSSL* ssl,
2682 unsigned char* in,
unsigned int inSz,
2683 unsigned char** out,
2684 const unsigned char* keyDer,
unsigned int keySz,
2686WOLFSSL_API
void wolfSSL_CTX_SetRsaDecCb(
WOLFSSL_CTX*, CallbackRsaDec);
2687WOLFSSL_API
void wolfSSL_SetRsaDecCtx(
WOLFSSL* ssl,
void *ctx);
2688WOLFSSL_API
void* wolfSSL_GetRsaDecCtx(
WOLFSSL* ssl);
2693 WOLFSSL_API
void wolfSSL_CTX_SetCACb(
WOLFSSL_CTX*, CallbackCACache);
2704 const unsigned char* in,
long sz,
int format);
2706#ifdef WOLFSSL_TRUST_PEER_CERT
2712 const unsigned char* buff,
long sz,
int format);
2714 unsigned char*,
int sz);
2721 const char*,
int,
int);
2723 const unsigned char*,
long sz,
int);
2731#if defined(HAVE_OCSP)
2737 unsigned char*,
int sz);
2744 CbOCSPIO, CbOCSPRespFree,
void*);
2748 WOLFSSL_API
int wolfSSL_CertManagerDisableOCSPStapling(
2750#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_SIGNER_DER_CERT) && !defined(NO_FILESYSTEM)
2753 WOLFSSL_API
int wolfSSL_EnableCRL(
WOLFSSL* ssl,
int options);
2754 WOLFSSL_API
int wolfSSL_DisableCRL(
WOLFSSL* ssl);
2755 WOLFSSL_API
int wolfSSL_LoadCRL(
WOLFSSL*,
const char*,
int,
int);
2756 WOLFSSL_API
int wolfSSL_LoadCRLBuffer(
WOLFSSL*,
2757 const unsigned char*,
long sz,
int);
2758 WOLFSSL_API
int wolfSSL_SetCRL_Cb(
WOLFSSL*, CbMissingCRL);
2760 WOLFSSL_API
int wolfSSL_SetCRL_IOCb(
WOLFSSL* ssl, CbCrlIO cb);
2762 WOLFSSL_API
int wolfSSL_EnableOCSP(
WOLFSSL*,
int options);
2763 WOLFSSL_API
int wolfSSL_DisableOCSP(
WOLFSSL*);
2764 WOLFSSL_API
int wolfSSL_SetOCSP_OverrideURL(
WOLFSSL*,
const char*);
2765 WOLFSSL_API
int wolfSSL_SetOCSP_Cb(
WOLFSSL*, CbOCSPIO, CbOCSPRespFree,
void*);
2766 WOLFSSL_API
int wolfSSL_EnableOCSPStapling(
WOLFSSL*);
2767 WOLFSSL_API
int wolfSSL_DisableOCSPStapling(
WOLFSSL*);
2769 WOLFSSL_API
int wolfSSL_CTX_EnableCRL(
WOLFSSL_CTX* ctx,
int options);
2770 WOLFSSL_API
int wolfSSL_CTX_DisableCRL(
WOLFSSL_CTX* ctx);
2771 WOLFSSL_API
int wolfSSL_CTX_LoadCRL(
WOLFSSL_CTX*,
const char*,
int,
int);
2772 WOLFSSL_API
int wolfSSL_CTX_LoadCRLBuffer(
WOLFSSL_CTX*,
2773 const unsigned char*,
long sz,
int);
2774 WOLFSSL_API
int wolfSSL_CTX_SetCRL_Cb(
WOLFSSL_CTX*, CbMissingCRL);
2776 WOLFSSL_API
int wolfSSL_CTX_SetCRL_IOCb(
WOLFSSL_CTX*, CbCrlIO);
2779 WOLFSSL_API
int wolfSSL_CTX_EnableOCSP(
WOLFSSL_CTX*,
int options);
2780 WOLFSSL_API
int wolfSSL_CTX_DisableOCSP(
WOLFSSL_CTX*);
2781 WOLFSSL_API
int wolfSSL_CTX_SetOCSP_OverrideURL(
WOLFSSL_CTX*,
const char*);
2782 WOLFSSL_API
int wolfSSL_CTX_SetOCSP_Cb(
WOLFSSL_CTX*,
2783 CbOCSPIO, CbOCSPRespFree,
void*);
2784 WOLFSSL_API
int wolfSSL_CTX_EnableOCSPStapling(
WOLFSSL_CTX*);
2785 WOLFSSL_API
int wolfSSL_CTX_DisableOCSPStapling(
WOLFSSL_CTX*);
2789#ifdef SINGLE_THREADED
2790 WOLFSSL_API
int wolfSSL_CTX_new_rng(
WOLFSSL_CTX*);
2799WOLFSSL_API
int wolfSSL_KeepHandshakeResources(
WOLFSSL* ssl);
2800WOLFSSL_API
int wolfSSL_FreeHandshakeResources(
WOLFSSL* ssl);
2802WOLFSSL_API
int wolfSSL_CTX_UseClientSuites(
WOLFSSL_CTX* ctx);
2803WOLFSSL_API
int wolfSSL_UseClientSuites(
WOLFSSL* ssl);
2806#define wolfSSL_UseAsync wolfSSL_SetDevId
2807#define wolfSSL_CTX_UseAsync wolfSSL_CTX_SetDevId
2808WOLFSSL_ABI WOLFSSL_API
int wolfSSL_SetDevId(
WOLFSSL*,
int devId);
2809WOLFSSL_ABI WOLFSSL_API
int wolfSSL_CTX_SetDevId(
WOLFSSL_CTX*,
int devId);
2822 WOLFSSL_SNI_HOST_NAME = 0
2825WOLFSSL_ABI WOLFSSL_API
int wolfSSL_UseSNI(
WOLFSSL*,
unsigned char,
2826 const void*,
unsigned short);
2827WOLFSSL_ABI WOLFSSL_API
int wolfSSL_CTX_UseSNI(
WOLFSSL_CTX*,
unsigned char,
2828 const void*,
unsigned short);
2830#ifndef NO_WOLFSSL_SERVER
2835 WOLFSSL_SNI_CONTINUE_ON_MISMATCH = 0x01,
2839 WOLFSSL_SNI_ANSWER_ON_MISMATCH = 0x02,
2842 WOLFSSL_SNI_ABORT_ON_ABSENCE = 0x04,
2845WOLFSSL_API
void wolfSSL_SNI_SetOptions(
WOLFSSL* ssl,
unsigned char type,
2846 unsigned char options);
2847WOLFSSL_API
void wolfSSL_CTX_SNI_SetOptions(
WOLFSSL_CTX* ctx,
2848 unsigned char type,
unsigned char options);
2849WOLFSSL_API
int wolfSSL_SNI_GetFromBuffer(
2850 const unsigned char* clientHello,
unsigned int helloSz,
2851 unsigned char type,
unsigned char* sni,
unsigned int* inOutSz);
2857 WOLFSSL_SNI_NO_MATCH = 0,
2859 WOLFSSL_SNI_REAL_MATCH = 2,
2860 WOLFSSL_SNI_FORCE_KEEP = 3
2865WOLFSSL_API
unsigned short wolfSSL_SNI_GetRequest(
WOLFSSL *ssl,
2866 unsigned char type,
void** data);
2871#ifdef HAVE_TRUSTED_CA
2875 WOLFSSL_TRUSTED_CA_PRE_AGREED = 0,
2876 WOLFSSL_TRUSTED_CA_KEY_SHA1 = 1,
2877 WOLFSSL_TRUSTED_CA_X509_NAME = 2,
2878 WOLFSSL_TRUSTED_CA_CERT_SHA1 = 3
2881WOLFSSL_API
int wolfSSL_UseTrustedCA(
WOLFSSL* ssl,
unsigned char type,
2882 const unsigned char* certId,
unsigned int certIdSz);
2890 WOLFSSL_ALPN_NO_MATCH = 0,
2891 WOLFSSL_ALPN_MATCH = 1,
2892 WOLFSSL_ALPN_CONTINUE_ON_MISMATCH = 2,
2893 WOLFSSL_ALPN_FAILED_ON_MISMATCH = 4,
2897 WOLFSSL_MAX_ALPN_PROTO_NAME_LEN = 255,
2898 WOLFSSL_MAX_ALPN_NUMBER = 257
2901#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
2902typedef int (*CallbackALPNSelect)(
WOLFSSL* ssl,
const unsigned char** out,
2903 unsigned char* outLen,
const unsigned char* in,
unsigned int inLen,
2908 char *protocol_name_list,
2909 unsigned int protocol_name_listSz,
2910 unsigned char options);
2913 unsigned short *size);
2916 unsigned short *listSz);
2917WOLFSSL_API
int wolfSSL_ALPN_FreePeerProtocol(
WOLFSSL* ssl,
char **list);
2921#ifdef HAVE_MAX_FRAGMENT
2925 WOLFSSL_MFL_2_9 = 1,
2926 WOLFSSL_MFL_2_10 = 2,
2927 WOLFSSL_MFL_2_11 = 3,
2928 WOLFSSL_MFL_2_12 = 4,
2929 WOLFSSL_MFL_2_13 = 5,
2930 WOLFSSL_MFL_2_8 = 6,
2931 WOLFSSL_MFL_MIN = WOLFSSL_MFL_2_9,
2932 WOLFSSL_MFL_MAX = WOLFSSL_MFL_2_8,
2935#ifndef NO_WOLFSSL_CLIENT
2937WOLFSSL_API
int wolfSSL_UseMaxFragment(
WOLFSSL* ssl,
unsigned char mfl);
2938WOLFSSL_API
int wolfSSL_CTX_UseMaxFragment(
WOLFSSL_CTX* ctx,
unsigned char mfl);
2944#ifdef HAVE_TRUNCATED_HMAC
2945#ifndef NO_WOLFSSL_CLIENT
2947WOLFSSL_API
int wolfSSL_UseTruncatedHMAC(
WOLFSSL* ssl);
2948WOLFSSL_API
int wolfSSL_CTX_UseTruncatedHMAC(
WOLFSSL_CTX* ctx);
2956 WOLFSSL_CSR_OCSP = 1
2961 WOLFSSL_CSR_OCSP_USE_NONCE = 0x01
2964#ifdef HAVE_CERTIFICATE_STATUS_REQUEST
2965#ifndef NO_WOLFSSL_CLIENT
2967WOLFSSL_API
int wolfSSL_UseOCSPStapling(
WOLFSSL* ssl,
2968 unsigned char status_type,
unsigned char options);
2970WOLFSSL_API
int wolfSSL_CTX_UseOCSPStapling(
WOLFSSL_CTX* ctx,
2971 unsigned char status_type,
unsigned char options);
2979 WOLFSSL_CSR2_OCSP = 1,
2980 WOLFSSL_CSR2_OCSP_MULTI = 2
2985 WOLFSSL_CSR2_OCSP_USE_NONCE = 0x01
2988#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
2989#ifndef NO_WOLFSSL_CLIENT
2991WOLFSSL_API
int wolfSSL_UseOCSPStaplingV2(
WOLFSSL* ssl,
2992 unsigned char status_type,
unsigned char options);
2994WOLFSSL_API
int wolfSSL_CTX_UseOCSPStaplingV2(
WOLFSSL_CTX* ctx,
2995 unsigned char status_type,
unsigned char options);
3003 WOLFSSL_ECC_SECT163K1 = 1,
3004 WOLFSSL_ECC_SECT163R1 = 2,
3005 WOLFSSL_ECC_SECT163R2 = 3,
3006 WOLFSSL_ECC_SECT193R1 = 4,
3007 WOLFSSL_ECC_SECT193R2 = 5,
3008 WOLFSSL_ECC_SECT233K1 = 6,
3009 WOLFSSL_ECC_SECT233R1 = 7,
3010 WOLFSSL_ECC_SECT239K1 = 8,
3011 WOLFSSL_ECC_SECT283K1 = 9,
3012 WOLFSSL_ECC_SECT283R1 = 10,
3013 WOLFSSL_ECC_SECT409K1 = 11,
3014 WOLFSSL_ECC_SECT409R1 = 12,
3015 WOLFSSL_ECC_SECT571K1 = 13,
3016 WOLFSSL_ECC_SECT571R1 = 14,
3018 WOLFSSL_ECC_SECP160K1 = 15,
3019 WOLFSSL_ECC_SECP160R1 = 16,
3020 WOLFSSL_ECC_SECP160R2 = 17,
3021 WOLFSSL_ECC_SECP192K1 = 18,
3022 WOLFSSL_ECC_SECP192R1 = 19,
3023 WOLFSSL_ECC_SECP224K1 = 20,
3024 WOLFSSL_ECC_SECP224R1 = 21,
3025 WOLFSSL_ECC_SECP256K1 = 22,
3026 WOLFSSL_ECC_SECP256R1 = 23,
3027 WOLFSSL_ECC_SECP384R1 = 24,
3028 WOLFSSL_ECC_SECP521R1 = 25,
3029 WOLFSSL_ECC_BRAINPOOLP256R1 = 26,
3030 WOLFSSL_ECC_BRAINPOOLP384R1 = 27,
3031 WOLFSSL_ECC_BRAINPOOLP512R1 = 28,
3032 WOLFSSL_ECC_X25519 = 29,
3033 WOLFSSL_ECC_X448 = 30,
3035 WOLFSSL_FFDHE_2048 = 256,
3036 WOLFSSL_FFDHE_3072 = 257,
3037 WOLFSSL_FFDHE_4096 = 258,
3038 WOLFSSL_FFDHE_6144 = 259,
3039 WOLFSSL_FFDHE_8192 = 260,
3043 WOLFSSL_EC_PF_UNCOMPRESSED = 0,
3045 WOLFSSL_EC_PF_X962_COMP_PRIME = 1,
3046 WOLFSSL_EC_PF_X962_COMP_CHAR2 = 2,
3050#ifdef HAVE_SUPPORTED_CURVES
3051#ifndef NO_WOLFSSL_CLIENT
3053WOLFSSL_API
int wolfSSL_UseSupportedCurve(
WOLFSSL* ssl, word16 name);
3054WOLFSSL_API
int wolfSSL_CTX_UseSupportedCurve(
WOLFSSL_CTX* ctx,
3061WOLFSSL_API
int wolfSSL_UseKeyShare(
WOLFSSL* ssl, word16 group);
3062WOLFSSL_API
int wolfSSL_NoKeyShares(
WOLFSSL* ssl);
3067#ifdef HAVE_SECURE_RENEGOTIATION
3070WOLFSSL_API
int wolfSSL_CTX_UseSecureRenegotiation(
WOLFSSL_CTX* ctx);
3071WOLFSSL_API
int wolfSSL_StartSecureRenegotiation(
WOLFSSL* ssl,
int resume);
3073WOLFSSL_API
int wolfSSL_SecureResume(
WOLFSSL* ssl);
3074WOLFSSL_API
long wolfSSL_SSL_get_secure_renegotiation_support(
WOLFSSL* ssl);
3079#ifdef HAVE_SESSION_TICKET
3081#ifndef NO_WOLFSSL_CLIENT
3086typedef int (*CallbackSessionTicket)(
WOLFSSL*,
const unsigned char*, int,
void*);
3087WOLFSSL_API
int wolfSSL_set_SessionTicket_cb(
WOLFSSL*,
3088 CallbackSessionTicket,
void*);
3092#define WOLFSSL_TICKET_NAME_SZ 16
3093#define WOLFSSL_TICKET_IV_SZ 16
3094#define WOLFSSL_TICKET_MAC_SZ 32
3097 WOLFSSL_TICKET_RET_FATAL = -1,
3098 WOLFSSL_TICKET_RET_OK = 0,
3099 WOLFSSL_TICKET_RET_REJECT,
3100 WOLFSSL_TICKET_RET_CREATE
3103#ifndef NO_WOLFSSL_SERVER
3105typedef int (*SessionTicketEncCb)(
WOLFSSL*,
3106 unsigned char key_name[WOLFSSL_TICKET_NAME_SZ],
3107 unsigned char iv[WOLFSSL_TICKET_IV_SZ],
3108 unsigned char mac[WOLFSSL_TICKET_MAC_SZ],
3109 int enc,
unsigned char*, int,
int*,
void*);
3110WOLFSSL_API
int wolfSSL_CTX_set_TicketEncCb(
WOLFSSL_CTX* ctx,
3111 SessionTicketEncCb);
3112WOLFSSL_API
int wolfSSL_CTX_set_TicketHint(
WOLFSSL_CTX* ctx,
int);
3113WOLFSSL_API
int wolfSSL_CTX_set_TicketEncCtx(
WOLFSSL_CTX* ctx,
void*);
3122 WOLFSSL_NTRU_EESS439 = 0x0101,
3123 WOLFSSL_NTRU_EESS593 = 0x0102,
3124 WOLFSSL_NTRU_EESS743 = 0x0103,
3125 WOLFSSL_LWE_XXX = 0x0201,
3126 WOLFSSL_HFE_XXX = 0x0301,
3127 WOLFSSL_NULL_QSH = 0xFFFF
3134#ifndef NO_WOLFSSL_CLIENT
3144WOLFSSL_API
int wolfSSL_DisableExtendedMasterSecret(
WOLFSSL* ssl);
3145WOLFSSL_API
int wolfSSL_CTX_DisableExtendedMasterSecret(
WOLFSSL_CTX* ctx);
3148#define WOLFSSL_CRL_MONITOR 0x01
3149#define WOLFSSL_CRL_START_MON 0x02
3153typedef int (*HandShakeDoneCb)(
WOLFSSL*,
void*);
3154WOLFSSL_API
int wolfSSL_SetHsDoneCb(
WOLFSSL*, HandShakeDoneCb,
void*);
3159 unsigned int* total,
3161 unsigned int* maxSessions);
3165 const unsigned char* pms, word32 pmsLen,
3166 const unsigned char* cr,
const unsigned char* sr,
3167 int tls1_2,
int hash_type);
3170int wolfSSL_MakeTlsExtendedMasterSecret(
unsigned char* ms, word32 msLen,
3171 const unsigned char* pms, word32 pmsLen,
3172 const unsigned char* sHash, word32 sHashLen,
3173 int tls1_2,
int hash_type);
3177 const unsigned char* ms, word32 msLen,
3178 const unsigned char* sr,
const unsigned char* cr,
3179 int tls1_2,
int hash_type);
3181#ifdef WOLFSSL_CALLBACKS
3188WOLFSSL_API
int wolfSSL_connect_ex(
WOLFSSL*, HandShakeCallBack, TimeoutCallBack,
3190WOLFSSL_API
int wolfSSL_accept_ex(
WOLFSSL*, HandShakeCallBack, TimeoutCallBack,
3196#ifdef WOLFSSL_HAVE_WOLFSCEP
3197 WOLFSSL_API
void wolfSSL_wolfSCEP(
void);
3200#ifdef WOLFSSL_HAVE_CERT_SERVICE
3201 WOLFSSL_API
void wolfSSL_cert_service(
void);
3204#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
3208#include <wolfssl/openssl/asn1.h>
3225#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
3228 WOLFSSL_SYS_ACCEPT = 0,
3230 WOLFSSL_SYS_CONNECT,
3233 WOLFSSL_SYS_GETADDRINFO,
3234 WOLFSSL_SYS_GETSOCKOPT,
3235 WOLFSSL_SYS_GETSOCKNAME,
3236 WOLFSSL_SYS_GETHOSTBYNAME,
3237 WOLFSSL_SYS_GETNAMEINFO,
3238 WOLFSSL_SYS_GETSERVBYNAME,
3239 WOLFSSL_SYS_IOCTLSOCKET,
3241 WOLFSSL_SYS_OPENDIR,
3242 WOLFSSL_SYS_SETSOCKOPT,
3247WOLFSSL_API
const char* wolfSSL_OBJ_nid2sn(
int n);
3250WOLFSSL_API
int wolfSSL_OBJ_sn2nid(
const char *sn);
3252WOLFSSL_API
const char* wolfSSL_OBJ_nid2ln(
int n);
3253WOLFSSL_API
int wolfSSL_OBJ_ln2nid(
const char *ln);
3256WOLFSSL_API
int wolfSSL_OBJ_txt2nid(
const char *sn);
3261WOLFSSL_API
int wolfSSL_OBJ_obj2txt(
char *buf,
int buf_len,
WOLFSSL_ASN1_OBJECT *a,
int no_name);
3263WOLFSSL_API
void wolfSSL_OBJ_cleanup(
void);
3264WOLFSSL_API
int wolfSSL_OBJ_create(
const char *oid,
const char *sn,
const char *ln);
3266WOLFSSL_LOCAL
int NIDToEccEnum(
int n);
3270WOLFSSL_API
unsigned long wolfSSL_ERR_peek_last_error_line(
const char **file,
int *line);
3271WOLFSSL_API
long wolfSSL_ctrl(
WOLFSSL* ssl,
int cmd,
long opt,
void* pt);
3272WOLFSSL_API
long wolfSSL_CTX_ctrl(
WOLFSSL_CTX* ctx,
int cmd,
long opt,
void* pt);
3273WOLFSSL_API
long wolfSSL_CTX_callback_ctrl(
WOLFSSL_CTX* ctx,
int cmd,
void (*fp)(
void));
3274WOLFSSL_API
long wolfSSL_CTX_clear_extra_chain_certs(
WOLFSSL_CTX* ctx);
3279 const unsigned char* data,
int dataSz);
3282 const unsigned char *data,
int dataSz);
3286 const char *field,
int type,
const unsigned char *bytes,
int len,
int loc,
3288WOLFSSL_API
int wolfSSL_X509_NAME_add_entry_by_NID(
WOLFSSL_X509_NAME *name,
int nid,
3289 int type,
const unsigned char *bytes,
3290 int len,
int loc,
int set);
3298 int nid,
int* c,
int* idx);
3299WOLFSSL_API
int wolfSSL_X509_get_ext_count(
const WOLFSSL_X509* passedCert);
3310 const WOLFSSL_EVP_MD* digest,
unsigned char* buf,
unsigned int* len);
3314 const unsigned char* der,
long derSz);
3320WOLFSSL_API
int wolfSSL_CTX_use_PrivateKey_ASN1(
int pri,
WOLFSSL_CTX* ctx,
3321 unsigned char* der,
long derSz);
3323#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
3329WOLFSSL_API
int wolfSSL_sk_X509_EXTENSION_push(
WOLFSSL_STACK* sk,
3331WOLFSSL_API
void wolfSSL_sk_X509_EXTENSION_free(
WOLFSSL_STACK* sk);
3343 unsigned char* out,
int outSz);
3349#if !defined(NO_FILESYSTEM)
3358WOLFSSL_API
size_t wolfSSL_BIO_wpending(
const WOLFSSL_BIO *bio);
3362 unsigned char *out,
size_t outlen);
3365WOLFSSL_API
int wolfSSL_CTX_set_min_proto_version(
WOLFSSL_CTX*,
int);
3366WOLFSSL_API
int wolfSSL_CTX_set_max_proto_version(
WOLFSSL_CTX*,
int);
3369 unsigned char* out,
size_t outSz);
3378 pem_password_cb* cb,
void* u);
3379#ifndef NO_FILESYSTEM
3383WOLFSSL_API
int wolfSSL_PEM_get_EVP_CIPHER_INFO(
char* header,
3386 unsigned char* data,
long* len,
3387 pem_password_cb* callback,
void* ctx);
3399#if defined(OPENSSL_EXTRA) \
3400 || defined(OPENSSL_ALL) \
3401 || defined(HAVE_LIGHTY) \
3402 || defined(WOLFSSL_MYSQL_COMPATIBLE) \
3403 || defined(HAVE_STUNNEL) \
3404 || defined(WOLFSSL_NGINX) \
3405 || defined(WOLFSSL_HAPROXY)
3411WOLFSSL_API
int wolfSSL_BIO_read_filename(
WOLFSSL_BIO *b,
const char *name);
3413WOLFSSL_API
void wolfSSL_set_verify_depth(
WOLFSSL *ssl,
int depth);
3414WOLFSSL_API
void* wolfSSL_get_app_data(
const WOLFSSL *ssl);
3415WOLFSSL_API
int wolfSSL_set_app_data(
WOLFSSL *ssl,
void *arg);
3418WOLFSSL_API
unsigned char *wolfSSL_SHA1(
const unsigned char *d,
size_t n,
unsigned char *md);
3419WOLFSSL_API
unsigned char *wolfSSL_SHA256(
const unsigned char *d,
size_t n,
unsigned char *md);
3420WOLFSSL_API
unsigned char *wolfSSL_SHA384(
const unsigned char *d,
size_t n,
unsigned char *md);
3421WOLFSSL_API
unsigned char *wolfSSL_SHA512(
const unsigned char *d,
size_t n,
unsigned char *md);
3424WOLFSSL_API
int wolfSSL_X509_check_ca(
WOLFSSL_X509 *x509);
3426#ifndef NO_FILESYSTEM
3429WOLFSSL_API
WOLFSSL_BIO* wolfSSL_BIO_new_fp(XFILE fp,
int c);
3437#if defined(OPENSSL_ALL) \
3438 || defined(HAVE_STUNNEL) \
3439 || defined(HAVE_LIGHTY) \
3440 || defined(WOLFSSL_MYSQL_COMPATIBLE) \
3441 || defined(WOLFSSL_HAPROXY) \
3442 || defined(OPENSSL_EXTRA)
3444WOLFSSL_API
WOLFSSL_BIO* wolfSSL_BIO_new_file(
const char *filename,
const char *mode);
3447 WOLFSSL_DH **x, pem_password_cb *cb,
void *u);
3455#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && defined(WOLFSSL_CERT_GEN) && \
3456 defined(WOLFSSL_CERT_REQ)
3457WOLFSSL_API
int wolfSSL_i2d_X509_REQ(
WOLFSSL_X509* req,
unsigned char** out);
3459WOLFSSL_API
void wolfSSL_X509_REQ_free(
WOLFSSL_X509* req);
3461 const WOLFSSL_EVP_MD *md);
3462WOLFSSL_API
int wolfSSL_X509_REQ_add_extensions(
WOLFSSL_X509* req,
3464WOLFSSL_API
int wolfSSL_X509_REQ_set_subject_name(
WOLFSSL_X509 *req,
3466WOLFSSL_API
int wolfSSL_X509_REQ_set_pubkey(
WOLFSSL_X509 *req,
3471#if defined(OPENSSL_ALL) \
3472 || defined(HAVE_STUNNEL) \
3473 || defined(WOLFSSL_NGINX) \
3474 || defined(WOLFSSL_HAPROXY) \
3475 || defined(OPENSSL_EXTRA) \
3476 || defined(HAVE_LIGHTY)
3478#include <wolfssl/openssl/crypto.h>
3481typedef int (*CallbackSniRecv)(
WOLFSSL *ssl,
int *ret,
void* exArg);
3483WOLFSSL_API
int wolfSSL_CRYPTO_set_mem_ex_functions(
void *(*m) (
size_t,
const char *,
int),
3484 void *(*r) (
void *,
size_t,
const char *,
int),
void (*f) (
void *));
3486WOLFSSL_API
void wolfSSL_CRYPTO_cleanup_all_ex_data(
void);
3488WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_768_prime(WOLFSSL_BIGNUM* bn);
3489WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_1024_prime(WOLFSSL_BIGNUM* bn);
3490WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_1536_prime(WOLFSSL_BIGNUM* bn);
3491WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_2048_prime(WOLFSSL_BIGNUM* bn);
3492WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_3072_prime(WOLFSSL_BIGNUM* bn);
3493WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_4096_prime(WOLFSSL_BIGNUM* bn);
3494WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_6144_prime(WOLFSSL_BIGNUM* bn);
3495WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_DH_8192_prime(WOLFSSL_BIGNUM* bn);
3497WOLFSSL_API
WOLFSSL_DH *wolfSSL_DH_generate_parameters(
int prime_len,
int generator,
3498 void (*callback) (
int,
int,
void *),
void *cb_arg);
3500WOLFSSL_API
int wolfSSL_DH_generate_parameters_ex(
WOLFSSL_DH*,
int,
int,
3501 void (*callback) (
int,
int,
void *));
3503WOLFSSL_API
void wolfSSL_ERR_load_crypto_strings(
void);
3507WOLFSSL_API
int wolfSSL_FIPS_mode(
void);
3509WOLFSSL_API
int wolfSSL_FIPS_mode_set(
int r);
3511WOLFSSL_API
int wolfSSL_RAND_set_rand_method(
const void *meth);
3513WOLFSSL_API
int wolfSSL_CIPHER_get_bits(
const WOLFSSL_CIPHER *c,
int *alg_bits);
3521WOLFSSL_API
WOLFSSL_STACK* wolfSSL_sk_X509_INFO_new_null(
void);
3532typedef int (*wolf_sk_compare_cb)(
const void*
const *a,
3533 const void*
const *b);
3535 wolf_sk_compare_cb);
3540WOLFSSL_API
int wolfSSL_sk_X509_NAME_set_cmp_func(
3558WOLFSSL_API
int wolfSSL_ASN1_BIT_STRING_get_bit(
3560WOLFSSL_API
int wolfSSL_ASN1_BIT_STRING_set_bit(
3565WOLFSSL_API
int wolfSSL_version(
WOLFSSL*);
3567WOLFSSL_API
int wolfSSL_get_state(
const WOLFSSL*);
3575WOLFSSL_API
void* wolfSSL_SESSION_get_ex_data(
const WOLFSSL_SESSION*,
int);
3577WOLFSSL_API
int wolfSSL_SESSION_set_ex_data(
WOLFSSL_SESSION*,
int,
void*);
3579WOLFSSL_API
int wolfSSL_SESSION_get_ex_new_index(
long,
void*,
void*,
void*,
3585WOLFSSL_API
const unsigned char* wolfSSL_SESSION_get_id(
WOLFSSL_SESSION*,
3590WOLFSSL_API
int wolfSSL_set_tlsext_host_name(
WOLFSSL *,
const char *);
3592WOLFSSL_API
const char* wolfSSL_get_servername(
WOLFSSL *,
unsigned char);
3596WOLFSSL_API VerifyCallback wolfSSL_CTX_get_verify_callback(
WOLFSSL_CTX*);
3598WOLFSSL_API VerifyCallback wolfSSL_get_verify_callback(
WOLFSSL*);
3600WOLFSSL_API
void wolfSSL_CTX_set_servername_callback(
WOLFSSL_CTX *,
3602WOLFSSL_API
int wolfSSL_CTX_set_tlsext_servername_callback(
WOLFSSL_CTX *,
3605WOLFSSL_API
int wolfSSL_CTX_set_servername_arg(
WOLFSSL_CTX *,
void*);
3607WOLFSSL_API
void wolfSSL_ERR_remove_thread_state(
void*);
3610#define WOLFSSL_ERR_remove_thread_state wolfSSL_ERR_remove_thread_state
3612#ifndef NO_FILESYSTEM
3613WOLFSSL_API
void wolfSSL_print_all_errors_fp(XFILE fp);
3616WOLFSSL_API
void wolfSSL_THREADID_set_callback(
void (*threadid_func)(
void*));
3618WOLFSSL_API
void wolfSSL_THREADID_set_numeric(
void*
id,
unsigned long val);
3631#if defined(OPENSSL_EXTRA) && defined(HAVE_ECC)
3632WOLFSSL_API
int wolfSSL_CTX_set1_curves_list(
WOLFSSL_CTX* ctx,
const char* names);
3633WOLFSSL_API
int wolfSSL_set1_curves_list(
WOLFSSL* ssl,
const char* names);
3636#if defined(OPENSSL_ALL) || \
3637 defined(HAVE_STUNNEL) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \
3638 defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
3640WOLFSSL_API
int wolfSSL_CTX_get_verify_mode(
WOLFSSL_CTX* ctx);
3650#ifdef WOLFSSL_ASYNC_CRYPT
3651WOLFSSL_API
int wolfSSL_AsyncPoll(
WOLFSSL* ssl, WOLF_EVENT_FLAG flags);
3653 WOLF_EVENT_FLAG flags,
int* eventCount);
3657typedef void (*SSL_Msg_Cb)(
int write_p,
int version,
int content_type,
3658 const void *buf,
size_t len,
WOLFSSL *ssl,
void *arg);
3660WOLFSSL_API
int wolfSSL_CTX_set_msg_callback(
WOLFSSL_CTX *ctx, SSL_Msg_Cb cb);
3662WOLFSSL_API
int wolfSSL_CTX_set_msg_callback_arg(
WOLFSSL_CTX *ctx,
void* arg);
3664WOLFSSL_API
unsigned long wolfSSL_ERR_peek_error_line_data(
const char **file,
3665 int *line,
const char **data,
int *flags);
3666WOLFSSL_API
int wolfSSL_CTX_set_alpn_protos(
WOLFSSL_CTX *ctx,
3667 const unsigned char *protos,
unsigned int protos_len);
3668WOLFSSL_API
int wolfSSL_set_alpn_protos(
WOLFSSL* ssl,
3669 const unsigned char* protos,
unsigned int protos_len);
3670WOLFSSL_API
void *wolfSSL_OPENSSL_memdup(
const void *data,
3671 size_t siz,
const char* file,
int line);
3672WOLFSSL_API
void wolfSSL_ERR_load_BIO_strings(
void);
3675#if defined(OPENSSL_ALL) \
3676 || defined(WOLFSSL_NGINX) \
3677 || defined(WOLFSSL_HAPROXY) \
3678 || defined(OPENSSL_EXTRA)
3679WOLFSSL_API
void wolfSSL_OPENSSL_config(
char *config_name);
3682#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
3684WOLFSSL_LOCAL
int wolfSSL_get_ocsp_response(
WOLFSSL* ssl,
byte** response);
3686WOLFSSL_LOCAL
char* wolfSSL_get_ocsp_url(
WOLFSSL* ssl);
3688WOLFSSL_API
int wolfSSL_set_ocsp_url(
WOLFSSL* ssl,
char* url);
3691#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) \
3692 || defined(OPENSSL_EXTRA) || defined(HAVE_LIGHTY)
3694WOLFSSL_API
int wolfSSL_X509_get_ex_new_index(
int idx,
void *arg,
void *a,
3696WOLFSSL_API
void *wolfSSL_X509_get_ex_data(
WOLFSSL_X509 *x509,
int idx);
3697WOLFSSL_API
int wolfSSL_X509_set_ex_data(
WOLFSSL_X509 *x509,
int idx,
3700 const WOLFSSL_EVP_MD *type,
unsigned char *md,
unsigned int *len);
3702WOLFSSL_API
long wolfSSL_SSL_CTX_get_timeout(
const WOLFSSL_CTX *ctx);
3703WOLFSSL_API
long wolfSSL_get_timeout(
WOLFSSL* ssl);
3704WOLFSSL_API
int wolfSSL_SSL_CTX_set_tmp_ecdh(
WOLFSSL_CTX *ctx,
3706WOLFSSL_API
int wolfSSL_SSL_CTX_remove_session(
WOLFSSL_CTX *,
3711WOLFSSL_API
int wolfSSL_SSL_do_handshake(
WOLFSSL *s);
3712WOLFSSL_API
int wolfSSL_SSL_in_init(
WOLFSSL*);
3713WOLFSSL_API
int wolfSSL_SSL_in_connect_init(
WOLFSSL*);
3715#ifndef NO_SESSION_CACHE
3718WOLFSSL_API
int wolfSSL_X509_check_host(
WOLFSSL_X509 *x,
const char *chk,
3719 size_t chklen,
unsigned int flags,
char **peername);
3721WOLFSSL_API
int wolfSSL_i2a_ASN1_INTEGER(
WOLFSSL_BIO *bp,
3724#ifdef HAVE_SESSION_TICKET
3725WOLFSSL_API
int wolfSSL_CTX_set_tlsext_ticket_key_cb(
WOLFSSL_CTX *,
int (*)(
3726 WOLFSSL *ssl,
unsigned char *name,
unsigned char *iv,
3730#if defined(HAVE_OCSP) || defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL) || \
3731 defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
3732WOLFSSL_API
int wolfSSL_CTX_get_extra_chain_certs(
WOLFSSL_CTX* ctx,
3734WOLFSSL_API
int wolfSSL_CTX_set_tlsext_status_cb(
WOLFSSL_CTX* ctx,
3737WOLFSSL_API
int wolfSSL_X509_STORE_CTX_get1_issuer(
WOLFSSL_X509 **issuer,
3740WOLFSSL_API
void wolfSSL_X509_email_free(
WOLF_STACK_OF(WOLFSSL_STRING) *sk);
3743WOLFSSL_API
int wolfSSL_X509_check_issued(
WOLFSSL_X509 *issuer,
3746WOLFSSL_API
char* wolfSSL_sk_WOLFSSL_STRING_value(
3750WOLFSSL_API
int PEM_write_bio_WOLFSSL_X509(
WOLFSSL_BIO *bio,
3756WOLFSSL_API
void wolfSSL_get0_alpn_selected(
const WOLFSSL *ssl,
3757 const unsigned char **data,
unsigned int *len);
3758WOLFSSL_API
int wolfSSL_select_next_proto(
unsigned char **out,
3759 unsigned char *outlen,
3760 const unsigned char *in,
unsigned int inlen,
3761 const unsigned char *client,
3762 unsigned int client_len);
3763WOLFSSL_API
void wolfSSL_CTX_set_alpn_select_cb(
WOLFSSL_CTX *ctx,
3765 const unsigned char **out,
3766 unsigned char *outlen,
3767 const unsigned char *in,
3769 void *arg),
void *arg);
3770WOLFSSL_API
void wolfSSL_CTX_set_next_protos_advertised_cb(
WOLFSSL_CTX *s,
3772 const unsigned char **out,
3773 unsigned int *outlen,
3774 void *arg),
void *arg);
3775WOLFSSL_API
void wolfSSL_CTX_set_next_proto_select_cb(
WOLFSSL_CTX *s,
3777 unsigned char **out,
3778 unsigned char *outlen,
3779 const unsigned char *in,
3781 void *arg),
void *arg);
3782WOLFSSL_API
void wolfSSL_get0_next_proto_negotiated(
const WOLFSSL *s,
const unsigned char **data,
3787#if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
3788WOLFSSL_API
const unsigned char *SSL_SESSION_get0_id_context(
3790WOLFSSL_API
size_t SSL_get_finished(
const WOLFSSL *s,
void *buf,
size_t count);
3791WOLFSSL_API
size_t SSL_get_peer_finished(
const WOLFSSL *s,
void *buf,
size_t count);
3794WOLFSSL_API
int SSL_SESSION_set1_id(
WOLFSSL_SESSION *s,
const unsigned char *sid,
unsigned int sid_len);
3795WOLFSSL_API
int SSL_SESSION_set1_id_context(
WOLFSSL_SESSION *s,
const unsigned char *sid_ctx,
unsigned int sid_ctx_len);
3813WOLFSSL_API
int wolfSSL_X509_STORE_load_locations(
WOLFSSL_X509_STORE *str,
const char *file,
const char *dir);
3816WOLFSSL_API
int wolfSSL_sk_SSL_CIPHER_find(
3823WOLFSSL_API
WOLFSSL_CIPHER* wolfSSL_sk_SSL_CIPHER_value(
void *ciphers,
int idx);
3824WOLFSSL_API
void ERR_load_SSL_strings(
void);
3825WOLFSSL_API
void wolfSSL_EC_POINT_dump(
const char *msg,
const WOLFSSL_EC_POINT *p);
3827WOLFSSL_API
const char *wolfSSL_ASN1_tag2str(
int tag);
3836WOLFSSL_API
long wolfSSL_X509_get_version(
const WOLFSSL_X509 *x);
3837WOLFSSL_API
int wolfSSL_X509_get_signature_nid(
const WOLFSSL_X509* x);
3839WOLFSSL_API
int wolfSSL_PEM_write_bio_PKCS8PrivateKey(
WOLFSSL_BIO* bio,
3841 int passwdSz, pem_password_cb* cb,
void* ctx);
3846WOLFSSL_API
unsigned long wolfSSL_X509_subject_name_hash(
const WOLFSSL_X509* x509);
3851#ifdef HAVE_PK_CALLBACKS
3852WOLFSSL_API
int wolfSSL_IsPrivatePkSet(
WOLFSSL* ssl);
3853WOLFSSL_API
int wolfSSL_CTX_IsPrivatePkSet(
WOLFSSL_CTX* ctx);
3856#ifdef HAVE_ENCRYPT_THEN_MAC
WOLFSSL_API int wolfSSL_CertManagerLoadCRL(WOLFSSL_CERT_MANAGER *, const char *, int, int)
Error checks and passes through to LoadCRL() in order to load the cert into the CRL for revocation ch...
Definition ssl.c:6912
WOLFSSL_API int wolfSSL_CertManagerDisableOCSP(WOLFSSL_CERT_MANAGER *)
Disables OCSP certificate revocation.
Definition ssl.c:6168
WOLFSSL_API int wolfSSL_CertManagerLoadCABuffer(WOLFSSL_CERT_MANAGER *, const unsigned char *in, long sz, int format)
Loads the CA Buffer by calling wolfSSL_CTX_load_verify_buffer and returning that result using a tempo...
Definition ssl.c:5863
WOLFSSL_API int wolfSSL_CertManagerLoadCRLBuffer(WOLFSSL_CERT_MANAGER *, const unsigned char *, long sz, int)
The function loads the CRL file by calling BufferLoadCRL.
Definition ssl.c:5897
WOLFSSL_API WOLFSSL_CERT_MANAGER * wolfSSL_CertManagerNew(void)
Allocates and initializes a new Certificate Manager context. This context may be used independent of ...
Definition ssl.c:3558
WOLFSSL_API int wolfSSL_CertManagerUnload_trust_peers(WOLFSSL_CERT_MANAGER *cm)
The function will free the Trusted Peer linked list and unlocks the trusted peer list.
Definition ssl.c:3814
WOLFSSL_API int wolfSSL_CertManagerEnableOCSPStapling(WOLFSSL_CERT_MANAGER *cm)
This function turns on OCSP stapling if it is not turned on as well as set the options.
Definition ssl.c:6180
WOLFSSL_API int wolfSSL_CertManagerLoadCA(WOLFSSL_CERT_MANAGER *, const char *f, const char *d)
Specifies the locations for CA certificate loading into the manager context. The PEM certificate CAfi...
Definition ssl.c:6750
WOLFSSL_API int wolfSSL_CertManagerDisableCRL(WOLFSSL_CERT_MANAGER *)
Turns off Certificate Revocation List checking when verifying certificates with the Certificate Manag...
Definition ssl.c:5993
WOLFSSL_API int wolfSSL_CertManagerEnableOCSP(WOLFSSL_CERT_MANAGER *, int options)
Turns on OCSP if it’s turned off and if compiled with the set option available.
Definition ssl.c:6122
WOLFSSL_API int wolfSSL_CertManagerVerify(WOLFSSL_CERT_MANAGER *, const char *f, int format)
Specifies the certificate to verify with the Certificate Manager context. The format can be SSL_FILET...
Definition ssl.c:6696
WOLFSSL_API int wolfSSL_CertManagerEnableCRL(WOLFSSL_CERT_MANAGER *, int options)
Turns on Certificate Revocation List checking when verifying certificates with the Certificate Manage...
Definition ssl.c:5953
WOLFSSL_API void wolfSSL_CertManagerSetVerify(WOLFSSL_CERT_MANAGER *cm, VerifyCallback vc)
The function sets the verifyCallback function in the Certificate Manager. If present,...
Definition ssl.c:6005
WOLFSSL_API int wolfSSL_CertManagerUnloadCAs(WOLFSSL_CERT_MANAGER *cm)
This function unloads the CA signer list.
Definition ssl.c:3794
WOLFSSL_API void wolfSSL_CertManagerFree(WOLFSSL_CERT_MANAGER *)
Frees all resources associated with the Certificate Manager context. Call this when you no longer nee...
Definition ssl.c:3564
WOLFSSL_API int wolfSSL_CertManagerVerifyBuffer(WOLFSSL_CERT_MANAGER *cm, const unsigned char *buff, long sz, int format)
Specifies the certificate buffer to verify with the Certificate Manager context. The format can be SS...
Definition ssl.c:6116
WOLFSSL_API int wolfSSL_CertManagerSetCRL_Cb(WOLFSSL_CERT_MANAGER *, CbMissingCRL)
This function sets the CRL Certificate Manager callback. If HAVE_CRL is defined and a matching CRL re...
Definition ssl.c:6889
WOLFSSL_API int wolfSSL_CertManagerCheckOCSP(WOLFSSL_CERT_MANAGER *, unsigned char *, int sz)
The function enables the WOLFSSL_CERT_MANAGER’s member, ocspEnabled to signify that the OCSP check op...
Definition ssl.c:6240
WOLFSSL_API int wolfSSL_CertManagerSetOCSP_Cb(WOLFSSL_CERT_MANAGER *, CbOCSPIO, CbOCSPRespFree, void *)
The function sets the OCSP callback in the WOLFSSL_CERT_MANAGER.
Definition ssl.c:6322
WOLFSSL_API int wolfSSL_CertManagerSetOCSPOverrideURL(WOLFSSL_CERT_MANAGER *, const char *)
The function copies the url to the ocspOverrideURL member of the WOLFSSL_CERT_MANAGER structure.
Definition ssl.c:6298
WOLFSSL_API WOLFSSL_CERT_MANAGER * wolfSSL_CertManagerNew_ex(void *heap)
Allocates and initializes a new Certificate Manager context. This context may be used independent of ...
Definition ssl.c:3519
WOLFSSL_API int wolfSSL_X509_get_signature_type(WOLFSSL_X509 *)
This function returns the value stored in the sigOID member of the WOLFSSL_X509 structure.
Definition ssl.c:19645
WOLFSSL_API int wolfSSL_CTX_get_cert_cache_memsize(WOLFSSL_CTX *)
Returns the size the certificate cache save buffer needs to be.
Definition ssl.c:10038
WOLFSSL_API int wolfSSL_CTX_use_PrivateKey_file(WOLFSSL_CTX *, const char *, int)
This function loads a private key file into the SSL context (WOLFSSL_CTX). The file is provided by th...
Definition ssl.c:7071
WOLFSSL_API int wolfSSL_use_RSAPrivateKey_ASN1(WOLFSSL *ssl, unsigned char *der, long derSz)
This is used to set the private key for the WOLFSSL structure. A DER formatted RSA key buffer is expe...
Definition ssl.c:9623
WOLFSSL_API WOLFSSL_X509_NAME * wolfSSL_X509_get_subject_name(WOLFSSL_X509 *)
This function returns the subject member of the WOLFSSL_X509 structure.
Definition ssl.c:19584
WOLFSSL_API WOLFSSL_ASN1_TIME * wolfSSL_X509_get_notAfter(WOLFSSL_X509 *)
This function checks to see if x509 is NULL and if it’s not, it returns the notAfter member of the x5...
WOLFSSL_API void wolfSSL_KeepArrays(WOLFSSL *)
Normally, at the end of the SSL handshake, wolfSSL frees temporary arrays. Calling this function befo...
Definition ssl.c:3154
WOLFSSL_API int wolfSSL_SetTmpDH_file(WOLFSSL *, const char *f, int format)
This function calls wolfSSL_SetTmpDH_file_wrapper to set server Diffie-Hellman parameters.
Definition ssl.c:7223
WOLFSSL_API WOLFSSL_X509 * wolfSSL_X509_d2i_fp(WOLFSSL_X509 **x509, FILE *file)
If NO_STDIO_FILESYSTEM is defined this function will allocate heap memory, initialize a WOLFSSL_X509 ...
WOLFSSL_API int wolfSSL_CTX_memsave_cert_cache(WOLFSSL_CTX *, void *, int, int *)
This function persists the certificate cache to memory.
Definition ssl.c:10013
WOLFSSL_API int wolfSSL_SetMinRsaKey_Sz(WOLFSSL *, short)
Sets the minimum allowable key size in bytes for RSA located in the WOLFSSL structure.
Definition ssl.c:1697
WOLFSSL_API int wolfSSL_CTX_load_verify_chain_buffer_format(WOLFSSL_CTX *, const unsigned char *, long, int)
This function loads a CA certificate chain buffer into the WOLFSSL Context. It behaves like the non-b...
Definition ssl.c:13627
WOLFSSL_API const char * wolfSSL_get_psk_identity(const WOLFSSL *)
The function returns a constant pointer to the client_identity member of the Arrays structure.
Definition ssl.c:13529
WOLFSSL_API WOLFSSL_X509 * wolfSSL_get_peer_certificate(WOLFSSL *ssl)
This function gets the peer’s certificate.
Definition ssl.c:16929
WOLFSSL_API WOLFSSL_DSA * wolfSSL_PEM_read_bio_DSAparams(WOLFSSL_BIO *bp, WOLFSSL_DSA **x, pem_password_cb *cb, void *u)
This function get the DSA parameters from a PEM buffer in bio.
Definition ssl.c:39314
WOLFSSL_API int wolfSSL_X509_get_signature(WOLFSSL_X509 *, unsigned char *, int *)
Gets the X509 signature and stores it in the buffer.
Definition ssl.c:17320
WOLFSSL_API int wolfSSL_X509_version(WOLFSSL_X509 *)
This function retrieves the version of the X509 certificate.
Definition ssl.c:17530
WOLFSSL_API int wolfSSL_SetTmpDH(WOLFSSL *, const unsigned char *p, int pSz, const unsigned char *g, int gSz)
Server Diffie-Hellman Ephemeral parameters setting. This function sets up the group parameters to be ...
Definition ssl.c:1711
WOLFSSL_API unsigned char * wolfSSL_X509_get_hw_serial_number(WOLFSSL_X509 *, unsigned char *, int *)
This function returns the hwSerialNum member of the x509 object.
Definition ssl.c:17601
WOLFSSL_API int wolfSSL_CTX_SetMinRsaKey_Sz(WOLFSSL_CTX *, short)
Sets the minimum RSA key size in both the WOLFSSL_CTX structure and the WOLFSSL_CERT_MANAGER structur...
Definition ssl.c:1684
WOLFSSL_API int wolfSSL_CTX_SetMinEccKey_Sz(WOLFSSL_CTX *, short)
Sets the minimum size in bytes for the ECC key in the WOLF_CTX structure and the WOLFSSL_CERT_MANAGER...
Definition ssl.c:1655
WOLFSSL_API int wolfSSL_make_eap_keys(WOLFSSL *, void *key, unsigned int len, const char *label)
This function is used by EAP_TLS and EAP-TTLS to derive keying material from the master secret.
Definition tls.c:600
WOLFSSL_API int wolfSSL_UseClientQSHKeys(WOLFSSL *ssl, unsigned char flag)
If the flag is 1 keys will be sent in hello. If flag is 0 then the keys will not be sent during hello...
Definition ssl.c:2492
WOLFSSL_API char * wolfSSL_X509_get_subjectCN(WOLFSSL_X509 *)
Returns the common name of the subject from the certificate.
Definition ssl.c:27289
WOLFSSL_API WOLF_STACK_OF(WOLFSSL_X509) *wolfSSL_get_peer_cert_chain(const WOLFSSL *)
This function gets the peer’s certificate chain.
Definition ssl.c:16984
WOLFSSL_API int wolfSSL_X509_NAME_get_text_by_NID(WOLFSSL_X509_NAME *, int, char *, int)
This function gets the text related to the passed in NID value.
Definition ssl.c:19673
WOLFSSL_API int wolfSSL_SetMinEccKey_Sz(WOLFSSL *, short)
Sets the value of the minEccKeySz member of the options structure. The options struct is a member of ...
Definition ssl.c:1670
WOLFSSL_API int wolfSSL_CTX_save_cert_cache(WOLFSSL_CTX *, const char *)
This function writes the cert cache from memory to file.
Definition ssl.c:9988
WOLFSSL_API void * wolfSSL_X509_get_ext_d2i(const WOLFSSL_X509 *x509, int nid, int *c, int *idx)
This function looks for and returns the extension matching the passed in NID value.
Definition ssl.c:9054
WOLFSSL_API int wolfSSL_CTX_use_certificate_file(WOLFSSL_CTX *, const char *, int)
This function loads a certificate file into the SSL context (WOLFSSL_CTX). The file is provided by th...
Definition ssl.c:7056
WOLFSSL_API int wolfSSL_use_certificate_chain_buffer(WOLFSSL *, const unsigned char *, long)
This function loads a certificate chain buffer into the WOLFSSL object. It behaves like the non-buffe...
Definition ssl.c:13878
WOLFSSL_API int wolfSSL_X509_digest(const WOLFSSL_X509 *x509, const WOLFSSL_EVP_MD *digest, unsigned char *buf, unsigned int *len)
This function returns the hash of the DER certificate.
Definition ssl.c:9555
WOLFSSL_API int wolfSSL_CTX_use_PrivateKey_buffer(WOLFSSL_CTX *, const unsigned char *, long, int)
This function loads a private key buffer into the SSL Context. It behaves like the non-buffered versi...
Definition ssl.c:13667
WOLFSSL_API WOLFSSL_STACK * wolfSSL_X509_STORE_CTX_get_chain(WOLFSSL_X509_STORE_CTX *ctx)
This function is a getter function for chain variable in WOLFSSL_X509_STORE_CTX structure....
Definition ssl.c:22405
WOLFSSL_API int wolfSSL_SetMinDhKey_Sz(WOLFSSL *, word16)
Sets the minimum size for a Diffie-Hellman key in the WOLFSSL structure in bytes.
Definition ssl.c:1892
WOLFSSL_API WOLFSSL_ASN1_TIME * wolfSSL_X509_get_notBefore(WOLFSSL_X509 *)
The function checks to see if x509 is NULL and if it’s not, it returns the notBefore member of the x5...
WOLFSSL_API int wolfSSL_use_PrivateKey_ASN1(int pri, WOLFSSL *ssl, unsigned char *der, long derSz)
This is used to set the private key for the WOLFSSL structure. A DER formatted key buffer is expected...
WOLFSSL_API int wolfSSL_GetDhKey_Sz(WOLFSSL *)
Returns the value of dhKeySz that is a member of the options structure. This value represents the Dif...
Definition ssl.c:1922
WOLFSSL_API void wolfSSL_SetCertCbCtx(WOLFSSL *, void *)
This function stores user CTX object information for verify callback.
Definition ssl.c:9967
WOLFSSL_API int wolfSSL_CTX_load_verify_locations(WOLFSSL_CTX *, const char *, const char *)
This function loads PEM-formatted CA certificate files into the SSL context (WOLFSSL_CTX)....
Definition ssl.c:6667
WOLFSSL_API int wolfSSL_X509_STORE_add_cert(WOLFSSL_X509_STORE *, WOLFSSL_X509 *)
This function adds a certificate to the WOLFSSL_X509_STRE structure.
Definition ssl.c:22566
WOLFSSL_API unsigned char * wolfSSL_X509_get_device_type(WOLFSSL_X509 *, unsigned char *, int *)
This function copies the device type from the x509 structure to the buffer.
Definition ssl.c:17545
WOLFSSL_API WOLFSSL_X509 * wolfSSL_X509_load_certificate_file(const char *fname, int format)
The function loads the x509 certificate into memory.
Definition ssl.c:18650
WOLFSSL_API int wolfSSL_CTX_SetTmpDH_buffer(WOLFSSL_CTX *, const unsigned char *b, long sz, int format)
A wrapper function that calls wolfSSL_SetTmpDH_buffer_wrapper.
Definition ssl.c:13809
WOLFSSL_API int wolfSSL_GetIVSize(WOLFSSL *)
Returns the iv_size member of the specs structure held in the WOLFSSL struct.
Definition ssl.c:3423
WOLFSSL_API unsigned char * wolfSSL_X509_get_hw_type(WOLFSSL_X509 *, unsigned char *, int *)
The function copies the hwType member of the WOLFSSL_X509 structure to the buffer.
Definition ssl.c:17573
WOLFSSL_API int wolfSSL_CTX_load_verify_buffer(WOLFSSL_CTX *, const unsigned char *, long, int)
This function loads a CA certificate buffer into the WOLFSSL Context. It behaves like the non-buffere...
Definition ssl.c:13619
WOLFSSL_API char * wolfSSL_X509_get_next_altname(WOLFSSL_X509 *)
This function returns the next, if any, altname from the peer certificate.
Definition ssl.c:17287
WOLFSSL_API int wolfSSL_CTX_use_psk_identity_hint(WOLFSSL_CTX *, const char *)
This function stores the hint argument in the server_hint member of the WOLFSSL_CTX structure.
Definition ssl.c:13540
WOLFSSL_API WOLFSSL_X509_NAME * wolfSSL_X509_get_issuer_name(WOLFSSL_X509 *)
This function returns the name of the certificate issuer.
Definition ssl.c:19636
WOLFSSL_API int wolfSSL_DeriveTlsKeys(unsigned char *key_data, word32 keyLen, const unsigned char *ms, word32 msLen, const unsigned char *sr, const unsigned char *cr, int tls1_2, int hash_type)
An external facing wrapper to derive TLS Keys.
Definition tls.c:349
WOLFSSL_API int wolfSSL_use_PrivateKey(WOLFSSL *ssl, WOLFSSL_EVP_PKEY *pkey)
This is used to set the private key for the WOLFSSL structure.
Definition ssl.c:9579
WOLFSSL_API int wolfSSL_use_psk_identity_hint(WOLFSSL *, const char *)
This function stores the hint argument in the server_hint member of the Arrays structure within the W...
Definition ssl.c:13557
WOLFSSL_API WOLFSSL_X509 * wolfSSL_PEM_read_bio_X509_AUX(WOLFSSL_BIO *bp, WOLFSSL_X509 **x, pem_password_cb *cb, void *u)
This function behaves the same as wolfSSL_PEM_read_bio_X509. AUX signifies containing extra informati...
Definition ssl.c:37489
WOLFSSL_API int wolfSSL_CTX_SetTmpDH(WOLFSSL_CTX *, const unsigned char *p, int pSz, const unsigned char *g, int gSz)
Sets the parameters for the server CTX Diffie-Hellman.
Definition ssl.c:1817
WOLFSSL_API void wolfSSL_FreeArrays(WOLFSSL *)
Normally, at the end of the SSL handshake, wolfSSL frees temporary arrays. If wolfSSL_KeepArrays() ha...
Definition ssl.c:3162
WOLFSSL_API int wolfSSL_CTX_use_certificate_buffer(WOLFSSL_CTX *, const unsigned char *, long, int)
This function loads a certificate buffer into the WOLFSSL Context. It behaves like the non-buffered v...
Definition ssl.c:13658
WOLFSSL_X509 * wolfSSL_d2i_X509_bio(WOLFSSL_BIO *bio, WOLFSSL_X509 **x509)
This function get the DER buffer from bio and converts it to a WOLFSSL_X509 structure.
Definition ssl.c:21864
WOLFSSL_API int wolfSSL_CTX_SetMinDhKey_Sz(WOLFSSL_CTX *, word16)
This function sets the minimum size of the Diffie Hellman key size by accessing the minDhKeySz member...
Definition ssl.c:1882
WOLFSSL_API int wolfSSL_CTX_use_NTRUPrivateKey_file(WOLFSSL_CTX *, const char *)
This function loads an NTRU private key file into the WOLFSSL Context. It behaves like the normal ver...
Definition ssl.c:9860
WOLFSSL_API int wolfSSL_UnloadCertsKeys(WOLFSSL *)
This function unloads any certificates or keys that SSL owns.
Definition ssl.c:13888
WOLFSSL_API int wolfSSL_SetTmpDH_buffer(WOLFSSL *, const unsigned char *b, long sz, int format)
The function calls the wolfSSL_SetTMpDH_buffer_wrapper, which is a wrapper for Diffie-Hellman paramet...
Definition ssl.c:13798
WOLFSSL_API int wolfSSL_X509_STORE_set_flags(WOLFSSL_X509_STORE *store, unsigned long flag)
This function takes in a flag to change the behavior of the WOLFSSL_X509_STORE structure passed in....
Definition ssl.c:22656
WOLFSSL_API char * wolfSSL_X509_NAME_oneline(WOLFSSL_X509_NAME *, char *, int)
This function copies the name of the x509 into a buffer.
Definition ssl.c:17076
WOLFSSL_API const char * wolfSSL_get_psk_identity_hint(const WOLFSSL *)
This function returns the psk identity hint.
Definition ssl.c:13518
WOLFSSL_API int wolfSSL_CTX_restore_cert_cache(WOLFSSL_CTX *, const char *)
This function persistes certificate cache from a file.
Definition ssl.c:10000
WOLFSSL_API WOLFSSL_DH * wolfSSL_DSA_dup_DH(const WOLFSSL_DSA *r)
This function duplicates the parameters in dsa to a newly created WOLFSSL_DH structure.
Definition ssl.c:44366
WOLFSSL_API int wolfSSL_CTX_der_load_verify_locations(WOLFSSL_CTX *, const char *, int)
This function is similar to wolfSSL_CTX_load_verify_locations, but allows the loading of DER-formatte...
Definition ssl.c:7036
WOLFSSL_API int wolfSSL_CTX_use_certificate_chain_file(WOLFSSL_CTX *, const char *file)
This function loads a chain of certificates into the SSL context (WOLFSSL_CTX). The file containing t...
Definition ssl.c:7132
WOLFSSL_API long wolfSSL_CTX_set_tmp_dh(WOLFSSL_CTX *, WOLFSSL_DH *)
Initializes the WOLFSSL_CTX structure’s dh member with the Diffie-Hellman parameters.
Definition ssl.c:40177
WOLFSSL_API int wolfSSL_X509_get_ext_by_NID(const WOLFSSL_X509 *x509, int nid, int lastPos)
This function looks for and returns the extension index matching the passed in NID value.
Definition ssl.c:8903
WOLFSSL_API const unsigned char * wolfSSL_X509_get_der(WOLFSSL_X509 *, int *)
This function gets the DER encoded certificate in the WOLFSSL_X509 struct.
Definition ssl.c:17438
WOLFSSL_API WOLFSSL_X509 * wolfSSL_get_chain_X509(WOLFSSL_X509_CHAIN *, int idx)
This function gets the peer’s wolfSSL_X509_certificate at index (idx) from the chain of certificates.
Definition ssl.c:35586
WOLFSSL_API int wolfSSL_CTX_SetTmpDH_file(WOLFSSL_CTX *, const char *f, int format)
The function calls wolfSSL_SetTmpDH_file_wrapper to set the server Diffie-Hellman parameters.
Definition ssl.c:7233
WOLFSSL_API int wolfSSL_use_certificate_buffer(WOLFSSL *, const unsigned char *, long, int)
This function loads a certificate buffer into the WOLFSSL object. It behaves like the non-buffered ve...
Definition ssl.c:13818
WOLFSSL_API int wolfSSL_use_PrivateKey_buffer(WOLFSSL *, const unsigned char *, long, int)
This function loads a private key buffer into the WOLFSSL object. It behaves like the non-buffered ve...
Definition ssl.c:13830
WOLFSSL_API int wolfSSL_SetMaxDhKey_Sz(WOLFSSL *, word16)
Sets the maximum size for a Diffie-Hellman key in the WOLFSSL structure in bytes.
Definition ssl.c:1912
WOLFSSL_API int wolfSSL_CTX_use_certificate_chain_buffer(WOLFSSL_CTX *, const unsigned char *, long)
This function loads a certificate chain buffer into the WOLFSSL Context. It behaves like the non-buff...
Definition ssl.c:13707
WOLFSSL_API int wolfSSL_CTX_SetMaxDhKey_Sz(WOLFSSL_CTX *, word16)
This function sets the maximum size of the Diffie Hellman key size by accessing the maxDhKeySz member...
Definition ssl.c:1902
WOLFSSL_API int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX *, const char *, const char *, unsigned int flags)
This function loads PEM-formatted CA certificate files into the SSL context (WOLFSSL_CTX)....
WOLFSSL_API unsigned long wolfSSL_ERR_peek_last_error(void)
This function returns the absolute value of the last error from WOLFSSL_ERROR encountered.
Definition ssl.c:41793
WOLFSSL_API int wolfSSL_want_read(WOLFSSL *)
This function is similar to calling wolfSSL_get_error() and getting SSL_ERROR_WANT_READ in return....
Definition ssl.c:3100
WOLFSSL_API void wolfSSL_load_error_strings(void)
This function is for OpenSSL compatibility (SSL_load_error_string) only and takes no action.
Definition ssl.c:10397
WOLFSSL_API void wolfSSL_ERR_print_errors_fp(FILE *, int err)
This function converts an error code returned by wolfSSL_get_error() into a more human-readable error...
WOLFSSL_API void wolfSSL_ERR_print_errors_cb(int(*cb)(const char *str, size_t len, void *u), void *u)
This function uses the provided callback to handle error reporting. The callback function is executed...
Definition ssl.c:3852
WOLFSSL_API char * wolfSSL_ERR_error_string(unsigned long, char *)
This function converts an error code returned by wolfSSL_get_error() into a more human-readable error...
Definition ssl.c:3121
WOLFSSL_API void wolfSSL_ERR_error_string_n(unsigned long e, char *buf, unsigned long sz)
This function is a version of wolfSSL_ERR_error_string() where len specifies the maximum number of ch...
Definition ssl.c:3135
WOLFSSL_API int wolfSSL_want_write(WOLFSSL *)
This function is similar to calling wolfSSL_get_error() and getting SSL_ERROR_WANT_WRITE in return....
Definition ssl.c:3111
WOLFSSL_API int wolfSSL_get_error(WOLFSSL *, int)
This function returns a unique error code describing why the previous API function call (wolfSSL_conn...
Definition ssl.c:3053
WOLFSSL_API long wolfSSL_BIO_set_mem_eof_return(WOLFSSL_BIO *bio, int v)
This is used to set the end of file value. Common value is -1 so as not to get confused with expected...
Definition bio.c:1407
WOLFSSL_API WOLFSSL_SESSION * wolfSSL_get_session(WOLFSSL *)
This function returns a pointer to the current session (WOLFSSL_SESSION) used in ssl....
Definition ssl.c:10055
WOLFSSL_API int wolfSSL_BIO_make_bio_pair(WOLFSSL_BIO *b1, WOLFSSL_BIO *b2)
This is used to pair two bios together. A pair of bios acts similar to a two way pipe writing to one ...
Definition bio.c:1070
WOLFSSL_API int wolfSSL_Rehandshake(WOLFSSL *ssl)
This function executes a secure renegotiation handshake; this is user forced as wolfSSL discourages t...
Definition ssl.c:2715
WOLFSSL_API word32 wolfSSL_lib_version_hex(void)
This function returns the current library version in hexadecimal notation.
Definition ssl.c:19298
WOLFSSL_API long wolfSSL_BIO_set_fp(WOLFSSL_BIO *bio, XFILE fp, int c)
This is used to set the internal file pointer for a BIO.
Definition bio.c:1324
WOLFSSL_API WOLFSSL_CIPHER * wolfSSL_get_current_cipher(WOLFSSL *)
This function returns a pointer to the current cipher in the ssl session.
Definition ssl.c:19312
WOLFSSL_API int wolfSSL_memsave_session_cache(void *, int)
This function persists session cache to memory.
Definition ssl.c:10158
WOLFSSL_API long wolfSSL_BIO_get_mem_ptr(WOLFSSL_BIO *bio, WOLFSSL_BUF_MEM **m)
This is a getter function for WOLFSSL_BIO memory pointer.
Definition bio.c:982
WOLFSSL_API int wolfSSL_read(WOLFSSL *, void *, int)
This function reads sz bytes from the SSL session (ssl) internal read buffer into the buffer data....
Definition ssl.c:2073
WOLFSSL_API int wolfSSL_negotiate(WOLFSSL *ssl)
Performs the actual connect or accept based on the side of the SSL method. If called from the client ...
Definition ssl.c:1381
WOLFSSL_API int wolfSSL_get_fd(const WOLFSSL *)
This function returns the file descriptor (fd) used as the input/output facility for the SSL connecti...
Definition ssl.c:937
WOLFSSL_API const char * wolfSSL_get_cipher_name(WOLFSSL *ssl)
This function gets the cipher name in the format DHE-RSA by passing through argument to wolfSSL_get_c...
Definition ssl.c:19378
WOLFSSL_API int wolfSSL_accept(WOLFSSL *)
This function is called on the server side and waits for an SSL client to initiate the SSL/TLS handsh...
Definition ssl.c:11787
WOLFSSL_API long wolfSSL_BIO_set_fd(WOLFSSL_BIO *b, int fd, int flag)
Sets the file descriptor for bio to use.
Definition ssl.c:14828
WOLFSSL_API WOLFSSL_BIO_METHOD * wolfSSL_BIO_s_socket(void)
This is used to get a BIO_SOCKET type WOLFSSL_BIO_METHOD.
Definition ssl.c:14779
WOLFSSL_API const char * wolfSSL_get_cipher(WOLFSSL *)
This function matches the cipher suite in the SSL object with the available suites.
Definition ssl.c:19371
WOLFSSL_API int wolfSSL_get_session_stats(unsigned int *active, unsigned int *total, unsigned int *peak, unsigned int *maxSessions)
This function gets the statistics for the session.
WOLFSSL_API int wolfSSL_BIO_reset(WOLFSSL_BIO *bio)
Resets bio to an initial state. As an example for type BIO_BIO this resets the read and write index.
Definition bio.c:1270
WOLFSSL_API long wolfSSL_get_verify_depth(WOLFSSL *ssl)
This function returns the maximum chain depth allowed, which is 9 by default, for a valid session i....
Definition ssl.c:7104
WOLFSSL_API int wolfSSL_set_jobject(WOLFSSL *ssl, void *objPtr)
This function sets the jObjectRef member of the WOLFSSL structure.
Definition ssl.c:42713
WOLFSSL_API int wolfSSL_BIO_set_close(WOLFSSL_BIO *b, long flag)
Sets the close flag, used to indicate that the i/o stream should be closed when the BIO is freed.
Definition ssl.c:14842
WOLFSSL_API unsigned char wolfSSL_SNI_Status(WOLFSSL *ssl, unsigned char type)
This function gets the status of an SNI object.
Definition ssl.c:2190
WOLFSSL_API int wolfSSL_write(WOLFSSL *, const void *, int)
This function writes sz bytes from the buffer, data, to the SSL connection, ssl. If necessary,...
Definition ssl.c:1934
WOLFSSL_API int wolfSSL_isQSH(WOLFSSL *ssl)
Checks if QSH is used in the supplied SSL session.
Definition ssl.c:2455
WOLFSSL_API WOLFSSL_X509_CHAIN * wolfSSL_SESSION_get_peer_chain(WOLFSSL_SESSION *session)
Returns the peer certificate chain from the WOLFSSL_SESSION struct.
Definition ssl.c:12958
WOLFSSL_API int wolfSSL_get_ciphers(char *, int)
This function gets the ciphers enabled in wolfSSL.
Definition ssl.c:860
WOLFSSL_API int wolfSSL_get_session_cache_memsize(void)
This function returns how large the session cache save buffer should be.
Definition ssl.c:10145
WOLFSSL_API int wolfSSL_BIO_write_filename(WOLFSSL_BIO *bio, char *name)
This is used to set and write to a file. WIll overwrite any data currently in the file and is set to ...
Definition bio.c:1362
WOLFSSL_API int wolfSSL_BIO_ctrl_reset_read_request(WOLFSSL_BIO *b)
This is used to set the read request flag back to 0.
Definition bio.c:1104
WOLFSSL_API const char * wolfSSL_lib_version(void)
This function returns the current library version.
Definition ssl.c:19291
WOLFSSL_API void * wolfSSL_get_jobject(WOLFSSL *ssl)
This function returns the jObjectRef member of the WOLFSSL structure.
Definition ssl.c:42724
WOLFSSL_API int wolfSSL_UseSecureRenegotiation(WOLFSSL *ssl)
This function forces secure renegotiation for the supplied WOLFSSL structure. This is not recommended...
Definition ssl.c:2615
WOLFSSL_API size_t wolfSSL_BIO_ctrl_pending(WOLFSSL_BIO *b)
Gets the number of pending bytes to read. If BIO type is BIO_BIO then is the number to read from pair...
Definition bio.c:938
WOLFSSL_API int wolfSSL_writev(WOLFSSL *ssl, const struct iovec *iov, int iovcnt)
Simulates writev semantics but doesn’t actually do block at a time because of SSL_write() behavior an...
Definition ssl.c:13217
WOLFSSL_API int wolfSSL_restore_session_cache(const char *)
This function restores the persistent session cache from file. It does not use memstore because of ad...
Definition ssl.c:10321
WOLFSSL_API int wolfSSL_BIO_nwrite(WOLFSSL_BIO *bio, char **buf, int num)
Gets a pointer to the buffer for writing as many bytes as returned by the function....
Definition bio.c:1199
WOLFSSL_API int wolfSSL_save_session_cache(const char *)
This function persists the session cache to file. It doesn’t use memsave because of additional memory...
Definition ssl.c:10254
WOLFSSL_API int wolfSSL_BIO_get_mem_data(WOLFSSL_BIO *bio, void *p)
This is used to set a byte pointer to the start of the internal memory buffer.
Definition bio.c:1678
WOLFSSL_API int wolfSSL_BIO_nread(WOLFSSL_BIO *bio, char **buf, int num)
This is used to get a buffer pointer for reading from. The internal read index is advanced by the num...
Definition bio.c:1147
WOLFSSL_API int wolfSSL_memrestore_session_cache(const void *, int)
This function restores the persistent session cache from memory.
Definition ssl.c:10203
WOLFSSL_API int wolfSSL_set_SessionTicket(WOLFSSL *, const unsigned char *, word32)
This function sets the ticket member of the WOLFSSL_SESSION structure within the WOLFSSL struct....
Definition ssl.c:2842
WOLFSSL_API int wolfSSL_pending(WOLFSSL *)
This function returns the number of bytes which are buffered and available in the SSL object to be re...
Definition ssl.c:3861
WOLFSSL_API char * wolfSSL_get_cipher_list(int priority)
Get the name of cipher at priority level passed in.
Definition ssl.c:821
WOLFSSL_API const char * wolfSSL_get_version(WOLFSSL *)
Returns the SSL version being used as a string.
Definition ssl.c:19279
WOLFSSL_API int wolfSSL_peek(WOLFSSL *, void *, int)
This function copies sz bytes from the SSL session (ssl) internal read buffer into the buffer data....
Definition ssl.c:2064
WOLFSSL_API int wolfSSL_send(WOLFSSL *, const void *, int sz, int flags)
This function writes sz bytes from the buffer, data, to the SSL connection, ssl, using the specified ...
Definition ssl.c:2923
WOLFSSL_API int wolfSSL_BIO_set_write_buf_size(WOLFSSL_BIO *b, long size)
This is used to set the size of write buffer for a WOLFSSL_BIO. If write buffer has been previously s...
Definition bio.c:1025
WOLFSSL_API int wolfSSL_BIO_nread0(WOLFSSL_BIO *bio, char **buf)
This is used to get a buffer pointer for reading from. Unlike wolfSSL_BIO_nread the internal read ind...
Definition bio.c:1119
WOLFSSL_API int wolfSSL_session_reused(WOLFSSL *)
This function returns the resuming member of the options struct. The flag indicates whether or not to...
Definition ssl.c:19137
WOLFSSL_API int wolfSSL_PrintSessionStats(void)
This function prints the statistics from the session.
Definition ssl.c:13097
WOLFSSL_API long wolfSSL_BIO_get_fp(WOLFSSL_BIO *bio, XFILE *fp)
This is used to get the internal file pointer for a BIO.
Definition bio.c:1344
WOLFSSL_API int wolfSSL_get_SessionTicket(WOLFSSL *, unsigned char *, word32 *)
This function copies the ticket member of the Session structure to the buffer.
Definition ssl.c:2826
WOLFSSL_API int wolfSSL_connect_cert(WOLFSSL *ssl)
This function is called on the client side and initiates an SSL/TLS handshake with a server only long...
Definition ssl.c:3884
WOLFSSL_API int wolfSSL_get_alert_history(WOLFSSL *, WOLFSSL_ALERT_HISTORY *)
This function gets the alert history.
Definition ssl.c:3076
WOLFSSL_API int wolfSSL_GetSessionIndex(WOLFSSL *ssl)
This function gets the session index of the WOLFSSL structure.
Definition ssl.c:12919
WOLFSSL_API int wolfSSL_UseSessionTicket(WOLFSSL *ssl)
Force provided WOLFSSL structure to use session ticket. The constant HAVE_SESSION_TICKET should be de...
Definition ssl.c:2810
WOLFSSL_API int wolfSSL_recv(WOLFSSL *, void *, int sz, int flags)
This function reads sz bytes from the SSL session (ssl) internal read buffer into the buffer data usi...
Definition ssl.c:2945
WOLFSSL_API int wolfSSL_get_current_cipher_suite(WOLFSSL *ssl)
Returns the current cipher suit an ssl session is using.
Definition ssl.c:19304
WOLFSSL_API const char * wolfSSL_CIPHER_get_name(const WOLFSSL_CIPHER *cipher)
This function matches the cipher suite in the SSL object with the available suites and returns the st...
Definition ssl.c:19325
WOLFSSL_API void wolfSSL_flush_sessions(WOLFSSL_CTX *, long)
This function flushes session from the session cache which have expired. The time,...
Definition ssl.c:12203
WOLFSSL_API int wolfSSL_BIO_seek(WOLFSSL_BIO *bio, int ofs)
This function adjusts the file pointer to the offset given. This is the offset from the head of the f...
Definition bio.c:1388
WOLFSSL_API int wolfSSL_GetSessionAtIndex(int index, WOLFSSL_SESSION *session)
This function gets the session at specified index of the session cache and copies it into memory....
Definition ssl.c:12927
WOLFSSL_API int wolfSSL_use_certificate(WOLFSSL *ssl, WOLFSSL_X509 *x509)
his is used to set the certificate for WOLFSSL structure to use during a handshake.
Definition ssl.c:9634
WOLFSSL_API int wolfSSL_set_compression(WOLFSSL *ssl)
Turns on the ability to use compression for the SSL connection. Both sides must have compression turn...
Definition ssl.c:13199
WOLFSSL_API int wolfSSL_set_group_messages(WOLFSSL *)
This function turns on grouping of handshake messages where possible.
Definition ssl.c:3902
WOLFSSL_API long wolfSSL_set_tlsext_debug_arg(WOLFSSL *s, void *arg)
This is used to set the debug argument passed around.
Definition ssl.c:24742
WOLFSSL_API WOLFSSL_X509_STORE * wolfSSL_CTX_get_cert_store(WOLFSSL_CTX *ctx)
This is a getter function for the WOLFSSL_X509_STORE structure in ctx.
Definition ssl.c:14617
WOLFSSL_API long wolfSSL_set_options(WOLFSSL *s, long op)
This function sets the options mask in the ssl. Some valid options are, SSL_OP_ALL,...
Definition ssl.c:24581
WOLFSSL_API long wolfSSL_CTX_set_tlsext_opaque_prf_input_callback_arg(WOLFSSL_CTX *, void *arg)
This function sets the optional argument to be passed to the PRF callback.
Definition ssl.c:25765
WOLFSSL_API void wolfSSL_CTX_set_cert_store(WOLFSSL_CTX *ctx, WOLFSSL_X509_STORE *str)
This is a setter function for the WOLFSSL_X509_STORE structure in ctx.
Definition ssl.c:14626
WOLFSSL_API WOLFSSL_SESSION * wolfSSL_get1_session(WOLFSSL *ssl)
This function returns the WOLFSSL_SESSION from the WOLFSSL structure.
Definition ssl.c:21380
WOLFSSL_API int wolfSSL_CTX_trust_peer_buffer(WOLFSSL_CTX *, const unsigned char *, long, int)
This function loads a certificate to use for verifying a peer when performing a TLS/SSL handshake....
Definition ssl.c:13637
WOLFSSL_API int wolfSSL_UseALPN(WOLFSSL *ssl, char *protocol_name_list, unsigned int protocol_name_listSz, unsigned char options)
Setup ALPN use for a wolfSSL session.
WOLFSSL_API int wolfSSL_CTX_memrestore_cert_cache(WOLFSSL_CTX *, const void *, int)
This function restores the certificate cache from memory.
Definition ssl.c:10026
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_2_server_method(void)
The wolfTLSv1_2_server_method() function is used to indicate that the application is a server and wil...
Definition tls.c:11634
WOLFSSL_API int wolfSSL_check_private_key(const WOLFSSL *ssl)
This function checks that the private key is a match with the certificate being used.
Definition ssl.c:7718
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_1_client_method(void)
The wolfTLSv1_1_client_method() function is used to indicate that the application is a client and wil...
Definition tls.c:11258
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_server_method(void)
The wolfTLSv1_server_method() function is used to indicate that the application is a server and will ...
Definition tls.c:11594
WOLFSSL_API int wolfSSL_dtls_set_timeout_init(WOLFSSL *ssl, int)
This function sets the dtls timeout.
Definition ssl.c:11152
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_client_method(void)
The wolfTLSv1_client_method() function is used to indicate that the application is a client and will ...
Definition tls.c:11241
WOLFSSL_API WOLFSSL_METHOD * wolfDTLSv1_server_method(void)
The wolfDTLSv1_server_method() function is used to indicate that the application is a server and will...
Definition tls.c:11711
WOLFSSL_API int wolfSSL_CTX_get_read_ahead(WOLFSSL_CTX *)
This function returns the get read ahead flag from a WOLFSSL_CTX structure.
Definition ssl.c:25743
WOLFSSL_API int wolfSSL_SetVersion(WOLFSSL *ssl, int version)
This function sets the SSL/TLS protocol version for the specified SSL session (WOLFSSL object) using ...
Definition ssl.c:4015
WOLFSSL_API int wolfSSL_CTX_trust_peer_cert(WOLFSSL_CTX *, const char *, int)
This function loads a certificate to use for verifying a peer when performing a TLS/SSL handshake....
Definition ssl.c:6681
WOLFSSL_API WOLFSSL_BIGNUM * wolfSSL_ASN1_INTEGER_to_BN(const WOLFSSL_ASN1_INTEGER *ai, WOLFSSL_BIGNUM *bn)
This function is used to copy a WOLFSSL_ASN1_INTEGER value to a WOLFSSL_BIGNUM structure.
Definition ssl.c:44324
WOLFSSL_API int wolfSSL_set_fd(WOLFSSL *, int)
This function assigns a file descriptor (fd) as the input/output facility for the SSL connection....
Definition ssl.c:753
WOLFSSL_API int wolfSSL_SESSION_get_master_key_length(const WOLFSSL_SESSION *ses)
This is used to get the master secret key length.
Definition ssl.c:9849
WOLFSSL_API int wolfSSL_CTX_SetMinVersion(WOLFSSL_CTX *ctx, int version)
This function sets the minimum downgrade version allowed. Applicable only when the connection allows ...
Definition ssl.c:3962
WOLFSSL_API long wolfSSL_get_options(const WOLFSSL *s)
This function returns the current options mask.
Definition ssl.c:24643
WOLFSSL_API int wolfSSL_CTX_set_cipher_list(WOLFSSL_CTX *, const char *)
This function sets cipher suite list for a given WOLFSSL_CTX. This cipher suite list becomes the defa...
Definition ssl.c:11019
WOLFSSL_API int wolfSSL_set_timeout(WOLFSSL *, unsigned int)
This function sets the SSL session timeout value in seconds.
Definition ssl.c:12213
WOLFSSL_API long wolfSSL_CTX_add_extra_chain_cert(WOLFSSL_CTX *, WOLFSSL_X509 *)
This function adds the certificate to the internal chain being built in the WOLFSSL_CTX structure.
Definition ssl.c:25608
WOLFSSL_API int wolfSSL_check_domain_name(WOLFSSL *ssl, const char *dn)
wolfSSL by default checks the peer certificate for a valid date range and a verified signature....
Definition ssl.c:13167
WOLFSSL_API WOLFSSL_METHOD * wolfSSLv23_server_method(void)
The wolfSSLv23_server_method() function is used to indicate that the application is a server and will...
Definition ssl.c:11750
WOLFSSL_API int wolfSSL_use_certificate_ASN1(WOLFSSL *ssl, unsigned char *der, int derSz)
This is used to set the certificate for WOLFSSL structure to use during a handshake....
WOLFSSL_API int wolfSSL_CTX_UseSessionTicket(WOLFSSL_CTX *ctx)
This function sets wolfSSL context to use a session ticket.
Definition ssl.c:2818
WOLFSSL_API void wolfSSL_free(WOLFSSL *)
This function frees an allocated wolfSSL object.
Definition ssl.c:557
WOLFSSL_API int wolfSSL_CTX_Unload_trust_peers(WOLFSSL_CTX *)
This function is used to unload all previously loaded trusted peer certificates. Feature is enabled b...
Definition ssl.c:13936
WOLFSSL_API int wolfSSL_CTX_allow_anon_cipher(WOLFSSL_CTX *)
This function enables the havAnon member of the CTX structure if HAVE_ANON is defined during compilat...
Definition ssl.c:13579
WOLFSSL_API long wolfSSL_CTX_get_verify_depth(WOLFSSL_CTX *ctx)
This function gets the certificate chaining depth using the CTX structure.
Definition ssl.c:7118
WOLFSSL_API int wolfSSL_CTX_UnloadCAs(WOLFSSL_CTX *)
This function unloads the CA signer list and frees the whole signer table.
Definition ssl.c:13924
WOLFSSL_API WOLFSSL_METHOD * wolfSSLv23_method(void)
This function returns a WOLFSSL_METHOD similar to wolfSSLv23_client_method except that it is not dete...
Definition ssl.c:11292
WOLFSSL_API int wolfSSL_set_session(WOLFSSL *, WOLFSSL_SESSION *)
This function sets the session to be used when the SSL object, ssl, is used to establish a SSL/TLS co...
Definition ssl.c:10066
WOLFSSL_API int wolfSSL_UseSupportedQSH(WOLFSSL *ssl, unsigned short name)
This function sets the ssl session to use supported QSH provided by name.
WOLFSSL_API WOLFSSL_CTX * wolfSSL_CTX_new(WOLFSSL_METHOD *)
This function creates a new SSL context, taking a desired SSL/TLS protocol method for input.
Definition ssl.c:426
WOLFSSL_API size_t wolfSSL_get_client_random(const WOLFSSL *ssl, unsigned char *out, size_t outSz)
This is used to get the random data sent by the client during the handshake.
Definition ssl.c:15335
WOLFSSL_API void wolfSSL_CTX_free(WOLFSSL_CTX *)
This function frees an allocated WOLFSSL_CTX object. This function decrements the CTX reference count...
Definition ssl.c:446
WOLFSSL_API size_t wolfSSL_get_server_random(const WOLFSSL *ssl, unsigned char *out, size_t outlen)
This is used to get the random data sent by the server during the handshake.
Definition ssl.c:15177
WOLFSSL_API void wolfSSL_CTX_set_verify(WOLFSSL_CTX *, int, VerifyCallback verify_callback)
This function sets the verification method for remote peers and also allows a verify callback to be r...
Definition ssl.c:9882
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_2_client_method(void)
The wolfTLSv1_2_client_method() function is used to indicate that the application is a client and wil...
Definition tls.c:11277
WOLFSSL_API int wolfSSL_CTX_set_timeout(WOLFSSL_CTX *, unsigned int)
This function sets the timeout value for SSL sessions, in seconds, for the specified SSL context.
Definition ssl.c:12228
WOLFSSL_API int wolfSSL_CTX_set_group_messages(WOLFSSL_CTX *)
This function turns on grouping of handshake messages where possible.
Definition ssl.c:3870
WOLFSSL_API void * wolfSSL_CTX_get_default_passwd_cb_userdata(WOLFSSL_CTX *ctx)
This is a getter function for the password callback user data set in ctx.
Definition ssl.c:15063
WOLFSSL_API int wolfSSL_state(WOLFSSL *ssl)
This is used to get the internal error state of the WOLFSSL structure.
Definition ssl.c:3042
WOLFSSL_API WOLFSSL_METHOD * wolfTLSv1_1_server_method(void)
The wolfTLSv1_1_server_method() function is used to indicate that the application is a server and wil...
Definition tls.c:11613
WOLFSSL_API void wolfSSL_set_verify(WOLFSSL *, int, VerifyCallback verify_callback)
This function sets the verification method for remote peers and also allows a verify callback to be r...
Definition ssl.c:9924
WOLFSSL_API long wolfSSL_get_verify_result(const WOLFSSL *ssl)
This is used to get the results after trying to verify the peer's certificate.
Definition ssl.c:25460
WOLFSSL_API int wolfSSL_set_cipher_list(WOLFSSL *, const char *)
This function sets cipher suite list for a given WOLFSSL object (SSL session). The ciphers in the lis...
Definition ssl.c:11045
WOLFSSL_API WOLFSSL_METHOD * wolfSSLv23_client_method(void)
The wolfSSLv23_client_method() function is used to indicate that the application is a client and will...
Definition ssl.c:11365
WOLFSSL_API long wolfSSL_CTX_set_session_cache_mode(WOLFSSL_CTX *, long)
This function enables or disables SSL session caching. Behavior depends on the value used for mode....
Definition ssl.c:10435
WOLFSSL_API int wolfSSL_use_old_poly(WOLFSSL *, int)
Since there is some differences between the first release and newer versions of chacha-poly AEAD cons...
Definition ssl.c:735
WOLFSSL_API long wolfSSL_CTX_set_tlsext_status_arg(WOLFSSL_CTX *, void *arg)
This function sets the options argument to use with OCSP.
Definition ssl.c:25697
WOLFSSL_API WOLFSSL_METHOD * wolfSSLv3_server_method(void)
The wolfSSLv3_server_method() function is used to indicate that the application is a server and will ...
Definition ssl.c:11731
WOLFSSL_API int wolfSSL_CTX_set_read_ahead(WOLFSSL_CTX *, int v)
This function sets the read ahead flag in the WOLFSSL_CTX structure.
Definition ssl.c:25753
WOLFSSL_API int wolfSSL_set_msg_callback_arg(WOLFSSL *ssl, void *arg)
This function sets associated callback context value in the ssl. The value is handed over to the call...
Definition ssl.c:43851
WOLFSSL_API pem_password_cb * wolfSSL_CTX_get_default_passwd_cb(WOLFSSL_CTX *ctx)
This is a getter function for the password callback set in ctx.
Definition ssl.c:15053
WOLFSSL_API WOLFSSL * wolfSSL_new(WOLFSSL_CTX *)
This function creates a new SSL session, taking an already created SSL context as input.
Definition ssl.c:533
WOLFSSL_API int wolfSSL_set_msg_callback(WOLFSSL *ssl, SSL_Msg_Cb cb)
This function sets a callback in the ssl. The callback is to observe handshake messages....
Definition ssl.c:43826
WOLFSSL_API long wolfSSL_CTX_clear_options(WOLFSSL_CTX *, long)
This function resets option bits of WOLFSSL_CTX object.
Definition ssl.c:14585
WOLFSSL_API WOLFSSL_METHOD * wolfDTLSv1_client_method(void)
The wolfDTLSv1_client_method() function is used to indicate that the application is a client and will...
Definition tls.c:11352
WOLFSSL_API int wolfSSL_SESSION_get_master_key(const WOLFSSL_SESSION *ses, unsigned char *out, int outSz)
This is used to get the master key after completing a handshake.
Definition ssl.c:9824
WOLFSSL_API WOLFSSL_METHOD * wolfSSLv3_client_method(void)
The wolfSSLv3_client_method() function is used to indicate that the application is a client and will ...
Definition ssl.c:11347
WOLFSSL_API int wolfSSL_library_init(void)
This function is called internally in wolfSSL_CTX_new(). This function is a wrapper around wolfSSL_In...
Definition ssl.c:10401
WOLFSSL_API int wolfSSL_get_shutdown(const WOLFSSL *)
This function checks the shutdown conditions in closeNotify or connReset or sentNotify members of the...
Definition ssl.c:19121
WOLFSSL_API int wolfSSL_shutdown(WOLFSSL *)
This function shuts down an active SSL/TLS connection using the SSL session, ssl. This function will ...
Definition ssl.c:2970
WOLFSSL_API int wolfSSL_ALPN_GetPeerProtocol(WOLFSSL *ssl, char **list, unsigned short *listSz)
This function copies the alpn_client_list data from the SSL object to the buffer.
WOLFSSL_API int wolfSSL_MakeTlsMasterSecret(unsigned char *ms, word32 msLen, const unsigned char *pms, word32 pmsLen, const unsigned char *cr, const unsigned char *sr, int tls1_2, int hash_type)
This function copies the values of cr and sr then passes through to wc_PRF (pseudo random function) a...
Definition tls.c:446
WOLFSSL_API int wolfSSL_ALPN_GetProtocol(WOLFSSL *ssl, char **protocol_name, unsigned short *size)
This function gets the protocol name set by the server.
WOLFSSL_API int wolfSSL_is_init_finished(WOLFSSL *)
This function checks to see if the connection is established.
Definition ssl.c:14520
WOLFSSL_API int wolfSSL_SetServerID(WOLFSSL *, const unsigned char *, int, int)
This function associates the client session with the server id. If the newSession flag is on,...
Definition ssl.c:10081
WOLFSSL_API int wolfSSL_Init(void)
Initializes the wolfSSL library for use. Must be called once per application and before any other cal...
Definition ssl.c:4736
WOLFSSL_API int wolfSSL_Cleanup(void)
Un-initializes the wolfSSL library from further use. Doesn’t have to be called, though it will free a...
Definition ssl.c:12129
WOLFSSL_API int wolfSSL_SetMinVersion(WOLFSSL *ssl, int version)
This function sets the minimum downgrade version allowed. Applicable only when the connection allows ...
Definition ssl.c:3976
WOLFSSL_API const unsigned char * wolfSSL_get_sessionID(const WOLFSSL_SESSION *s)
Retrieves the session’s ID. The session ID is always 32 bytes long.
Definition ssl.c:35712
WOLFSSL_API int wolfSSL_get_chain_count(WOLFSSL_X509_CHAIN *chain)
Retrieve's the peers certificate chain count.
Definition ssl.c:35553
WOLFSSL_API int wolfSSL_CTX_use_RSAPrivateKey_file(WOLFSSL_CTX *, const char *, int)
This function loads the private RSA key used in the SSL connection into the SSL context (WOLFSSL_CTX)...
Definition ssl.c:9797
WOLFSSL_API int wolfSSL_PKCS12_parse(WC_PKCS12 *pkcs12, const char *psw, WOLFSSL_EVP_PKEY **pkey, WOLFSSL_X509 **cert, WOLF_STACK_OF(WOLFSSL_X509) **ca)
PKCS12 can be enabled with adding –enable-opensslextra to the configure command. It can use triple DE...
Definition ssl.c:22114
WOLFSSL_API int wolfSSL_use_certificate_chain_file(WOLFSSL *, const char *file)
This function loads a chain of certificates into the SSL session (WOLFSSL structure)....
Definition ssl.c:9712
WOLFSSL_API unsigned char * wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN *, int idx)
Retrieves the peer’s ASN1.DER certificate at index (idx).
Definition ssl.c:35575
WOLFSSL_API int wolfSSL_get_chain_cert_pem(WOLFSSL_X509_CHAIN *, int idx, unsigned char *buf, int inLen, int *outLen)
Retrieves the peer’s PEM certificate at index (idx).
Definition ssl.c:35642
WOLFSSL_API long wolfSSL_set_tlsext_status_type(WOLFSSL *s, int type)
This function is called when the client application request that a server send back an OCSP status re...
Definition ssl.c:24773
WOLFSSL_API int wolfSSL_use_certificate_file(WOLFSSL *, const char *, int)
This function loads a certificate file into the SSL session (WOLFSSL structure). The certificate file...
Definition ssl.c:9676
WOLFSSL_API int wolfSSL_use_PrivateKey_file(WOLFSSL *, const char *, int)
This function loads a private key file into the SSL session (WOLFSSL structure). The key file is prov...
Definition ssl.c:9694
WOLFSSL_API WC_PKCS12 * wolfSSL_d2i_PKCS12_bio(WOLFSSL_BIO *bio, WC_PKCS12 **pkcs12)
wolfSSL_d2i_PKCS12_bio (d2i_PKCS12_bio) copies in the PKCS12 information from WOLFSSL_BIO to the stru...
Definition ssl.c:21899
WOLFSSL_API WC_PKCS12 * wolfSSL_i2d_PKCS12_bio(WOLFSSL_BIO *bio, WC_PKCS12 *pkcs12)
wolfSSL_i2d_PKCS12_bio (i2d_PKCS12_bio) copies in the cert information from the structure WC_PKCS12 t...
Definition ssl.c:21954
WOLFSSL_API int wolfSSL_X509_get_serial_number(WOLFSSL_X509 *, unsigned char *, int *)
Retrieves the peer’s certificate serial number. The serial number buffer (in) should be at least 32 b...
Definition ssl.c:17423
WOLFSSL_API int wolfSSL_get_chain_length(WOLFSSL_X509_CHAIN *, int idx)
Retrieves the peer’s ASN1.DER certificate length in bytes at index (idx).
Definition ssl.c:35564
WOLFSSL_API int wolfSSL_use_RSAPrivateKey_file(WOLFSSL *, const char *, int)
This function loads the private RSA key used in the SSL connection into the SSL session (WOLFSSL stru...
Definition ssl.c:9806
WOLFSSL_API WOLFSSL_X509_CHAIN * wolfSSL_get_peer_chain(WOLFSSL *ssl)
Retrieves the peer’s certificate chain.
Definition ssl.c:35542
Definition asn_public.h:195
Definition asn_public.h:213
Definition asn_public.h:178
Definition internal.h:1958
Definition internal.h:1833
Definition internal.h:1924
Definition internal.h:2595
Definition internal.h:1628
Definition internal.h:3109
Definition internal.h:2040
Definition internal.h:3546
Definition callbacks.h:59
Definition internal.h:3102
Definition internal.h:3572
Definition internal.h:3598
Definition internal.h:3849
Definition wolfevent.h:52
Definition curve25519.h:70
Definition callbacks.h:45
Definition callbacks.h:77
WOLFSSL_API char * wolfSSL_get_cipher_list_ex(WOLFSSL *ssl, int priority)
Definition ssl.c:836
WOLFSSL_API int wolfSSL_CTX_AllowEncryptThenMac(WOLFSSL_CTX *, int)
Definition ssl.c:478
WOLFSSL_API void wolfSSL_X509_PUBKEY_free(WOLFSSL_X509_PUBKEY *x)
Definition ssl.c:25051
WOLFSSL_API WOLFSSL_ASN1_TYPE * wolfSSL_ASN1_TYPE_new(void)
Definition ssl.c:24988
WOLFSSL_API void wolfSSL_CTX_SetVerifyDecryptCb(WOLFSSL_CTX *, CallbackVerifyDecrypt)
Definition ssl.c:3344
WOLFSSL_API void wolfSSL_ASN1_TYPE_free(WOLFSSL_ASN1_TYPE *at)
Definition ssl.c:25003
WOLFSSL_API int wolfSSL_AllowEncryptThenMac(WOLFSSL *s, int)
Definition ssl.c:492
AlertDescription
Definition ssl.h:601
@ unrecognized_name
Definition ssl.h:628
@ unsupported_extension
Definition ssl.h:627
@ bad_certificate_status_response
Definition ssl.h:629
@ certificate_required
Definition ssl.h:631
@ unknown_psk_identity
Definition ssl.h:630
WOLFSSL_API void wolfSSL_SetEncryptMacCtx(WOLFSSL *ssl, void *ctx)
Definition ssl.c:3317
WOLFSSL_API void * wolfSSL_GetEncryptMacCtx(WOLFSSL *ssl)
Definition ssl.c:3329
WOLFSSL_API int wolfSSL_X509_ALGOR_set0(WOLFSSL_X509_ALGOR *algor, WOLFSSL_ASN1_OBJECT *aobj, int ptype, void *pval)
Definition ssl.c:24933
WOLFSSL_API WOLFSSL_X509_PUBKEY * wolfSSL_X509_PUBKEY_new(void)
Definition ssl.c:25029
WOLFSSL_API void wolfSSL_CTX_SetEncryptMacCb(WOLFSSL_CTX *, CallbackEncryptMac)
Definition ssl.c:3305
@ WOLFSSL_SNI_FAKE_MATCH
Definition ssl.h:2858
WOLFSSL_API void * wolfSSL_GetVerifyDecryptCtx(WOLFSSL *ssl)
Definition ssl.c:3368
WOLFSSL_API void wolfSSL_SetVerifyDecryptCtx(WOLFSSL *ssl, void *ctx)
Definition ssl.c:3356