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

OpenSSL API issues with fpcsrc/packages/openssl/src/openssl.pas #1

Closed
gcarreno opened this issue Mar 21, 2020 · 3 comments
Closed

OpenSSL API issues with fpcsrc/packages/openssl/src/openssl.pas #1

gcarreno opened this issue Mar 21, 2020 · 3 comments

Comments

@gcarreno
Copy link
Collaborator

Hi there,

If anyone is compiling this on a box that has OpenSSL 1.1 and above but using the stable version of both FPC(3.0.4) and Lazarus(2.0.6) and below, they will invariably get a:

ESSL: failed to create ssl context.

This is due to the fact that the OpenSSL API has changed from 1.0.x to 1.1.x.

I would advise you opt for Synapse(40.1) that you can install from the Online Package Manager and instead of the TfpHTTPClient, use THTTPSend. This makes it work regardless of the FPC version on the users computer.

I understand that you want to keep it to a bare minimum and not install external stuff. I've tried to solve this within the code itself and it can't be done. The file on the subject line has to be updated, but it is inside the FPC distribution, so outside of this code.

This applies, mainly, to Linux users since the latest symlink on the libssl.so points to libssl.so.1.1. I'm guessing that any updated Debian-based Linux distribution will have this issue, since the results of a Google search about this error are dated to 2018.

Windows users usually install their own ssl DLLs and avoid this issue.

Thanks in advance,
Gus

@gcarreno
Copy link
Collaborator Author

Hi There,

Latest commit solves this issue. Closing.

Cheers,
Gus

@wp-xyz
Copy link
Owner

wp-xyz commented Mar 21, 2020

Thanks for reporting. I also replace the FPHttlClient of FPC3.0.6 by the patched version used by the OnlinePackageManager, I was not aware that SSL has no many issues...

@gcarreno
Copy link
Collaborator Author

Hi there,

Quite welcome!

Well, neither did I until I used your app. I always use synapse THHTPSend and it hasn't had any issues.

I've been playing around with JSON APIs and never had an issue with HTTPS, but again, never used the native HTTP client.

Cheers,
Gus

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

No branches or pull requests

2 participants