Sample code for 30+ languages & platforms
Delphi ActiveX Requires Chilkat v11.0.0+

Example: Http.GetServerCert method

Demonstrates how to call the GetServerCert method.

Chilkat Delphi ActiveX Downloads

Delphi ActiveX
var
success: Integer;
http: TChilkatHttp;
cert: TChilkatCert;

begin
success := 0;

http := TChilkatHttp.Create(Self);
cert := TChilkatCert.Create(Self);

success := http.GetServerCert('chilkatsoft.com',443,cert.ControlInterface);
if (success = 0) then
  begin
    Memo1.Lines.Add(http.LastErrorText);
    Exit;
  end;

Memo1.Lines.Add(cert.SubjectDN);
Memo1.Lines.Add(cert.ValidToStr);

//  Output:

//  CN=*.chilkatsoft.com
//  Wed, 10 Jun 2026 23:59:59 GMT