Quantcast
Channel: All MSA Storage posts
Viewing all articles
Browse latest Browse all 8312

Re: MSA 1040: Perl XML API via HTTPS login problem

$
0
0

OK I think my problem is that the Perl library cannot find the authentication certificate. I have tried to specify the certificate, but still it doesn't work.

Since my Perl script will be used in the preparation/configuration phase, I don't really care about the communication security, and I bypass the host verification as a workaround.

So what I need is just one line:

$user_agent = LWP::UserAgent->new( );

$user_agent->ssl_opts(verify_hostname => 0); # BYPASS HOSTNAME VERIFICATION!

$url = 'https://msa1040_ip_address/api/login/' . $md5_hash;
$request = HTTP::Request->new( GET => $url );
$response = $user_agent->request($request);

... and BOOM! It works.


Viewing all articles
Browse latest Browse all 8312

Trending Articles