Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS support for THttpServer #92

Merged
merged 6 commits into from Jun 3, 2022
Merged

TLS support for THttpServer #92

merged 6 commits into from Jun 3, 2022

Conversation

achechulin
Copy link
Contributor

Initial TLS support.
Tested on Windows 10 (SSPI and OpenSSL 3.0.3), and in Ubuntu 22.04 (OpenSSL 3.0.3).
How to use:

fHttpServer := THttpServer.Create('443', nil, nil, '', 32, 30000, [hsoEnableTls]);
fHttpServer.WaitStarted; // raise exception e.g. on binding issue
fHttpServer.Sock.TLS.CertificateFile := 'cert.pem'; // cert.pfx for SSPI
fHttpServer.Sock.TLS.PrivateKeyFile := 'privkey.pem';

Copy link
Owner

@synopse synopse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great integration!

@synopse synopse merged commit 556e733 into synopse:master Jun 3, 2022
@synopse
Copy link
Owner

synopse commented Jun 3, 2022

I will try to implement it on the async server too.

@achechulin
Copy link
Contributor Author

Before, I looked at the NGINX source - async is much more complicated.

@synopse
Copy link
Owner

synopse commented Jun 3, 2022

my idea is to switch to synchronous/blocking socket mode for the TLS code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants