ts at unixadm dot org>
#
use strict;
use warnings;
use IO::Socket::SSL;
use LWP::UserAgent;
use JSON;
use MIME::Base64;
our $VERSION = "0.2";
sub new {bless {'success' => 1}, $_[0]}
sub success {
or'} = "could not set up user agent";
return 0
}
1
}
sub processResponse {
my $res = decode_json $_[1];
unless ($res->{'status'} == 1) {
$_[0]->{'success'} = 0;
$_[0]->{'error'} = sprintf "
>post(
'https://api'.($_[0]->{'test'}?'test':'').'.startssl.com/', {
'RequestData' => encode_json {
'tokenId' => $_[0]->{'tokenID'},
'actionType' => 'ApplyCertificate',
'certType' =>