Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Commit

Permalink
Test for Perl compatibility with TLSv1.2. (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
khera authored and braebot committed Aug 28, 2017
1 parent 20dc608 commit e7625b2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
30 changes: 30 additions & 0 deletions perl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Perl

To ensure that the Perl PayflowPro module will work with TLSv1.2, we
need to verify that the underlying LWP::UserAgent module will support
TLSv1.2. It requires OpenSSL 1.0.1c or later.

The simplest test is to run this command line on your *production*
server:

```
lwp-request https://tlstest.paypal.com/
```

It should output `PayPal_Connection_OK` on success, or an error
message on failure.

If your system does not have lwp-request command line program
installed as part of the LWP package, you can run the `pfp-test.perl`
program. It will output `PayPal_Connection_OK` on success, or an error
message on failure.

Sample output:

```
Perl: 5.024001
LWP: 6.22
PayPal_Connection_OK
```

You don't need to run both tests as they are equivalent.
16 changes: 16 additions & 0 deletions perl/pfp-test.perl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/local/bin/perl
use strict;

use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
my $response = $ua->get('https://tlstest.paypal.com/');

print "Perl: $]\nLWP: $LWP::UserAgent::VERSION\n";

if ($response->is_success) {
print $response->decoded_content,"\n";
}
else {
die $response->status_line;
}

0 comments on commit e7625b2

Please sign in to comment.