I understood. I have the Rest client in my perl script, How i can import CA cert files in Perl CA store like the following Mozilla::CA?

The certificate is not Self Signed certificate.

#!/usr/bin/env perl use strict; no warnings; use Win32::Process; use REST::Client; use JSON::Parse ':all'; use MIME::Base64; use Term::ReadKey; use Data::Dumper; use MIME::Lite; use Config::Properties; use IO::Socket::SSL; use LWP::UserAgent; use HTTP::Request; use Mozilla::CA;sub my $apiurlapplog1 = $baseurl ."/api/v1/users?" . $pagecount1; my $client = REST::Client->new(); my @responsetext; my @responsetextall; run_api_call { #start with connecting to Okta and getting the users $client->getUseragent()->proxy(['https'], 'http://proxy.abc.com:8080' +); $client->setHost('sso.abc.com'); $client->setCert("$cert"); $client->setKey("$certkey"); #$client-> SSL_ca_file => Mozilla::CA::SSL_ca_file(); $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]); } print "$apiurlapplog1 . \n"; run_api_call($apiurlapplog1); my $responsecode = $client->responseCode() ; my $responsecontent = $client->responseContent() ; print "Its Responsecode1 : $responsecode . \n"; print "ts Responsecontent : $responsecontent . \n";

In reply to Re^6: 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.