OtcFormula has asked for the wisdom of the Perl Monks concerning the following question:
Hello all!
I am using Net::SSLeay::post_https to post a bit of XML to a server using client certificate authentication. To wit:
($content, $respstr, %reply_headers) = Net::SSLeay::post_https($cfg->{'host'} , $cfg->{'port'} , '/' , '' , $xml , 'text/xml' , $cfg->{'certname'} . ".crt" , $cfg->{'certname'} . ".key" );
It works great! But sometimes it shouldn't!
It appears that no verification is being performed against the validity of the server certificate. When I use a hostname to connect that is different than the server certificate's DN, I get no warnings, errors, or anything but an otherwise successful connection. When using other languages/libraries with the same input, I get one or another "bad name" type of error.
What do I need to do in order to have Net::SSLeay::post_https verify the server name against the certificate it presents? (And potentially other verifications that should properly be made?)
Thanks!
OF
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Certificate host verification with Net::SSLeay::post_https
by Corion (Patriarch) on Oct 30, 2011 at 19:32 UTC | |
by OtcFormula (Novice) on Nov 13, 2011 at 04:10 UTC | |
|
Re: Certificate host verification with Net::SSLeay::post_https
by Khen1950fx (Canon) on Oct 31, 2011 at 15:01 UTC | |
by OtcFormula (Novice) on Nov 13, 2011 at 04:13 UTC |