TsgcUDPServer › Events › OnDTLSVerifyPeer
Fires during the DTLS handshake so the server can inspect and accept or reject the client certificate.
property OnDTLSVerifyPeer: TsgcUDPDTLSVerifyPeerEvent;
// TsgcUDPDTLSVerifyPeerEvent = procedure(Sender: TObject) of object
—
Fired by the DTLS engine during the handshake with a new peer when DTLS is True and DTLSOptions.VerifyCertificate is enabled. Use the event to apply application-specific validation rules in addition to the chain validation performed by OpenSSL, for example pinning the expected Common Name, checking a certificate revocation list or logging the certificate fingerprint before allowing the datagram exchange to proceed. The handler must be implemented in a thread-safe manner because it is invoked on the DTLS reader thread before any application payload is delivered.
procedure TForm1.oServerDTLSVerifyPeer(Sender: TObject);
begin
Memo1.Lines.Add('DTLS client certificate received');
end;