How to use AutoSaveGeneratedCertificates?

I made the define active for STORE_AUTOGENERATED_CERT but in TROSocketOpenSSL.GenerateSelfSignedCertificate the fields fAutoSaveGeneratedCertificates and fAutoLoadGeneratedCertificates are always false at this point of execution.

Where is the proper place to set AutoSaveGeneratedCertificates := true on a TROHTTPServer?

Hi,

Note: this feature isn’t properly implemented/tested.

you can set this value via OnManualBind event like

procedure TMegaDemoServerMainForm.HTTPServerManualBindSocket(Sender: TObject);
begin
  if HTTPServer.Server.BindV4 then begin
    TROSocketOpenSSL((HTTPServer.Server.Socket4).OpenSSL).AutoSaveGeneratedCertificates := True;
    HTTPServer.Server.Socket4.Bind('0.0.0.0',HTTPServer.Server.Port);
  end
  if HTTPServer.Server.BindV6 then begin
    // TROSocketOpenSSL((HTTPServer.Server.Socket6).OpenSSL).AutoSaveGeneratedCertificates := True;
    HTTPServer.Server.Socket6.Bind('::',HTTPServer.Server.Port);
  end;
end;