我使用向导创建一个DataSnap REST服务器,用于具有两个连接的3层应用程序:
向导已创建过程:
procedure TForm1.FormCreate(Sender: TObject);
var
LIOHandleSSL: TIdServerIOHandlerSSLOpenSSL;
begin
FServer := TIdHTTPWebBrokerBridge.Create(Self);
LIOHandleSSL := TIdServerIOHandlerSSLOpenSSL.Create(FServer);
LIOHandleSSL.SSLOptions.CertFile := '';
LIOHandleSSL.SSLOptions.RootCertFile := '';
LIOHandleSSL.SSLOptions.KeyFile := '';
LIOHandleSSL.OnGetPassword := OnGetSSLPassword;
FServer.IOHandler := LIOHandleSSL;
end;