-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Add support CA bundle in memory with CURLOPT_CAINFO_BLOB and CURLOPT_PROXY_CAINFO_BLOB #6662
Conversation
006fdd7
to
56ce2e9
Compare
@JCMais and @nadrolinux your test are also welcomes |
I don't understand the two check problem, probably not related to my code. regards |
6134a0a
to
e52a690
Compare
I have made some suggested changes. One of them is that the blob override regular cainfo. I don't understand why some ssl primary options are accessed by |
@jay Thank you for your modification. |
1f5506b
to
575b344
Compare
Glad to see progress on this stuff. Later this week I'll try to test this version on both Linux and Android. |
I added support on Secure Transport and Schannel backends, like others blobs |
That's great. I still don't know whether it's proper to access the blobs with SSL_SET_OPTION(primary.foo or SSL_CONN_CONFIG(foo). My understanding of the latter is it carries with the connection, so I guess is copied from the transfer. I wonder why though CAfile or ca blob needs to go with the connection. In the case of blob it just seems like an extra unnecessary copy. |
I've no opinion, but I suppose the method for CAINFO (filename) and CAINFO_BLOB must be the same. @bagder probably have an idea... |
f81292c
to
c504789
Compare
4deeb2e
to
d47fc0a
Compare
I wrote on #6820 a comment about blob test. |
I've copied the relevant part of your comment below.
That seems unnecessary for a blob test. Rather than use the curl tool to test you can use just libcurl, refer to libtest directory |
Do you think there are more work needed on this PR ? |
I will review it again when the feature window opens |
Thank you. So feature window is only 2 week I believe. |
yes if there are no serious problems in 7.76.1 then it runs from next week until may 5. release calendar |
@bagder I wrote a simple code and uploaded it to http://gvollant.free.fr/demo_curl_portion.c You can probably use it with a test based on test 310 , for schannel, openssl and sectransp |
|
I wrote this commit that adds a check for |
Here's a patch that adds test 678 that verifies |
e5b3a5f
to
c928c4f
Compare
I integrated your test. What about adding a section to test with openssl, schannel and sectransport only? |
On you file, this portion of file test678 have CRLF ending. Is it needed?
|
It is needed, and you probably see that the test fails without them. They are present in my local version, but I forgot that they don't survive a |
Ah right. That needs to be handled too somehow. I'll work on it. |
There is fail on https://dev.azure.com/daniel0244/5571c33c-81e1-43d7-93ee-d3d4152f27b2/_apis/build/builds/5612/logs/100 and I don't have knowledge to fix them. test 678 seem ok at https://cirrus-ci.com/task/5675663530131456 Note: You can commit on my github fork.I invited you, and I beleive as maintainer of original repo, you have modification right on my repo |
Okay, I added a commit that makes test 678 only run if it can use the setopt. So I made the setopt fail properly if libcurl doesn't support the option in that build setup. |
Do you want I rebase and merge all commit ? |
They are some schannel error
Pehaps solution is using CURLSSLOPT_NO_REVOKE or CURLSSLOPT_REVOKE_BEST_EFFORT on test 678 |
…Y_CAINFO_PEM Let applications provide the CA bundle to libcurl as a PEM formatted in-memory buffer. Rebased branch bundled_cacert from moparisthebest Validation : 397e11b [397e11b] Parents : 4506607 Auteur : moparisthebest <admin@moparisthebest.com> Date : vendredi 3 avril 2020 00:32:42 Auteur : moparisthebest Date de validation : samedi 4 avril 2020 00:31:23 Add CURLOPT_CAINFO_PEM
It seem test failure are now not related with these PR modification. I do a rebase |
Thanks guys |
Actually Error can be seen here: https://cirrus-ci.com/task/4924099123216384?logs=compile#L1095 |
Follow-up to 77fc385 from yesterday. Bug: #6662 (comment) Reported-by: Marc Hörsken
My fault. Thanks, landed in 5a1ec19. |
Awesome job you all on getting this PR merged. This feature will be very useful. |
Adds CURLOPT_CAINFO_BLOB and CURLOPT_PROXY_CAINFO_BLOB that let applications provide the CA bundle to libcurl as a PEM formatted in-memory buffer.
This is an alternative of pr #6109 , which uses blob (introduced with #5357 on curl 7.71) instead char* string to hold PEM certificates.
On #6109 , @bagder and @jay discuss about using blob possible advantage