Indy SSL Certificate

Posted on 2006-04-04
Last Modified: 2008-01-09
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.

Question by:AdrianSRU
    LVL 2

    Accepted Solution

    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.

    LVL 12

    Author Comment

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
    When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
    The viewer will learn how to implement Singleton Design Pattern in Java.
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now