Skip to content
Discussion options

You must be logged in to vote

Found a way to get the root also with SNI enabled.

  1. Request to the URL with this combination to get the root cert with those flags
CURLOPT_SSL_VERIFYPEER = 0L
CURLOPT_SSL_VERIFYHOST = 1L

Checking the last cert I get if Subject = Issuer looping thru the results I get from CURLINFO_CERTINFO

  1. Another request with and passing the retrieved root to verify with the flags to verify:
CURLOPT_SSL_VERIFYPEER = 1L
CURLOPT_SSL_VERIFYHOST = 1L

Set the root via the following option to the root as PEM received from the first call:

CURLOPT_CAINFO_BLOB

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Daniel-Nashed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant