I will need an alternate solution through perl script as i have observered the curl command is working fine and its giving me responses and i would like to use the same instead of Rest client that i have been using in current perl script. Please check below curl command that is working fine.
curl -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: SSWS $APIKEY"Can i get simmiler kind of Client code snippet that i can utlize in my existing code that can be used for perl
sub run_api_call { #start with connecting to Onelogin and getting the profiles $client->getUseragent()->proxy(['https'], 'http://proxy.com:8080'); $client->addHeader('Authorization',"SSWS $value"); $client->addHeader('Accept','application/json'); $client->addHeader('Content-type','application/json'); $client->GET($_[0]); }
I am getting certificate validation error , I will need to understand that its my client issue or its a certificate validation issue and How i can resolve the certificate validation issue? The certificates are correct. As i have informed you that i am using strawbery perl for windows? What could be the real cause of this as per the debugging i am getting below error with below client.
sub run_api_call { #start with connecting to Onelogin and getting the profiles $client->getUseragent()->proxy(['https'], 'http://proxy.com:8080'); $client->setHost('my.onlogin.com'); $client->setCert("$cert"); $client->setKey("$certkey"); $client->setCa("$certca1"); $client->setCa("$certca"); $client->setTimeout(10); $client->addHeader('Authorization',"SSWS $value"); $client->addHeader('Accept','application/json'); $client->addHeader('Content-type','application/json'); $client->GET($_[0]); }
Current Error below
Its Responsecode1 : 500 . ts Responsecontent : SSL upgrade failed: SSL connect attempt failed er +ror:1416F086:SSL routines:tls_process_server_certificate:certificate +verify failed at C:/Strawberry/perl/vendor/lib/LWP/Protocol/http.pm l +ine 209.
In reply to Re^2: Error in certificate validation. Need help!
by chandantul
in thread Error in certificate validation. Need help!
by chandantul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |