Doug Poulin
asked on
Perl LWP agent problems posting to https site
I have the following code snippet that runs fine on two machines, but not on the one I need it to run on.
use LWP::UserAgent;
$ua = LWP::UserAgent->new(ssl_op ts => {verify_hostname => 1 });
$res = $ua->post("https://tradehouse.net/send/interchange", content => { request => "$xmlout" });
Depending on the setting for verify_hostname I get two different results.
= 0 Bad hostname tradehouse.net:443
= 1 Certificate verification failed
I'm running it successfully on win XP and Win 7. The problem machine is running Windows 7 and it's a new PC with very little else on it. Other than being on different networks, and running different firewalls (Comodo is on the machine that fails) Norton is on the machines that work, I don't see a lot of difference between the two installations.
I'm using activestate perl. I've tried adding Mozilla::CA but that didn't make any difference. I've run out of ideas to try.
use LWP::UserAgent;
$ua = LWP::UserAgent->new(ssl_op
$res = $ua->post("https://tradehouse.net/send/interchange", content => { request => "$xmlout" });
Depending on the setting for verify_hostname I get two different results.
= 0 Bad hostname tradehouse.net:443
= 1 Certificate verification failed
I'm running it successfully on win XP and Win 7. The problem machine is running Windows 7 and it's a new PC with very little else on it. Other than being on different networks, and running different firewalls (Comodo is on the machine that fails) Norton is on the machines that work, I don't see a lot of difference between the two installations.
I'm using activestate perl. I've tried adding Mozilla::CA but that didn't make any difference. I've run out of ideas to try.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I solved the problem on my own.
Because you're listing the system as a "new machine", I'm leaning towards the CA chain may be the issue.