Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

eventTsmStreamSecII.OnTLSOutgoingAlert

property OnTLSOutgoingAlert: TTLSAlertEvent read FOnOutgoingAlert write SetOnOutgoingAlert;
Fires when this endpoint is about to send an alert to the peer. After a fatal outgoing alert the session is Closed (see TCustomTLS_ContentLayer.Closed); a TLSDecodeData that returns normally then releases it, and under a raising handler it stays registered until TLSClose. Hook this (rather than polling a cached session pointer) to observe local handshake/validation failures. DOWNGRADE (TESTING ONLY - DO NOT USE IN PRODUCTION): on a client session, setting Fatal := False on an identity or usage alert lets it go on with the server certificate it refused; on a chain-validation alert no certificate is accepted. On a server session a downgraded alert leaves no client certificate (ClientCertificate nil). On TLS 1.3 it sends a warning-level error alert, which RFC 8446 section 6 forbids, and a conforming TLS 1.3 peer, this library included, closes the connection on receipt. See TCustomTLS_ContentLayer.OnOutgoingAlert.