Finance-Bank-Postbank_de

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  [Certificate fixes]
  + Add some text aliases used/produced by some BSD version of SSL

0.47 2017-07-16
  [Certificate fixes]
  + Add one more numeric identifier for certificates
    This fixes RT #122506, reported by Slaven Rezic

0.46 2017-07-16
  [Code fixes]
  + Make module more resilient against old versions of IO::Socket::SSL
    which don't have OCSP support
    This was reported by the CPAN testers with at least IO::Socket::SSL
    version 1.967
  [Certificate fixes]
  + Update certificate

0.45 2017-04-17
  [Test fixes]
  . Fix test suite that broke due to . (dot) not being in
    @INC anymore, thanks to Ryan Voots

0.44 2016-11-22

META.json  view on Meta::CPAN

         "requires" : {
            "LWP::ConsoleLogger" : "0.000039"
         }
      },
      "runtime" : {
         "requires" : {
            "Encode" : "0",
            "Filter::signatures" : "0.15",
            "Future" : "0",
            "HTTP::CookieJar::LWP" : "0",
            "IO::Socket::SSL" : "0",
            "JSON" : "0",
            "LWP::Protocol::https" : "0",
            "List::Sliding::Changes" : "0.02",
            "Moo" : "2",
            "Mozilla::CA" : "0",
            "WWW::Mechanize" : "1.52",
            "perl" : "5.008"
         }
      },
      "test" : {

META.yml  view on Meta::CPAN

name: Finance-Bank-Postbank_de
no_index:
  directory:
    - t
    - inc
requires:
  Encode: '0'
  Filter::signatures: '0.15'
  Future: '0'
  HTTP::CookieJar::LWP: '0'
  IO::Socket::SSL: '0'
  JSON: '0'
  LWP::Protocol::https: '0'
  List::Sliding::Changes: '0.02'
  Moo: '2'
  Mozilla::CA: '0'
  WWW::Mechanize: '1.52'
  perl: '5.008'
resources:
  repository: git://github.com/Corion/Finance-Bank-Postbank_de.git
version: '0.57'

Makefile.PL  view on Meta::CPAN


    PL_FILES            => {},
    BUILD_REQUIRES => {
        'ExtUtils::MakeMaker' => 0,
    },

    'PREREQ_PM'    => {
        'WWW::Mechanize'         => 1.52,
        'LWP::Protocol::https'   => 0,
        'HTTP::CookieJar::LWP'   => 0,
        'IO::Socket::SSL'        => 0, # For some constants as to what we want to verify
        'Mozilla::CA'            => 0,
        'Moo'                    => 2,
        'List::Sliding::Changes' => 0.02,
        'Encode'                 => 0, # for decoding the content and dealing with umlauts
        'Filter::signatures'     => 0.15,
        'JSON'                   => 0,
        'Future'                 => 0,
    }, # e.g., Module::Name => 1.1
    MIN_PERL_VERSION => '5.008', # 5.8 for Encode, 5.6 for the syntax
    TEST_REQUIRES => {

lib/Finance/Bank/Postbank_de.pm  view on Meta::CPAN

use Moo 2;

use Time::Local;
use POSIX 'strftime';

use Finance::Bank::Postbank_de::Account;
use Finance::Bank::Postbank_de::APIv1;
use Encode qw(decode);
use Mozilla::CA;

#use IO::Socket::SSL qw(SSL_VERIFY_PEER SSL_VERIFY_NONE);

our $VERSION = '0.57';

has 'login' => (
    is => 'ro',
);

has 'password' => (
    is => 'ro',
);

lib/Finance/Bank/Postbank_de/APIv1.pm  view on Meta::CPAN

package Finance::Bank::Postbank_de::APIv1;
use Moo;
use JSON 'decode_json';
use Filter::signatures;
no warnings 'experimental::signatures';
use feature 'signatures';
use Carp 'croak';
use WWW::Mechanize;
use Mozilla::CA;
use HTTP::CookieJar::LWP;
use IO::Socket::SSL qw(SSL_VERIFY_PEER SSL_VERIFY_NONE);

use HAL::Resource;
use Finance::Bank::Postbank_de::APIv1::Finanzstatus;
use Finance::Bank::Postbank_de::APIv1::Message;
use Finance::Bank::Postbank_de::APIv1::Transaction;
use Finance::Bank::Postbank_de::APIv1::Account;
use Finance::Bank::Postbank_de::APIv1::Depot;
use Finance::Bank::Postbank_de::APIv1::Position;

our $VERSION = '0.57';

lib/Finance/Bank/Postbank_de/APIv1.pm  view on Meta::CPAN

    };
    $self->config( $config );
    $config
}

sub configure_ua_ssl( $self, $ua=$self->ua ) {
    # OpenSSL 1.0.1 doesn't properly scan the certificate chain as supplied
    # by Mozilla::CA, so we only verify the certificate directly there:
    my @verify;

    if( IO::Socket::SSL->VERSION <= 1.990 ) {
        # No OCSP support
        @verify = ();
    } elsif( Net::SSLeay::SSLeay() <= 0x100010bf ) { # 1.0.1k
        @verify = (
            SSL_fingerprint => 'sha256$99043D1F58197BDDFAEA3F914A8693588B067D7DC85BF532D7B773A9ED98F915',
            SSL_ocsp_mode => IO::Socket::SSL::SSL_OCSP_NO_STAPLE(),
        );
    } else {
        # We need no special additional options to verify the certificate chain
        @verify = (
            SSL_ocsp_mode => IO::Socket::SSL::SSL_OCSP_FULL_CHAIN(),
        );
    };
    $ua->ssl_opts(
        SSL_ca_file => Mozilla::CA::SSL_ca_file(),
        SSL_verify_mode => SSL_VERIFY_PEER(),
        @verify,
        #SSL_verify_callback => sub {
            #use Data::Dumper;
            #warn Dumper \@_;
            #return 1;

lib/Finance/Bank/Postbank_de/Account.pm  view on Meta::CPAN

    or do {
      diag "--- Expected";
      diag $expected;
      diag "--- Got";
      diag $::_STDOUT_;
    };

=head1 DESCRIPTION

This module provides a rudimentary interface to the Postbank online banking system at
https://banking.postbank.de/. You will need either Crypt::SSLeay or IO::Socket::SSL
installed for HTTPS support to work with LWP.

The interface was cooked up by me without taking a look at the other Finance::Bank
modules. If you have any proposals for a change, they are welcome !

=head1 WARNING

This is code for online banking, and that means your money, and that means BE CAREFUL. You are encouraged, nay, expected, to audit the source of this module yourself to reassure yourself that I am not doing anything untoward with your banking data. T...

=head1 WARNUNG



( run in 0.570 second using v1.01-cache-2.11-cpan-4d50c553e7e )