TScHttpWebRequest SSLOptions CACertificateName
Posted: Fri 20 Jul 2018 16:16
Hi
I am trying to connect as a client to a external host that requieres a valid client certificate, I will need to use GET and POST to exchange information.
So I am trying to use TScHttpWebRequest (SecureBridge 8.2.4)
I have 2 ceritificates CACertificate and ClientCertificate, both are with DER file extension.
Using OpenSSL I have converted in PEM format.
here an example of what i am doing
var
Request: TScHttpWebRequest;
Response: TScHttpWebResponse;
begin
Request := TScHttpWebRequest.Create(aAPI_URL_Call);
Request.SSLOptions.Storage := ScRegStorage1;//in this storage I added the 2 certificates
Request.SSLOptions.CACertificateName := aCACertificateFile;
Request.SSLOptions.ClientCertificateName := aClientCertificateFile;
Response := Request.GetResponse;
And I have the error: "If a certificate is specified, it must have a private key"
Any Help?
I am trying to connect as a client to a external host that requieres a valid client certificate, I will need to use GET and POST to exchange information.
So I am trying to use TScHttpWebRequest (SecureBridge 8.2.4)
I have 2 ceritificates CACertificate and ClientCertificate, both are with DER file extension.
Using OpenSSL I have converted in PEM format.
here an example of what i am doing
var
Request: TScHttpWebRequest;
Response: TScHttpWebResponse;
begin
Request := TScHttpWebRequest.Create(aAPI_URL_Call);
Request.SSLOptions.Storage := ScRegStorage1;//in this storage I added the 2 certificates
Request.SSLOptions.CACertificateName := aCACertificateFile;
Request.SSLOptions.ClientCertificateName := aClientCertificateFile;
Response := Request.GetResponse;
And I have the error: "If a certificate is specified, it must have a private key"
Any Help?