|
typedef void | TlsHelloRequest |
| HelloRequest message. More...
|
|
typedef void | TlsCertificate |
| Certificate message. More...
|
|
typedef void | TlsServerKeyExchange |
| ServerKeyExchange message. More...
|
|
typedef void | TlsServerHelloDone |
| ServerHelloDone message. More...
|
|
typedef void | TlsClientKeyExchange |
| ClientKeyExchange message. More...
|
|
typedef void | TlsCertificateVerify |
| CertificateVerify message. More...
|
|
typedef void | TlsFinished |
| Finished message. More...
|
|
typedef void * | TlsSocketHandle |
| Socket handle. More...
|
|
typedef void(* | TlsStateChangeCallback) (TlsContext *context, TlsState state) |
| TLS state change callback. More...
|
|
typedef error_t(* | TlsSocketSendCallback) (TlsSocketHandle handle, const void *data, size_t length, size_t *written, uint_t flags) |
| Socket send callback function. More...
|
|
typedef error_t(* | TlsSocketReceiveCallback) (TlsSocketHandle handle, void *data, size_t size, size_t *received, uint_t flags) |
| Socket receive callback function. More...
|
|
typedef error_t(* | TlsAlpnCallback) (TlsContext *context, const char_t *selectedProtocol) |
| ALPN callback function. More...
|
|
typedef error_t(* | TlsPskCallback) (TlsContext *context, const uint8_t *pskIdentity, size_t pskIdentityLen) |
| Pre-shared key callback function. More...
|
|
typedef error_t(* | TlsCertVerifyCallback) (TlsContext *context, const X509CertInfo *certInfo, uint_t pathLen, void *param) |
| Certificate verification callback function. More...
|
|
typedef error_t(* | TlsRpkVerifyCallback) (TlsContext *context, const uint8_t *rawPublicKey, size_t rawPublicKeyLen) |
| Raw public key verification callback function. More...
|
|
typedef error_t(* | TlsTicketEncryptCallback) (TlsContext *context, const uint8_t *plaintext, size_t plaintextLen, uint8_t *ciphertext, size_t *ciphertextLen, void *param) |
| Ticket encryption callback function. More...
|
|
typedef error_t(* | TlsTicketDecryptCallback) (TlsContext *context, const uint8_t *ciphertext, size_t ciphertextLen, uint8_t *plaintext, size_t *plaintextLen, void *param) |
| Ticket decryption callback function. More...
|
|
typedef error_t(* | TlsEcdhCallback) (TlsContext *context) |
| ECDH key agreement callback function. More...
|
|
typedef error_t(* | TlsEcdsaSignCallback) (TlsContext *context, const uint8_t *digest, size_t digestLen, EcdsaSignature *signature) |
| ECDSA signature generation callback function. More...
|
|
typedef error_t(* | TlsEcdsaVerifyCallback) (TlsContext *context, const uint8_t *digest, size_t digestLen, EcdsaSignature *signature) |
| ECDSA signature verification callback function. More...
|
|
typedef void(* | TlsKeyLogCallback) (TlsContext *context, const char_t *key) |
| Key logging callback function (for debugging purpose only) More...
|
|
|
enum | TlsTransportProtocol { TLS_TRANSPORT_PROTOCOL_STREAM = 0,
TLS_TRANSPORT_PROTOCOL_DATAGRAM = 1,
TLS_TRANSPORT_PROTOCOL_EAP = 2
} |
| TLS transport protocols. More...
|
|
enum | TlsConnectionEnd { TLS_CONNECTION_END_CLIENT = 0,
TLS_CONNECTION_END_SERVER = 1
} |
| TLS connection end. More...
|
|
enum | TlsClientAuthMode { TLS_CLIENT_AUTH_NONE = 0,
TLS_CLIENT_AUTH_OPTIONAL = 1,
TLS_CLIENT_AUTH_REQUIRED = 2
} |
| Client authentication mode. More...
|
|
enum | TlsEarlyDataStatus { TLS_EARLY_DATA_REJECTED = 0,
TLS_EARLY_DATA_ACCEPTED = 1
} |
| Early data status. More...
|
|
enum | TlsFlags {
TLS_FLAG_PEEK = 0x0200,
TLS_FLAG_WAIT_ALL = 0x0800,
TLS_FLAG_BREAK_CHAR = 0x1000,
TLS_FLAG_BREAK_CRLF = 0x100A,
TLS_FLAG_WAIT_ACK = 0x2000,
TLS_FLAG_NO_DELAY = 0x4000,
TLS_FLAG_DELAY = 0x8000
} |
| Flags used by read and write functions. More...
|
|
enum | TlsContentType {
TLS_TYPE_NONE = 0,
TLS_TYPE_CHANGE_CIPHER_SPEC = 20,
TLS_TYPE_ALERT = 21,
TLS_TYPE_HANDSHAKE = 22,
TLS_TYPE_APPLICATION_DATA = 23,
TLS_TYPE_HEARTBEAT = 24,
TLS_TYPE_TLS12_CID = 25,
TLS_TYPE_ACK = 26
} |
| Content type. More...
|
|
enum | TlsMessageType {
TLS_TYPE_HELLO_REQUEST = 0,
TLS_TYPE_CLIENT_HELLO = 1,
TLS_TYPE_SERVER_HELLO = 2,
TLS_TYPE_HELLO_VERIFY_REQUEST = 3,
TLS_TYPE_NEW_SESSION_TICKET = 4,
TLS_TYPE_END_OF_EARLY_DATA = 5,
TLS_TYPE_HELLO_RETRY_REQUEST = 6,
TLS_TYPE_ENCRYPTED_EXTENSIONS = 8,
TLS_TYPE_REQUEST_CONNECTION_ID = 9,
TLS_TYPE_NEW_CONNECTION_ID = 10,
TLS_TYPE_CERTIFICATE = 11,
TLS_TYPE_SERVER_KEY_EXCHANGE = 12,
TLS_TYPE_CERTIFICATE_REQUEST = 13,
TLS_TYPE_SERVER_HELLO_DONE = 14,
TLS_TYPE_CERTIFICATE_VERIFY = 15,
TLS_TYPE_CLIENT_KEY_EXCHANGE = 16,
TLS_TYPE_FINISHED = 20,
TLS_TYPE_CERTIFICATE_URL = 21,
TLS_TYPE_CERTIFICATE_STATUS = 22,
TLS_TYPE_SUPPLEMENTAL_DATA = 23,
TLS_TYPE_KEY_UPDATE = 24,
TLS_TYPE_COMPRESSED_CERTIFICATE = 25,
TLS_TYPE_EKT_KEY = 26,
TLS_TYPE_MESSAGE_HASH = 254
} |
| Handshake message type. More...
|
|
enum | TlsAlertLevel { TLS_ALERT_LEVEL_WARNING = 1,
TLS_ALERT_LEVEL_FATAL = 2
} |
| Alert level. More...
|
|
enum | TlsAlertDescription {
TLS_ALERT_CLOSE_NOTIFY = 0,
TLS_ALERT_UNEXPECTED_MESSAGE = 10,
TLS_ALERT_BAD_RECORD_MAC = 20,
TLS_ALERT_DECRYPTION_FAILED = 21,
TLS_ALERT_RECORD_OVERFLOW = 22,
TLS_ALERT_DECOMPRESSION_FAILURE = 30,
TLS_ALERT_HANDSHAKE_FAILURE = 40,
TLS_ALERT_NO_CERTIFICATE = 41,
TLS_ALERT_BAD_CERTIFICATE = 42,
TLS_ALERT_UNSUPPORTED_CERTIFICATE = 43,
TLS_ALERT_CERTIFICATE_REVOKED = 44,
TLS_ALERT_CERTIFICATE_EXPIRED = 45,
TLS_ALERT_CERTIFICATE_UNKNOWN = 46,
TLS_ALERT_ILLEGAL_PARAMETER = 47,
TLS_ALERT_UNKNOWN_CA = 48,
TLS_ALERT_ACCESS_DENIED = 49,
TLS_ALERT_DECODE_ERROR = 50,
TLS_ALERT_DECRYPT_ERROR = 51,
TLS_ALERT_TOO_MANY_CIDS_REQUESTED = 52,
TLS_ALERT_EXPORT_RESTRICTION = 60,
TLS_ALERT_PROTOCOL_VERSION = 70,
TLS_ALERT_INSUFFICIENT_SECURITY = 71,
TLS_ALERT_INTERNAL_ERROR = 80,
TLS_ALERT_INAPPROPRIATE_FALLBACK = 86,
TLS_ALERT_USER_CANCELED = 90,
TLS_ALERT_NO_RENEGOTIATION = 100,
TLS_ALERT_MISSING_EXTENSION = 109,
TLS_ALERT_UNSUPPORTED_EXTENSION = 110,
TLS_ALERT_CERTIFICATE_UNOBTAINABLE = 111,
TLS_ALERT_UNRECOGNIZED_NAME = 112,
TLS_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE = 113,
TLS_ALERT_BAD_CERTIFICATE_HASH_VALUE = 114,
TLS_ALERT_UNKNOWN_PSK_IDENTITY = 115,
TLS_ALERT_CERTIFICATE_REQUIRED = 116,
TLS_ALERT_NO_APPLICATION_PROTOCOL = 120
} |
| Alert description. More...
|
|
enum | TlsCompressMethod { TLS_COMPRESSION_METHOD_NULL = 0,
TLS_COMPRESSION_METHOD_DEFLATE = 1
} |
| Compression methods. More...
|
|
enum | TlsKeyExchMethod {
TLS_KEY_EXCH_NONE = 0,
TLS_KEY_EXCH_RSA = 1,
TLS_KEY_EXCH_DH_RSA = 2,
TLS_KEY_EXCH_DHE_RSA = 3,
TLS_KEY_EXCH_DH_DSS = 4,
TLS_KEY_EXCH_DHE_DSS = 5,
TLS_KEY_EXCH_DH_ANON = 6,
TLS_KEY_EXCH_ECDH_RSA = 7,
TLS_KEY_EXCH_ECDHE_RSA = 8,
TLS_KEY_EXCH_ECDH_ECDSA = 9,
TLS_KEY_EXCH_ECDHE_ECDSA = 10,
TLS_KEY_EXCH_ECDH_ANON = 11,
TLS_KEY_EXCH_PSK = 12,
TLS_KEY_EXCH_RSA_PSK = 13,
TLS_KEY_EXCH_DHE_PSK = 14,
TLS_KEY_EXCH_ECDHE_PSK = 15,
TLS_KEY_EXCH_SRP_SHA = 16,
TLS_KEY_EXCH_SRP_SHA_RSA = 17,
TLS_KEY_EXCH_SRP_SHA_DSS = 18,
TLS13_KEY_EXCH_DHE = 19,
TLS13_KEY_EXCH_ECDHE = 20,
TLS13_KEY_EXCH_HYBRID = 21,
TLS13_KEY_EXCH_PSK = 22,
TLS13_KEY_EXCH_PSK_DHE = 23,
TLS13_KEY_EXCH_PSK_ECDHE = 24,
TLS13_KEY_EXCH_PSK_HYBRID = 25
} |
| Key exchange methods. More...
|
|
enum | TlsCertificateFormat { TLS_CERT_FORMAT_X509 = 0,
TLS_CERT_FORMAT_OPENPGP = 1,
TLS_CERT_FORMAT_RAW_PUBLIC_KEY = 2,
TLS_CERT_FORMAT_1609DOT2 = 3
} |
| Certificate formats. More...
|
|
enum | TlsCertificateType {
TLS_CERT_NONE = 0,
TLS_CERT_RSA_SIGN = 1,
TLS_CERT_DSS_SIGN = 2,
TLS_CERT_RSA_FIXED_DH = 3,
TLS_CERT_DSS_FIXED_DH = 4,
TLS_CERT_RSA_EPHEMERAL_DH = 5,
TLS_CERT_DSS_EPHEMERAL_DH = 6,
TLS_CERT_FORTEZZA_DMS = 20,
TLS_CERT_ECDSA_SIGN = 64,
TLS_CERT_RSA_FIXED_ECDH = 65,
TLS_CERT_ECDSA_FIXED_ECDH = 66,
TLS_CERT_GOST_SIGN256 = 67,
TLS_CERT_GOST_SIGN512 = 68,
TLS_CERT_RSA_PSS_SIGN = 256,
TLS_CERT_SM2_SIGN = 257,
TLS_CERT_ED25519_SIGN = 258,
TLS_CERT_ED448_SIGN = 259
} |
| Certificate types. More...
|
|
enum | TlsHashAlgo {
TLS_HASH_ALGO_NONE = 0,
TLS_HASH_ALGO_MD5 = 1,
TLS_HASH_ALGO_SHA1 = 2,
TLS_HASH_ALGO_SHA224 = 3,
TLS_HASH_ALGO_SHA256 = 4,
TLS_HASH_ALGO_SHA384 = 5,
TLS_HASH_ALGO_SHA512 = 6,
TLS_HASH_ALGO_INTRINSIC = 8,
TLS_HASH_ALGO_SM3 = 256
} |
| Hash algorithms. More...
|
|
enum | TlsSignatureAlgo {
TLS_SIGN_ALGO_ANONYMOUS = 0,
TLS_SIGN_ALGO_RSA = 1,
TLS_SIGN_ALGO_DSA = 2,
TLS_SIGN_ALGO_ECDSA = 3,
TLS_SIGN_ALGO_ED25519 = 7,
TLS_SIGN_ALGO_ED448 = 8,
TLS_SIGN_ALGO_GOSTR34102012_256 = 64,
TLS_SIGN_ALGO_GOSTR34102012_512 = 65
} |
| Signature algorithms. More...
|
|
enum | TlsSignatureScheme {
TLS_SIGN_SCHEME_NONE = 0x0000,
TLS_SIGN_SCHEME_RSA_PKCS1_SHA1 = 0x0201,
TLS_SIGN_SCHEME_RSA_PKCS1_SHA256 = 0x0401,
TLS_SIGN_SCHEME_RSA_PKCS1_SHA384 = 0x0501,
TLS_SIGN_SCHEME_RSA_PKCS1_SHA512 = 0x0601,
TLS_SIGN_SCHEME_RSA_PSS_RSAE_SHA256 = 0x0804,
TLS_SIGN_SCHEME_RSA_PSS_RSAE_SHA384 = 0x0805,
TLS_SIGN_SCHEME_RSA_PSS_RSAE_SHA512 = 0x0806,
TLS_SIGN_SCHEME_RSA_PSS_PSS_SHA256 = 0x0809,
TLS_SIGN_SCHEME_RSA_PSS_PSS_SHA384 = 0x080A,
TLS_SIGN_SCHEME_RSA_PSS_PSS_SHA512 = 0x080B,
TLS_SIGN_SCHEME_ECDSA_SHA1 = 0x0203,
TLS_SIGN_SCHEME_ECDSA_SECP256R1_SHA256 = 0x0403,
TLS_SIGN_SCHEME_ECDSA_SECP384R1_SHA384 = 0x0503,
TLS_SIGN_SCHEME_ECDSA_SECP521R1_SHA512 = 0x0603,
TLS_SIGN_SCHEME_ECDSA_BP256R1_TLS13_SHA256 = 0x081A,
TLS_SIGN_SCHEME_ECDSA_BP384R1_TLS13_SHA384 = 0x081B,
TLS_SIGN_SCHEME_ECDSA_BP512R1_TLS13_SHA512 = 0x081C,
TLS_SIGN_SCHEME_SM2SIG_SM3 = 0x0708,
TLS_SIGN_SCHEME_ED25519 = 0x0807,
TLS_SIGN_SCHEME_ED448 = 0x0808,
TLS_SIGN_SCHEME_GOSTR34102012_256A = 0x0709,
TLS_SIGN_SCHEME_GOSTR34102012_256B = 0x070A,
TLS_SIGN_SCHEME_GOSTR34102012_256C = 0x070B,
TLS_SIGN_SCHEME_GOSTR34102012_256D = 0x070C,
TLS_SIGN_SCHEME_GOSTR34102012_512A = 0x070D,
TLS_SIGN_SCHEME_GOSTR34102012_512B = 0x070E,
TLS_SIGN_SCHEME_GOSTR34102012_512C = 0x070F
} |
| Signature schemes. More...
|
|
enum | TlsExtensionType {
TLS_EXT_SERVER_NAME = 0,
TLS_EXT_MAX_FRAGMENT_LENGTH = 1,
TLS_EXT_CLIENT_CERTIFICATE_URL = 2,
TLS_EXT_TRUSTED_CA_KEYS = 3,
TLS_EXT_TRUNCATED_HMAC = 4,
TLS_EXT_STATUS_REQUEST = 5,
TLS_EXT_USER_MAPPING = 6,
TLS_EXT_CLIENT_AUTHZ = 7,
TLS_EXT_SERVER_AUTHZ = 8,
TLS_EXT_CERT_TYPE = 9,
TLS_EXT_SUPPORTED_GROUPS = 10,
TLS_EXT_EC_POINT_FORMATS = 11,
TLS_EXT_SRP = 12,
TLS_EXT_SIGNATURE_ALGORITHMS = 13,
TLS_EXT_USE_SRTP = 14,
TLS_EXT_HEARTBEAT = 15,
TLS_EXT_ALPN = 16,
TLS_EXT_STATUS_REQUEST_V2 = 17,
TLS_EXT_SIGNED_CERT_TIMESTAMP = 18,
TLS_EXT_CLIENT_CERT_TYPE = 19,
TLS_EXT_SERVER_CERT_TYPE = 20,
TLS_EXT_PADDING = 21,
TLS_EXT_ENCRYPT_THEN_MAC = 22,
TLS_EXT_EXTENDED_MASTER_SECRET = 23,
TLS_EXT_TOKEN_BINDING = 24,
TLS_EXT_CACHED_INFO = 25,
TLS_EXT_COMPRESS_CERTIFICATE = 27,
TLS_EXT_RECORD_SIZE_LIMIT = 28,
TLS_EXT_PWD_PROTECT = 29,
TLS_EXT_PWD_CLEAR = 30,
TLS_EXT_PASSWORD_SALT = 31,
TLS_EXT_TICKET_PINNING = 32,
TLS_EXT_TLS_CERT_WITH_EXTERN_PSK = 33,
TLS_EXT_SESSION_TICKET = 35,
TLS_EXT_SUPPORTED_EKT_CIPHERS = 39,
TLS_EXT_PRE_SHARED_KEY = 41,
TLS_EXT_EARLY_DATA = 42,
TLS_EXT_SUPPORTED_VERSIONS = 43,
TLS_EXT_COOKIE = 44,
TLS_EXT_PSK_KEY_EXCHANGE_MODES = 45,
TLS_EXT_CERTIFICATE_AUTHORITIES = 47,
TLS_EXT_OID_FILTERS = 48,
TLS_EXT_POST_HANDSHAKE_AUTH = 49,
TLS_EXT_SIGNATURE_ALGORITHMS_CERT = 50,
TLS_EXT_KEY_SHARE = 51,
TLS_EXT_TRANSPARENCY_INFO = 52,
TLS_EXT_CONNECTION_ID = 54,
TLS_EXT_EXTERNAL_ID_HASH = 55,
TLS_EXT_EXTERNAL_SESSION_ID = 56,
TLS_EXT_QUIC_TRANSPORT_PARAMETERS = 57,
TLS_EXT_TICKET_REQUEST = 58,
TLS_EXT_DNSSEC_CHAIN = 59,
TLS_EXT_RENEGOTIATION_INFO = 65281
} |
| TLS extension types. More...
|
|
enum | TlsNameType { TLS_NAME_TYPE_HOSTNAME = 0
} |
| Name type. More...
|
|
enum | TlsMaxFragmentLength { TLS_MAX_FRAGMENT_LENGTH_512 = 1,
TLS_MAX_FRAGMENT_LENGTH_1024 = 2,
TLS_MAX_FRAGMENT_LENGTH_2048 = 3,
TLS_MAX_FRAGMENT_LENGTH_4096 = 4
} |
| Maximum fragment length. More...
|
|
enum | TlsNamedGroup {
TLS_GROUP_NONE = 0,
TLS_GROUP_SECT163K1 = 1,
TLS_GROUP_SECT163R1 = 2,
TLS_GROUP_SECT163R2 = 3,
TLS_GROUP_SECT193R1 = 4,
TLS_GROUP_SECT193R2 = 5,
TLS_GROUP_SECT233K1 = 6,
TLS_GROUP_SECT233R1 = 7,
TLS_GROUP_SECT239K1 = 8,
TLS_GROUP_SECT283K1 = 9,
TLS_GROUP_SECT283R1 = 10,
TLS_GROUP_SECT409K1 = 11,
TLS_GROUP_SECT409R1 = 12,
TLS_GROUP_SECT571K1 = 13,
TLS_GROUP_SECT571R1 = 14,
TLS_GROUP_SECP160K1 = 15,
TLS_GROUP_SECP160R1 = 16,
TLS_GROUP_SECP160R2 = 17,
TLS_GROUP_SECP192K1 = 18,
TLS_GROUP_SECP192R1 = 19,
TLS_GROUP_SECP224K1 = 20,
TLS_GROUP_SECP224R1 = 21,
TLS_GROUP_SECP256K1 = 22,
TLS_GROUP_SECP256R1 = 23,
TLS_GROUP_SECP384R1 = 24,
TLS_GROUP_SECP521R1 = 25,
TLS_GROUP_BRAINPOOLP256R1 = 26,
TLS_GROUP_BRAINPOOLP384R1 = 27,
TLS_GROUP_BRAINPOOLP512R1 = 28,
TLS_GROUP_X25519 = 29,
TLS_GROUP_X448 = 30,
TLS_GROUP_BRAINPOOLP256R1_TLS13 = 31,
TLS_GROUP_BRAINPOOLP384R1_TLS13 = 32,
TLS_GROUP_BRAINPOOLP512R1_TLS13 = 33,
TLS_GROUP_GC256A = 34,
TLS_GROUP_GC256B = 35,
TLS_GROUP_GC256C = 36,
TLS_GROUP_GC256D = 37,
TLS_GROUP_GC512A = 38,
TLS_GROUP_GC512B = 39,
TLS_GROUP_GC512C = 40,
TLS_GROUP_CURVE_SM2 = 41,
TLS_GROUP_FFDHE2048 = 256,
TLS_GROUP_FFDHE3072 = 257,
TLS_GROUP_FFDHE4096 = 258,
TLS_GROUP_FFDHE6144 = 259,
TLS_GROUP_FFDHE8192 = 260,
TLS_GROUP_FFDHE_MAX = 511,
TLS_GROUP_X25519_KYBER768_DRAFT00 = 25497,
TLS_GROUP_SECP256R1_KYBER768_DRAFT00 = 25498,
TLS_GROUP_EXPLICIT_PRIME_CURVE = 65281,
TLS_GROUP_EXPLICIT_CHAR2_CURVE = 65282
} |
| Named groups. More...
|
|
enum | TlsEcPointFormat { TLS_EC_POINT_FORMAT_UNCOMPRESSED = 0,
TLS_EC_POINT_FORMAT_ANSI_X962_COMPRESSED_PRIME = 1,
TLS_EC_POINT_FORMAT_ANSI_X962_COMPRESSED_CHAR2 = 2
} |
| EC point formats. More...
|
|
enum | TlsEcCurveType { TLS_EC_CURVE_TYPE_EXPLICIT_PRIME = 1,
TLS_EC_CURVE_TYPE_EXPLICIT_CHAR2 = 2,
TLS_EC_CURVE_TYPE_NAMED_CURVE = 3
} |
| EC curve types. More...
|
|
enum | TlsState {
TLS_STATE_INIT = 0,
TLS_STATE_CLIENT_HELLO = 1,
TLS_STATE_CLIENT_HELLO_2 = 2,
TLS_STATE_EARLY_DATA = 3,
TLS_STATE_HELLO_VERIFY_REQUEST = 4,
TLS_STATE_HELLO_RETRY_REQUEST = 5,
TLS_STATE_SERVER_HELLO = 6,
TLS_STATE_SERVER_HELLO_2 = 7,
TLS_STATE_SERVER_HELLO_3 = 8,
TLS_STATE_HANDSHAKE_TRAFFIC_KEYS = 9,
TLS_STATE_ENCRYPTED_EXTENSIONS = 10,
TLS_STATE_SERVER_CERTIFICATE = 11,
TLS_STATE_SERVER_KEY_EXCHANGE = 12,
TLS_STATE_SERVER_CERTIFICATE_VERIFY = 13,
TLS_STATE_CERTIFICATE_REQUEST = 14,
TLS_STATE_SERVER_HELLO_DONE = 15,
TLS_STATE_CLIENT_CERTIFICATE = 16,
TLS_STATE_CLIENT_KEY_EXCHANGE = 17,
TLS_STATE_CLIENT_CERTIFICATE_VERIFY = 18,
TLS_STATE_CLIENT_CHANGE_CIPHER_SPEC = 19,
TLS_STATE_CLIENT_CHANGE_CIPHER_SPEC_2 = 20,
TLS_STATE_CLIENT_FINISHED = 21,
TLS_STATE_CLIENT_APP_TRAFFIC_KEYS = 22,
TLS_STATE_SERVER_CHANGE_CIPHER_SPEC = 23,
TLS_STATE_SERVER_CHANGE_CIPHER_SPEC_2 = 24,
TLS_STATE_SERVER_FINISHED = 25,
TLS_STATE_END_OF_EARLY_DATA = 26,
TLS_STATE_SERVER_APP_TRAFFIC_KEYS = 27,
TLS_STATE_NEW_SESSION_TICKET = 28,
TLS_STATE_KEY_UPDATE = 29,
TLS_STATE_APPLICATION_DATA = 30,
TLS_STATE_CLOSING = 31,
TLS_STATE_CLOSED = 32
} |
| TLS FSM states. More...
|
|
|
TlsContext * | tlsInit (void) |
| TLS context initialization. More...
|
|
TlsState | tlsGetState (TlsContext *context) |
| Retrieve current TLS state. More...
|
|
error_t | tlsSetStateChangeCallback (TlsContext *context, TlsStateChangeCallback stateChangeCallback) |
| Register TLS state change callback. More...
|
|
error_t | tlsSetSocketCallbacks (TlsContext *context, TlsSocketSendCallback socketSendCallback, TlsSocketReceiveCallback socketReceiveCallback, TlsSocketHandle handle) |
| Set socket send and receive callbacks. More...
|
|
error_t | tlsSetVersion (TlsContext *context, uint16_t versionMin, uint16_t versionMax) |
| Set minimum and maximum versions permitted. More...
|
|
error_t | tlsSetTransportProtocol (TlsContext *context, TlsTransportProtocol transportProtocol) |
| Set the transport protocol to be used. More...
|
|
error_t | tlsSetConnectionEnd (TlsContext *context, TlsConnectionEnd entity) |
| Set operation mode (client or server) More...
|
|
error_t | tlsSetPrng (TlsContext *context, const PrngAlgo *prngAlgo, void *prngContext) |
| Set the pseudo-random number generator to be used. More...
|
|
error_t | tlsSetServerName (TlsContext *context, const char_t *serverName) |
| Set the server name. More...
|
|
const char_t * | tlsGetServerName (TlsContext *context) |
| Get the server name. More...
|
|
error_t | tlsSetCache (TlsContext *context, TlsCache *cache) |
| Set session cache. More...
|
|
error_t | tlsSetClientAuthMode (TlsContext *context, TlsClientAuthMode mode) |
| Set client authentication mode (for servers only) More...
|
|
error_t | tlsSetBufferSize (TlsContext *context, size_t txBufferSize, size_t rxBufferSize) |
| Set TLS buffer size. More...
|
|
error_t | tlsSetMaxFragmentLength (TlsContext *context, size_t maxFragLen) |
| Set maximum fragment length. More...
|
|
error_t | tlsSetCipherSuites (TlsContext *context, const uint16_t *cipherSuites, uint_t length) |
| Specify the list of allowed cipher suites. More...
|
|
error_t | tlsSetSupportedGroups (TlsContext *context, const uint16_t *groups, uint_t length) |
| Specify the list of allowed ECDHE and FFDHE groups. More...
|
|
error_t | tlsSetPreferredGroup (TlsContext *context, uint16_t group) |
| Specify the preferred ECDHE or FFDHE group. More...
|
|
error_t | tlsSetSupportedSignAlgos (TlsContext *context, const uint16_t *signAlgos, uint_t length) |
| Specify the list of allowed signature algorithms. More...
|
|
error_t | tlsSetDhParameters (TlsContext *context, const char_t *params, size_t length) |
| Import Diffie-Hellman parameters. More...
|
|
error_t | tlsSetEcdhCallback (TlsContext *context, TlsEcdhCallback ecdhCallback) |
| Register ECDH key agreement callback function. More...
|
|
error_t | tlsSetEcdsaSignCallback (TlsContext *context, TlsEcdsaSignCallback ecdsaSignCallback) |
| Register ECDSA signature generation callback function. More...
|
|
error_t | tlsSetEcdsaVerifyCallback (TlsContext *context, TlsEcdsaVerifyCallback ecdsaVerifyCallback) |
| Register ECDSA signature verification callback function. More...
|
|
error_t | tlsSetKeyLogCallback (TlsContext *context, TlsKeyLogCallback keyLogCallback) |
| Register key logging callback function (for debugging purpose only) More...
|
|
error_t | tlsAllowUnknownAlpnProtocols (TlsContext *context, bool_t allowed) |
| Allow unknown ALPN protocols. More...
|
|
error_t | tlsSetAlpnProtocolList (TlsContext *context, const char_t *protocolList) |
| Set the list of supported ALPN protocols. More...
|
|
error_t | tlsSetAlpnCallback (TlsContext *context, TlsAlpnCallback alpnCallback) |
| Register ALPN callback function. More...
|
|
const char_t * | tlsGetAlpnProtocol (TlsContext *context) |
| Get the name of the selected ALPN protocol. More...
|
|
error_t | tlsSetPsk (TlsContext *context, const uint8_t *psk, size_t length) |
| Set the pre-shared key to be used. More...
|
|
error_t | tlsSetPskIdentity (TlsContext *context, const char_t *pskIdentity) |
| Set the PSK identity to be used by the client. More...
|
|
error_t | tlsSetPskIdentityHint (TlsContext *context, const char_t *pskIdentityHint) |
| Set the PSK identity hint to be used by the server. More...
|
|
error_t | tlsSetPskCallback (TlsContext *context, TlsPskCallback pskCallback) |
| Register PSK callback function. More...
|
|
error_t | tlsSetRpkVerifyCallback (TlsContext *context, TlsRpkVerifyCallback rpkVerifyCallback) |
| Register the raw public key verification callback function. More...
|
|
error_t | tlsSetTrustedCaList (TlsContext *context, const char_t *trustedCaList, size_t length) |
| Import a trusted CA list. More...
|
|
error_t | tlsAddCertificate (TlsContext *context, const char_t *certChain, size_t certChainLen, const char_t *privateKey, size_t privateKeyLen) |
| Add a certificate and the corresponding private key (deprecated) More...
|
|
error_t | tlsLoadCertificate (TlsContext *context, uint_t index, const char_t *certChain, size_t certChainLen, const char_t *privateKey, size_t privateKeyLen, const char_t *password) |
| Load entity's certificate. More...
|
|
error_t | tlsSetCertificateVerifyCallback (TlsContext *context, TlsCertVerifyCallback certVerifyCallback, void *param) |
| Register certificate verification callback function. More...
|
|
error_t | tlsEnableSessionTickets (TlsContext *context, bool_t enabled) |
| Enable session ticket mechanism. More...
|
|
error_t | tlsEnableSecureRenegotiation (TlsContext *context, bool_t enabled) |
| Enable secure renegotiation. More...
|
|
error_t | tlsEnableFallbackScsv (TlsContext *context, bool_t enabled) |
| Perform fallback retry (for clients only) More...
|
|
error_t | tlsSetTicketCallbacks (TlsContext *context, TlsTicketEncryptCallback ticketEncryptCallback, TlsTicketDecryptCallback ticketDecryptCallback, void *param) |
| Set ticket encryption/decryption callbacks. More...
|
|
error_t | tlsSetPmtu (TlsContext *context, size_t pmtu) |
| Set PMTU value (for DTLS only) More...
|
|
error_t | tlsSetTimeout (TlsContext *context, systime_t timeout) |
| Set timeout for blocking calls (for DTLS only) More...
|
|
error_t | tlsSetCookieCallbacks (TlsContext *context, DtlsCookieGenerateCallback cookieGenerateCallback, DtlsCookieVerifyCallback cookieVerifyCallback, void *param) |
| Set cookie generation/verification callbacks (for DTLS only) More...
|
|
error_t | tlsEnableReplayDetection (TlsContext *context, bool_t enabled) |
| Enable anti-replay mechanism (for DTLS only) More...
|
|
error_t | tlsSetMaxEarlyDataSize (TlsContext *context, size_t maxEarlyDataSize) |
| Send the maximum amount of 0-RTT data the server can accept. More...
|
|
error_t | tlsWriteEarlyData (TlsContext *context, const void *data, size_t length, size_t *written, uint_t flags) |
| Send early data to the remote TLS server. More...
|
|
error_t | tlsConnect (TlsContext *context) |
| Initiate the TLS handshake. More...
|
|
TlsEarlyDataStatus | tlsGetEarlyDataStatus (TlsContext *context) |
| Check whether the server has accepted or rejected the early data. More...
|
|
error_t | tlsWrite (TlsContext *context, const void *data, size_t length, size_t *written, uint_t flags) |
| Send application data to the remote host using TLS. More...
|
|
error_t | tlsRead (TlsContext *context, void *data, size_t size, size_t *received, uint_t flags) |
| Receive application data from a the remote host using TLS. More...
|
|
bool_t | tlsIsTxReady (TlsContext *context) |
| Check whether some data is ready for transmission. More...
|
|
bool_t | tlsIsRxReady (TlsContext *context) |
| Check whether some data is available in the receive buffer. More...
|
|
error_t | tlsShutdown (TlsContext *context) |
| Gracefully close TLS session. More...
|
|
error_t | tlsShutdownEx (TlsContext *context, bool_t waitForCloseNotify) |
| Gracefully close TLS session. More...
|
|
void | tlsFree (TlsContext *context) |
| Release TLS context. More...
|
|
error_t | tlsInitSessionState (TlsSessionState *session) |
| Initialize session state. More...
|
|
error_t | tlsSaveSessionState (const TlsContext *context, TlsSessionState *session) |
| Save TLS session. More...
|
|
error_t | tlsRestoreSessionState (TlsContext *context, const TlsSessionState *session) |
| Restore TLS session. More...
|
|
void | tlsFreeSessionState (TlsSessionState *session) |
| Properly dispose a session state. More...
|
|
TlsCache * | tlsInitCache (uint_t size) |
| Session cache initialization. More...
|
|
void | tlsFreeCache (TlsCache *cache) |
| Properly dispose a session cache. More...
|
|
TLS (Transport Layer Security)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSL Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Author
- Oryx Embedded SARL (www.oryx-embedded.com)
- Version
- 2.4.4
Definition in file tls.h.