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

[HttpClient] Allow to configure CURLOPT_SSLCERTTYPE for CurlHttpClient #37297

Closed
smoench opened this issue Jun 16, 2020 · 4 comments
Closed

[HttpClient] Allow to configure CURLOPT_SSLCERTTYPE for CurlHttpClient #37297

smoench opened this issue Jun 16, 2020 · 4 comments

Comments

@smoench
Copy link
Contributor

smoench commented Jun 16, 2020

Description
Currently the HttpClient only allows PEM-files for local_cert but curl has more options (DER, ENG, P12). Unfortunately this needs to be configured via another option CURLOPT_SSLCERTTYPE.

My proposal is to add the option local_cert_type to the CurlHttpClient. This could configured manually or probably guessed by the file extension.

I don't know if it is supported by the AmpHttpClient.

@nicolas-grekas
Copy link
Member

what about converting your der/eng/p12 certificates to pem instead? openssl has commands to do so.

@smoench
Copy link
Contributor Author

smoench commented Jun 16, 2020

I did that :-) But now I have two pem-files one for cert and one for private key. My use case is sending requests to apple push notification service for wallet updates. We also need to sign the wallets with an p12. With this option we would have only one file instead three.

(I could contribute this when it would be accepted)

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jul 7, 2020

Can't you bundle them both in the same file? This should work IIRC.
I'm leaning toward a 👎 on this since it will create portability issues between implementations (making it more complex to move from curl to native or amp)

@smoench
Copy link
Contributor Author

smoench commented Jul 8, 2020

Closing for keeping portability. Feel free to open again when those client implementation will support p12 certificates.

@smoench smoench closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants