Curl CURLOPT_SSL_CTX_FUNCTION issue
I have an issue with using root certificate, with curl CURLOPT_SSL_CTX_FUNCTION option. I tried one of the example program docs/examples/cacertinmem.c which is avilable along with the curl source download. This program is using CURLOPT_SSL_CTX_FUNCTION to set the hardcoded certificate before doing https transaction. But this program works only if I put the certificate bundle in the proper path. That means https transaction is happening beacuse of the certficate bundle and not from the root certificate which is provided in the program. This is also clear from the verbose output. As per curl documents CURLOPT_SSL_CTX_FUNCTION option actually takes the function pointer as an argument, which is called before SSL transaction so that it allows to change SSL settings. But when I run this program to get the https page, looks like the CURLOPT_SSL_CTX_FUNCTION is not calling the specfied callback funtion.
Please can anyone help me on this.
Thanks in advance.
|