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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.