tls_server.c
error_t tlsFormatServerSessionTicketExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SessionTicket extension.
Definition: tls_server_extensions.c:551
DTLS (Datagram Transport Layer Security)
Parsing and checking of TLS extensions.
error_t tlsFormatServerEmsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ExtendedMasterSecret extension.
Definition: tls_server_extensions.c:510
TLS helper functions.
X.509 certificate parsing.
Date and time management.
error_t tlsFormatCertAuthorities(TlsContext *context, uint8_t *p, size_t *written)
Format the list of distinguished names of acceptable CAs.
Definition: tls_common.c:882
error_t tlsParseClientMaxFragLenExtension(TlsContext *context, const TlsExtension *maxFragLen)
Parse MaxFragmentLength extension.
Definition: tls_server_extensions.c:798
error_t tlsParsePskIdentity(TlsContext *context, const uint8_t *p, size_t length, size_t *consumed)
Parse PSK identity.
Definition: tls_server_misc.c:1850
TLS cipher suites.
error_t tlsParseClientKeyParams(TlsContext *context, const uint8_t *p, size_t length, size_t *consumed)
Parse client's key exchange parameters.
Definition: tls_server_misc.c:1901
error_t tlsSendNewSessionTicket(TlsContext *context)
Send NewSessionTicket message.
Definition: tls_server.c:406
error_t tlsFormatPskIdentityHint(TlsContext *context, uint8_t *p, size_t *written)
Format PSK identity hint.
Definition: tls_server_misc.c:64
Handshake message processing (TLS 1.3 server)
Key material generation.
TLS handshake.
error_t tlsGeneratePskPremasterSecret(TlsContext *context)
Premaster secret generation (for PSK cipher suites)
Definition: tls_key_material.c:290
error_t tls12GenerateServerKeySignature(TlsContext *context, Tls12DigitalSignature *signature, const uint8_t *params, size_t paramsLen, size_t *written)
Sign server's key exchange parameters (TLS 1.2)
Definition: tls_server_misc.c:532
error_t tlsParseClientEcPointFormatsExtension(TlsContext *context, const TlsEcPointFormatList *ecPointFormatList)
Parse EcPointFormats extension.
Definition: tls_server_extensions.c:956
error_t tlsNegotiateVersion(TlsContext *context, uint16_t clientVersion, const TlsSupportedVersionList *supportedVersionList)
Version negotiation.
Definition: tls_server_misc.c:1221
error_t tlsSendCertificateRequest(TlsContext *context)
Send CertificateRequest message.
Definition: tls_server.c:275
error_t tlsParseServerCertTypeListExtension(TlsContext *context, const TlsCertTypeList *serverCertTypeList)
Parse ServerCertType extension.
Definition: tls_server_extensions.c:1199
error_t tlsFormatServerRenegoInfoExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RenegotiationInfo extension.
Definition: tls_server_extensions.c:597
Session cache management.
error_t tlsFormatSignAlgosExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SignatureAlgorithms extension.
Definition: tls_sign_misc.c:229
error_t tlsFormatServerHelloDone(TlsContext *context, TlsServerHelloDone *message, size_t *length)
Format ServerHelloDone message.
Definition: tls_server.c:1069
error_t tlsParseClientCertTypeListExtension(TlsContext *context, const TlsCertTypeList *clientCertTypeList)
Parse ClientCertType extension.
Definition: tls_server_extensions.c:1119
error_t tls13NegotiateCipherSuite(TlsContext *context, const void *clientHello, size_t clientHelloLen, const TlsCipherSuites *cipherSuites, TlsHelloExtensions *extensions)
Cipher suite and key exchange method negotiation.
Definition: tls13_server_misc.c:59
error_t tlsSendHandshakeMessage(TlsContext *context, const void *data, size_t length, TlsMessageType type)
Send handshake message.
Definition: tls_handshake.c:157
error_t tlsParseClientHello(TlsContext *context, const TlsClientHello *message, size_t length)
Parse ClientHello message.
Definition: tls_server.c:1164
error_t tlsFormatServerSniExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SNI extension.
Definition: tls_server_extensions.c:54
error_t tlsFormatServerKeyParams(TlsContext *context, uint8_t *p, size_t *written)
Format server's key exchange parameters.
Definition: tls_server_misc.c:109
error_t tlsSendServerHelloDone(TlsContext *context)
Send ServerHelloDone message.
Definition: tls_server.c:353
error_t tlsFormatSupportedSignAlgos(TlsContext *context, uint8_t *p, size_t *written)
Format the list of supported signature algorithms.
Definition: tls_sign_misc.c:362
error_t tlsParseClientKeyExchange(TlsContext *context, const TlsClientKeyExchange *message, size_t length)
Parse ClientKeyExchange message.
Definition: tls_server.c:1650
error_t tlsFormatServerRecordSizeLimitExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RecordSizeLimit extension.
Definition: tls_server_extensions.c:179
PEM file import functions.
error_t tlsParseClientSessionTicketExtension(TlsContext *context, const TlsExtension *sessionTicket)
Parse SessionTicket extension.
Definition: tls_server_extensions.c:1353
DTLS record protocol.
error_t tlsSendServerKeyExchange(TlsContext *context)
Send ServerKeyExchange message.
Definition: tls_server.c:192
error_t tlsParseClientEtmExtension(TlsContext *context, const TlsExtension *encryptThenMac)
Parse EncryptThenMac extension.
Definition: tls_server_extensions.c:1262
Formatting and parsing of extensions (TLS 1.3 server)
error_t tlsParseHelloExtensions(TlsMessageType msgType, const uint8_t *p, size_t length, TlsHelloExtensions *extensions)
Parse Hello extensions.
Definition: tls_extensions.c:56
error_t tlsResumeStatelessSession(TlsContext *context, const uint8_t *sessionId, size_t sessionIdLen, const TlsCipherSuites *cipherSuites, const TlsHelloExtensions *extensions)
Resume TLS session via session ticket.
Definition: tls_server_misc.c:1017
error_t tlsFormatClientCertTypeExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ClientCertType extension.
Definition: tls_server_extensions.c:373
error_t tlsFormatServerHello(TlsContext *context, TlsServerHello *message, size_t *length)
Format ServerHello message.
Definition: tls_server.c:451
error_t tls13FormatServerPreSharedKeyExtension(TlsContext *context, uint8_t *p, size_t *written)
Format PreSharedKey extension.
Definition: tls13_server_extensions.c:293
Handshake message processing (TLS client and server)
error_t tlsFormatCertAuthoritiesExtension(TlsContext *context, uint8_t *p, size_t *written)
Format CertificateAuthorities extension.
Definition: tls_common.c:830
error_t tlsFormatNewSessionTicket(TlsContext *context, TlsNewSessionTicket *message, size_t *length)
Format NewSessionTicket message.
Definition: tls_server.c:1088
error_t tlsNegotiateCipherSuite(TlsContext *context, const HashAlgo *hashAlgo, const TlsCipherSuites *cipherSuites, TlsHelloExtensions *extensions)
Cipher suite negotiation.
Definition: tls_server_misc.c:1320
TLS record protocol.
error_t tlsParseClientAlpnExtension(TlsContext *context, const TlsProtocolNameList *protocolNameList)
Parse ALPN extension.
Definition: tls_server_extensions.c:1017
uint16_t dtlsTranslateVersion(uint16_t version)
Translate TLS version into DTLS version.
Definition: dtls_misc.c:112
error_t tls13FormatServerSupportedVersionsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SupportedVersions extension.
Definition: tls13_server_extensions.c:55
Helper functions for TLS 1.3 server.
error_t tlsFormatServerMaxFragLenExtension(TlsContext *context, uint8_t *p, size_t *written)
Format MaxFragmentLength extension.
Definition: tls_server_extensions.c:108
Transcript hash calculation.
error_t tlsFormatCertificateRequest(TlsContext *context, TlsCertificateRequest *message, size_t *length)
Format CertificateRequest message.
Definition: tls_server.c:897
error_t tlsParseCompressMethods(TlsContext *context, const TlsCompressMethods *compressMethods)
Parse the list of compression methods supported by the client.
Definition: tls_server_misc.c:1797
error_t tlsFormatServerEcPointFormatsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format EcPointFormats extension.
Definition: tls_server_extensions.c:238
error_t tlsParseClientRecordSizeLimitExtension(TlsContext *context, const TlsExtension *recordSizeLimit)
Parse RecordSizeLimit extension.
Definition: tls_server_extensions.c:875
error_t tlsInitTranscriptHash(TlsContext *context)
Initialize handshake message hashing.
Definition: tls_transcript_hash.c:52
Handshake message processing (TLS server)
error_t tlsResumeStatefulSession(TlsContext *context, const uint8_t *sessionId, size_t sessionIdLen, const TlsCipherSuites *cipherSuites, const TlsHelloExtensions *extensions)
Resume TLS session via session ID.
Definition: tls_server_misc.c:854
Helper functions for signature generation and verification.
TLS (Transport Layer Security)
error_t tlsCheckSignalingCipherSuiteValues(TlsContext *context, const TlsCipherSuites *cipherSuites)
Check whether the ClientHello includes any SCSV cipher suites.
Definition: tls_server_misc.c:749
error_t tlsParseClientSniExtension(TlsContext *context, const TlsServerNameList *serverNameList)
Parse SNI extension.
Definition: tls_server_extensions.c:712
error_t tlsCheckHelloExtensions(TlsMessageType msgType, uint16_t version, TlsHelloExtensions *extensions)
Check Hello extensions.
Definition: tls_extensions.c:710
error_t tls13FormatServerKeyShareExtension(TlsContext *context, uint8_t *p, size_t *written)
Format KeyShare extension (ServerHello message)
Definition: tls13_server_extensions.c:156
FFDHE key exchange.
Helper functions for TLS server.
error_t tlsGenerateSessionKeys(TlsContext *context)
Generate session keys.
Definition: tls_key_material.c:51
error_t tlsFormatSignAlgosCertExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SignatureAlgorithmsCert extension.
Definition: tls_sign_misc.c:292
Formatting and parsing of extensions (TLS server)
void tlsChangeState(TlsContext *context, TlsState newState)
Update TLS state.
Definition: tls_misc.c:54
error_t tlsGenerateServerKeySignature(TlsContext *context, TlsDigitalSignature *signature, const uint8_t *params, size_t paramsLen, size_t *written)
Sign server's key exchange parameters (TLS 1.0 and TLS 1.1)
Definition: tls_server_misc.c:325
error_t tlsFormatServerCertTypeExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ServerCertType extension.
Definition: tls_server_extensions.c:421
error_t tlsGenerateRandomValue(TlsContext *context, uint8_t *random)
Generate client or server random value.
Definition: tls_misc.c:207
error_t tlsFormatServerAlpnExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ALPN extension.
Definition: tls_server_extensions.c:306
error_t tlsParseClientRenegoInfoExtension(TlsContext *context, const TlsHelloExtensions *extensions)
Parse RenegotiationInfo extension.
Definition: tls_server_extensions.c:1387
error_t dtlsVerifyCookie(TlsContext *context, const DtlsCookie *cookie, const DtlsClientParameters *clientParams)
Cookie verification.
Definition: dtls_misc.c:178
Debugging facilities.
error_t tlsFormatServerEtmExtension(TlsContext *context, uint8_t *p, size_t *written)
Format EncryptThenMac extension.
Definition: tls_server_extensions.c:468
error_t tlsFormatServerKeyExchange(TlsContext *context, TlsServerKeyExchange *message, size_t *length)
Format ServerKeyExchange message.
Definition: tls_server.c:775
error_t tlsParseClientEmsExtension(TlsContext *context, const TlsExtension *extendedMasterSecret)
Parse ExtendedMasterSecret extension.
Definition: tls_server_extensions.c:1304