Indy SSL Certificate

I am attempting to write an HTTPS client program with Borland C++ Builder 5.  I am using the Indy components because of their SSL support.  So far I have everything working with HTTP but now I am trying to work SSL into it.

I have downloaded the Indy SSL DLL files but I am having a hard time getting the certificate loaded.  The website I am trying to access is not mine so I do not have direct access to the certificate, but with Internet Explorer I can copy the certificate in the following formats:

DER encoded binar X.509 (.CER)
Base-64 encoded X.509 (.CER)
Cryptographic Message Syntax Standard - PKCS #7 Certiricates (.P7B)

I don't know how to have my program load the certificate and use it for the SSL connection.  When I set the IdSSLIOHandlerSocket->SSLOptions->CertFile variable to the path of the certificate file I get the error "Could not load certificate."

I would like step-by-step instructions for how to get Indy SSL working with the TIdHTTP component.

Thank you in advance for your responses.


--Adrian
LVL 12
AdrianSRUAsked:
Who is Participating?
 
MainiacfreakusCommented:
Here are examples for how to do it in Delphi...
I am afraid that I don't know C++ that well to help you much futher.
However if you need more help you are welcome to ask and I will do my best.

http://adg.bmpcoe.org/IndySSL/

Mainiacfreakus
0
 
AdrianSRUAuthor Commented:
Worked great!  I was trying to get much too complicated with downloading the certificate and trying to specify it in the SSL connection.

Thank you very much.


--Adrian
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.