Hello
I am trying to get information from an API that uses HTTPS via JSON using the "netGet" function, but I can not connect, this function returns me that there is no connection and when I debug the resulting header always shows me this value in the variable errorString "Error while reading: error: 14094410: SSL routines: SSL3_READ_BYTES: sslv3 alert handshake failure, error: 140940E5: SSL routines: SSL3_READ_BYTES: ssl handshake failure"
I take as an example the code found in the documentation in the function JsonEncode and also install all the certificates needed to access.
PS: When I call it in Chrome and Internet Explorer, this works.
Thanks
netGet JSON function
- agruber
- Posts:147
- Joined: Tue Sep 07, 2010 2:52 pm
Re: netGet JSON function
Hello,
Eventually the handshake cannot be made because the CA cert store does not have a valid CA certificate for the site you want to connect.
Eventually a new cacert.pem file helps, it needs to be copied to the WinCC OA config directory.
More info about this file and where to obtain it can be found here:
https://stackoverflow.com/questions/149 ... rt-pem-for
BR,
Andreas
Customer Care
Eventually the handshake cannot be made because the CA cert store does not have a valid CA certificate for the site you want to connect.
Eventually a new cacert.pem file helps, it needs to be copied to the WinCC OA config directory.
More info about this file and where to obtain it can be found here:
https://stackoverflow.com/questions/149 ... rt-pem-for
BR,
Andreas
Customer Care
- jeissonsierrac
- Posts:62
- Joined: Wed Jun 03, 2015 9:37 pm
Re: netGet JSON function
Hello
Our supplier sent us the file file *.pem. We copied it in the folder C:\\Siemens\\Automation\\WinCC_OA\\3.14\\config
Our supplier sent us also the file file *.p12 that we imported in our windows 7 system.
our script is :
The function return in the log file what we posted previously.
Our understandigs is that the WinCC OA doesnt use this certifacete.
Any tips?
Our supplier sent us the file file *.pem. We copied it in the folder C:\\Siemens\\Automation\\WinCC_OA\\3.14\\config
Our supplier sent us also the file file *.p12 that we imported in our windows 7 system.
our script is :
Code: Select all
mapping options;
options["ignoreSslErrors"] = makeDynString("");
iAnswer = netGet("https://internetAddress, result,options);
delay(0,1000);
if ( iAnswer == -1 )
{
DebugN("error of the netGet Function",result);
dpSet(sDPError,1);
}
else
{
dpSet(sDPError,0);
DebugN("result as value",result);
Our understandigs is that the WinCC OA doesnt use this certifacete.
Any tips?
- rgreino
- Posts:4
- Joined: Fri Jun 22, 2012 5:01 pm
Re: netGet JSON function
Dear DJ Sierra, Andreas,
It would look like net* functions do not provide a way to set the client cerfiticate/key (or it is at least not documented).
As example, equivalent of :
QSslConfiguration::setPrivateKey
QSslConfiguration::setLocalCertificate
QNetworkRequest::setSslConfiguration
It seems like Control doesn't expose this interface or it is not documented.
Regards,
Bobby
It would look like net* functions do not provide a way to set the client cerfiticate/key (or it is at least not documented).
As example, equivalent of :
QSslConfiguration::setPrivateKey
QSslConfiguration::setLocalCertificate
QNetworkRequest::setSslConfiguration
It seems like Control doesn't expose this interface or it is not documented.
Regards,
Bobby