From: Charles McGarvey Date: Wed, 11 May 2022 23:17:56 +0000 (-0600) Subject: Version 0.903 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=701e06e1250b8ae4494d32896361ed5406674bb2;p=chaz%2Fp5-File-KDBX Version 0.903 --- diff --git a/Changes b/Changes index d9e489e..8de6278 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for File-KDBX. +0.903 2022-05-11 17:17:13-0600 + + * Fixed parsing KDBX4 datetimes on 32-bit perls. + * Fixed broken tests on perls < 5.14. + 0.902 2022-05-03 19:18:06-0600 * Added support for 32-bit perls. diff --git a/META.json b/META.json index e72d259..ff130aa 100644 --- a/META.json +++ b/META.json @@ -119,7 +119,7 @@ "IPC::Cmd" : "0.84", "Iterator::Simple" : "0", "List::Util" : "1.33", - "Math::BigInt" : "0", + "Math::BigInt" : "1.993", "Module::Load" : "0", "Module::Loaded" : "0", "POSIX" : "0", @@ -129,7 +129,7 @@ "Storable" : "0", "Symbol" : "0", "Text::ParseWords" : "0", - "Time::Piece" : "0", + "Time::Piece" : "1.33", "XML::LibXML" : "0", "XML::LibXML::Reader" : "0", "boolean" : "0", @@ -152,9 +152,10 @@ "Getopt::Std" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", + "Math::BigInt" : "1.993", "Test::Deep" : "0", "Test::Fatal" : "0", - "Test::More" : "0", + "Test::More" : "1.001004_001", "Test::Warnings" : "0", "lib" : "0", "utf8" : "0" @@ -167,155 +168,155 @@ "provides" : { "File::KDBX" : { "file" : "lib/File/KDBX.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Cipher" : { "file" : "lib/File/KDBX/Cipher.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Cipher::CBC" : { "file" : "lib/File/KDBX/Cipher/CBC.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Cipher::Stream" : { "file" : "lib/File/KDBX/Cipher/Stream.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Constants" : { "file" : "lib/File/KDBX/Constants.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper" : { "file" : "lib/File/KDBX/Dumper.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper::KDB" : { "file" : "lib/File/KDBX/Dumper/KDB.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper::Raw" : { "file" : "lib/File/KDBX/Dumper/Raw.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper::V3" : { "file" : "lib/File/KDBX/Dumper/V3.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper::V4" : { "file" : "lib/File/KDBX/Dumper/V4.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Dumper::XML" : { "file" : "lib/File/KDBX/Dumper/XML.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Entry" : { "file" : "lib/File/KDBX/Entry.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Error" : { "file" : "lib/File/KDBX/Error.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Group" : { "file" : "lib/File/KDBX/Group.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::IO" : { "file" : "lib/File/KDBX/IO.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::IO::Crypt" : { "file" : "lib/File/KDBX/IO/Crypt.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::IO::HashBlock" : { "file" : "lib/File/KDBX/IO/HashBlock.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::IO::HmacBlock" : { "file" : "lib/File/KDBX/IO/HmacBlock.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Iterator" : { "file" : "lib/File/KDBX/Iterator.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::KDF" : { "file" : "lib/File/KDBX/KDF.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::KDF::AES" : { "file" : "lib/File/KDBX/KDF/AES.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::KDF::Argon2" : { "file" : "lib/File/KDBX/KDF/Argon2.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key" : { "file" : "lib/File/KDBX/Key.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key::ChallengeResponse" : { "file" : "lib/File/KDBX/Key/ChallengeResponse.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key::Composite" : { "file" : "lib/File/KDBX/Key/Composite.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key::File" : { "file" : "lib/File/KDBX/Key/File.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key::Password" : { "file" : "lib/File/KDBX/Key/Password.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Key::YubiKey" : { "file" : "lib/File/KDBX/Key/YubiKey.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader" : { "file" : "lib/File/KDBX/Loader.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader::KDB" : { "file" : "lib/File/KDBX/Loader/KDB.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader::Raw" : { "file" : "lib/File/KDBX/Loader/Raw.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader::V3" : { "file" : "lib/File/KDBX/Loader/V3.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader::V4" : { "file" : "lib/File/KDBX/Loader/V4.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Loader::XML" : { "file" : "lib/File/KDBX/Loader/XML.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Object" : { "file" : "lib/File/KDBX/Object.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Safe" : { "file" : "lib/File/KDBX/Safe.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Transaction" : { "file" : "lib/File/KDBX/Transaction.pm", - "version" : "0.902" + "version" : "0.903" }, "File::KDBX::Util" : { "file" : "lib/File/KDBX/Util.pm", - "version" : "0.902" + "version" : "0.903" } }, "release_status" : "stable", @@ -330,7 +331,7 @@ "web" : "https://github.com/chazmcgarvey/File-KDBX" } }, - "version" : "0.902", + "version" : "0.903", "x_authority" : "cpan:CCM", "x_generated_by_perl" : "v5.34.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.27", diff --git a/META.yml b/META.yml index 02a301d..c0bda7d 100644 --- a/META.yml +++ b/META.yml @@ -9,9 +9,10 @@ build_requires: Getopt::Std: '0' IO::Handle: '0' IPC::Open3: '0' + Math::BigInt: '1.993' Test::Deep: '0' Test::Fatal: '0' - Test::More: '0' + Test::More: 1.001004_001 Test::Warnings: '0' lib: '0' utf8: '0' @@ -49,118 +50,118 @@ optional_features: provides: File::KDBX: file: lib/File/KDBX.pm - version: '0.902' + version: '0.903' File::KDBX::Cipher: file: lib/File/KDBX/Cipher.pm - version: '0.902' + version: '0.903' File::KDBX::Cipher::CBC: file: lib/File/KDBX/Cipher/CBC.pm - version: '0.902' + version: '0.903' File::KDBX::Cipher::Stream: file: lib/File/KDBX/Cipher/Stream.pm - version: '0.902' + version: '0.903' File::KDBX::Constants: file: lib/File/KDBX/Constants.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper: file: lib/File/KDBX/Dumper.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper::KDB: file: lib/File/KDBX/Dumper/KDB.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper::Raw: file: lib/File/KDBX/Dumper/Raw.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper::V3: file: lib/File/KDBX/Dumper/V3.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper::V4: file: lib/File/KDBX/Dumper/V4.pm - version: '0.902' + version: '0.903' File::KDBX::Dumper::XML: file: lib/File/KDBX/Dumper/XML.pm - version: '0.902' + version: '0.903' File::KDBX::Entry: file: lib/File/KDBX/Entry.pm - version: '0.902' + version: '0.903' File::KDBX::Error: file: lib/File/KDBX/Error.pm - version: '0.902' + version: '0.903' File::KDBX::Group: file: lib/File/KDBX/Group.pm - version: '0.902' + version: '0.903' File::KDBX::IO: file: lib/File/KDBX/IO.pm - version: '0.902' + version: '0.903' File::KDBX::IO::Crypt: file: lib/File/KDBX/IO/Crypt.pm - version: '0.902' + version: '0.903' File::KDBX::IO::HashBlock: file: lib/File/KDBX/IO/HashBlock.pm - version: '0.902' + version: '0.903' File::KDBX::IO::HmacBlock: file: lib/File/KDBX/IO/HmacBlock.pm - version: '0.902' + version: '0.903' File::KDBX::Iterator: file: lib/File/KDBX/Iterator.pm - version: '0.902' + version: '0.903' File::KDBX::KDF: file: lib/File/KDBX/KDF.pm - version: '0.902' + version: '0.903' File::KDBX::KDF::AES: file: lib/File/KDBX/KDF/AES.pm - version: '0.902' + version: '0.903' File::KDBX::KDF::Argon2: file: lib/File/KDBX/KDF/Argon2.pm - version: '0.902' + version: '0.903' File::KDBX::Key: file: lib/File/KDBX/Key.pm - version: '0.902' + version: '0.903' File::KDBX::Key::ChallengeResponse: file: lib/File/KDBX/Key/ChallengeResponse.pm - version: '0.902' + version: '0.903' File::KDBX::Key::Composite: file: lib/File/KDBX/Key/Composite.pm - version: '0.902' + version: '0.903' File::KDBX::Key::File: file: lib/File/KDBX/Key/File.pm - version: '0.902' + version: '0.903' File::KDBX::Key::Password: file: lib/File/KDBX/Key/Password.pm - version: '0.902' + version: '0.903' File::KDBX::Key::YubiKey: file: lib/File/KDBX/Key/YubiKey.pm - version: '0.902' + version: '0.903' File::KDBX::Loader: file: lib/File/KDBX/Loader.pm - version: '0.902' + version: '0.903' File::KDBX::Loader::KDB: file: lib/File/KDBX/Loader/KDB.pm - version: '0.902' + version: '0.903' File::KDBX::Loader::Raw: file: lib/File/KDBX/Loader/Raw.pm - version: '0.902' + version: '0.903' File::KDBX::Loader::V3: file: lib/File/KDBX/Loader/V3.pm - version: '0.902' + version: '0.903' File::KDBX::Loader::V4: file: lib/File/KDBX/Loader/V4.pm - version: '0.902' + version: '0.903' File::KDBX::Loader::XML: file: lib/File/KDBX/Loader/XML.pm - version: '0.902' + version: '0.903' File::KDBX::Object: file: lib/File/KDBX/Object.pm - version: '0.902' + version: '0.903' File::KDBX::Safe: file: lib/File/KDBX/Safe.pm - version: '0.902' + version: '0.903' File::KDBX::Transaction: file: lib/File/KDBX/Transaction.pm - version: '0.902' + version: '0.903' File::KDBX::Util: file: lib/File/KDBX/Util.pm - version: '0.902' + version: '0.903' recommends: Compress::Raw::Zlib: '0' File::KDBX::XS: '0' @@ -187,7 +188,7 @@ requires: IPC::Cmd: '0.84' Iterator::Simple: '0' List::Util: '1.33' - Math::BigInt: '0' + Math::BigInt: '1.993' Module::Load: '0' Module::Loaded: '0' POSIX: '0' @@ -197,7 +198,7 @@ requires: Storable: '0' Symbol: '0' Text::ParseWords: '0' - Time::Piece: '0' + Time::Piece: '1.33' XML::LibXML: '0' XML::LibXML::Reader: '0' boolean: '0' @@ -210,7 +211,7 @@ resources: bugtracker: https://github.com/chazmcgarvey/File-KDBX/issues homepage: https://github.com/chazmcgarvey/File-KDBX repository: https://github.com/chazmcgarvey/File-KDBX.git -version: '0.902' +version: '0.903' x_authority: cpan:CCM x_generated_by_perl: v5.34.1 x_serialization_backend: 'YAML::Tiny version 1.73' diff --git a/Makefile.PL b/Makefile.PL index 9b13813..c80427f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -35,7 +35,7 @@ my %WriteMakefileArgs = ( "IPC::Cmd" => "0.84", "Iterator::Simple" => 0, "List::Util" => "1.33", - "Math::BigInt" => 0, + "Math::BigInt" => "1.993", "Module::Load" => 0, "Module::Loaded" => 0, "POSIX" => 0, @@ -45,7 +45,7 @@ my %WriteMakefileArgs = ( "Storable" => 0, "Symbol" => 0, "Text::ParseWords" => 0, - "Time::Piece" => 0, + "Time::Piece" => "1.33", "XML::LibXML" => 0, "XML::LibXML::Reader" => 0, "boolean" => 0, @@ -61,14 +61,15 @@ my %WriteMakefileArgs = ( "Getopt::Std" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, + "Math::BigInt" => "1.993", "Test::Deep" => 0, "Test::Fatal" => 0, - "Test::More" => 0, + "Test::More" => "1.001004_001", "Test::Warnings" => 0, "lib" => 0, "utf8" => 0 }, - "VERSION" => "0.902", + "VERSION" => "0.903", "test" => { "TESTS" => "t/*.t" } @@ -99,7 +100,7 @@ my %FallbackPrereqs = ( "IPC::Open3" => 0, "Iterator::Simple" => 0, "List::Util" => "1.33", - "Math::BigInt" => 0, + "Math::BigInt" => "1.993", "Module::Load" => 0, "Module::Loaded" => 0, "POSIX" => 0, @@ -110,10 +111,10 @@ my %FallbackPrereqs = ( "Symbol" => 0, "Test::Deep" => 0, "Test::Fatal" => 0, - "Test::More" => 0, + "Test::More" => "1.001004_001", "Test::Warnings" => 0, "Text::ParseWords" => 0, - "Time::Piece" => 0, + "Time::Piece" => "1.33", "XML::LibXML" => 0, "XML::LibXML::Reader" => 0, "boolean" => 0, diff --git a/README b/README index ec6508e..fac5d25 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME VERSION - version 0.902 + version 0.903 SYNOPSIS @@ -24,14 +24,13 @@ SYNOPSIS ); # Save the database to the filesystem - $kdbx->dump_file('passwords.kdbx', 'M@st3rP@ssw0rd!'); + $kdbx->dump_file('passwords.kdbx', 'masterpw changeme'); # Load the database from the filesystem into a new database instance - my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'M@st3rP@ssw0rd!'); + my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'masterpw changeme'); # Iterate over database entries, print entry titles - $kdbx2->entries->each(sub { - my ($entry) = @_; + $kdbx2->entries->each(sub($entry, @) { say 'Entry: ', $entry->title; }); @@ -999,8 +998,7 @@ RECIPES my $kdbx = File::KDBX->load_file('mypasswords.kdbx', 'master password CHANGEME'); $kdbx->unlock; # cause $entry->password below to be defined - $kdbx->entries->each(sub { - my ($entry) = @_; + $kdbx->entries->each(sub($entry, @) { say 'Found password for: ', $entry->title; say ' Username: ', $entry->username; say ' Password: ', $entry->password; diff --git a/lib/File/KDBX.pm b/lib/File/KDBX.pm index b628375..02073ed 100644 --- a/lib/File/KDBX.pm +++ b/lib/File/KDBX.pm @@ -16,11 +16,11 @@ use Hash::Util::FieldHash qw(fieldhashes); use List::Util qw(any first); use Ref::Util qw(is_ref is_arrayref is_plain_hashref); use Scalar::Util qw(blessed); -use Time::Piece; +use Time::Piece 1.33; use boolean; use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our $WARNINGS = 1; fieldhashes \my (%SAFE, %KEYS); @@ -1121,7 +1121,7 @@ File::KDBX - Encrypted database to store secret text and files =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS @@ -1141,14 +1141,13 @@ version 0.902 ); # Save the database to the filesystem - $kdbx->dump_file('passwords.kdbx', 'M@st3rP@ssw0rd!'); + $kdbx->dump_file('passwords.kdbx', 'masterpw changeme'); # Load the database from the filesystem into a new database instance - my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'M@st3rP@ssw0rd!'); + my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'masterpw changeme'); # Iterate over database entries, print entry titles - $kdbx2->entries->each(sub { - my ($entry) = @_; + $kdbx2->entries->each(sub($entry, @) { say 'Entry: ', $entry->title; }); @@ -2156,8 +2155,7 @@ You generally don't need to call this directly. The loader and dumper use it to my $kdbx = File::KDBX->load_file('mypasswords.kdbx', 'master password CHANGEME'); $kdbx->unlock; # cause $entry->password below to be defined - $kdbx->entries->each(sub { - my ($entry) = @_; + $kdbx->entries->each(sub($entry, @) { say 'Found password for: ', $entry->title; say ' Username: ', $entry->username; say ' Password: ', $entry->password; diff --git a/lib/File/KDBX/Cipher.pm b/lib/File/KDBX/Cipher.pm index 37bdb58..13e4757 100644 --- a/lib/File/KDBX/Cipher.pm +++ b/lib/File/KDBX/Cipher.pm @@ -12,7 +12,7 @@ use Module::Load; use Scalar::Util qw(looks_like_number); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION my %CIPHERS; @@ -158,7 +158,7 @@ File::KDBX::Cipher - A block cipher mode or cipher stream =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Cipher/CBC.pm b/lib/File/KDBX/Cipher/CBC.pm index 8f798de..81fa7af 100644 --- a/lib/File/KDBX/Cipher/CBC.pm +++ b/lib/File/KDBX/Cipher/CBC.pm @@ -11,7 +11,7 @@ use namespace::clean; extends 'File::KDBX::Cipher'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has key_size => 32; sub iv_size { 16 } @@ -63,7 +63,7 @@ File::KDBX::Cipher::CBC - A CBC block cipher mode encrypter/decrypter =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Cipher/Stream.pm b/lib/File/KDBX/Cipher/Stream.pm index b511200..f5072a9 100644 --- a/lib/File/KDBX/Cipher/Stream.pm +++ b/lib/File/KDBX/Cipher/Stream.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Cipher'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has 'counter', is => 'ro', default => 0; @@ -123,7 +123,7 @@ File::KDBX::Cipher::Stream - A cipher stream encrypter/decrypter =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Constants.pm b/lib/File/KDBX/Constants.pm index c7b31bd..c412653 100644 --- a/lib/File/KDBX/Constants.pm +++ b/lib/File/KDBX/Constants.pm @@ -15,7 +15,7 @@ use File::KDBX::Util qw(int64); use Scalar::Util qw(dualvar); use namespace::clean -except => 'import'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION BEGIN { my %CONSTANTS = ( @@ -348,7 +348,7 @@ File::KDBX::Constants - All the KDBX-related constants you could ever want =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS @@ -553,7 +553,7 @@ Constants related to identifying the compression state of a file: =head2 :cipher -Constants related ciphers: +Constants related to ciphers: =over 4 diff --git a/lib/File/KDBX/Dumper.pm b/lib/File/KDBX/Dumper.pm index c73ddcf..d300a02 100644 --- a/lib/File/KDBX/Dumper.pm +++ b/lib/File/KDBX/Dumper.pm @@ -15,7 +15,7 @@ use Ref::Util qw(is_ref is_scalarref); use Scalar::Util qw(looks_like_number openhandle); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub new { @@ -287,7 +287,7 @@ File::KDBX::Dumper - Write KDBX files =head1 VERSION -version 0.902 +version 0.903 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Dumper/KDB.pm b/lib/File/KDBX/Dumper/KDB.pm index ea0db6f..eceef18 100644 --- a/lib/File/KDBX/Dumper/KDB.pm +++ b/lib/File/KDBX/Dumper/KDB.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _write_magic_numbers { '' } sub _write_headers { '' } @@ -136,7 +136,7 @@ File::KDBX::Dumper::KDB - Write KDB files =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Dumper/Raw.pm b/lib/File/KDBX/Dumper/Raw.pm index 70aa0c6..50f4923 100644 --- a/lib/File/KDBX/Dumper/Raw.pm +++ b/lib/File/KDBX/Dumper/Raw.pm @@ -9,7 +9,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _dump { my $self = shift; @@ -48,7 +48,7 @@ File::KDBX::Dumper::Raw - A no-op dumper that dumps content as-is =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Dumper/V3.pm b/lib/File/KDBX/Dumper/V3.pm index f06db6b..d8246a0 100644 --- a/lib/File/KDBX/Dumper/V3.pm +++ b/lib/File/KDBX/Dumper/V3.pm @@ -16,7 +16,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _write_headers { my $self = shift; @@ -187,7 +187,7 @@ File::KDBX::Dumper::V3 - Dump KDBX3 files =head1 VERSION -version 0.902 +version 0.903 =head1 BUGS diff --git a/lib/File/KDBX/Dumper/V4.pm b/lib/File/KDBX/Dumper/V4.pm index 0dec651..723b20d 100644 --- a/lib/File/KDBX/Dumper/V4.pm +++ b/lib/File/KDBX/Dumper/V4.pm @@ -19,7 +19,7 @@ use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has _binaries_written => {}, is => 'ro'; @@ -374,7 +374,7 @@ File::KDBX::Dumper::V4 - Dump KDBX4 files =head1 VERSION -version 0.902 +version 0.903 =head1 BUGS diff --git a/lib/File/KDBX/Dumper/XML.pm b/lib/File/KDBX/Dumper/XML.pm index ebf6795..cc31cd1 100644 --- a/lib/File/KDBX/Dumper/XML.pm +++ b/lib/File/KDBX/Dumper/XML.pm @@ -12,14 +12,14 @@ use File::KDBX::Error; use File::KDBX::Util qw(:class :int erase_scoped gzip snakify); use IO::Handle; use Scalar::Util qw(blessed isdual looks_like_number); -use Time::Piece; +use Time::Piece 1.33; use XML::LibXML; use boolean; use namespace::clean; extends 'File::KDBX::Dumper'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has allow_protection => 1; @@ -563,7 +563,7 @@ File::KDBX::Dumper::XML - Dump unencrypted XML KeePass files =head1 VERSION -version 0.902 +version 0.903 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Entry.pm b/lib/File/KDBX/Entry.pm index df8cf4d..4d667cb 100644 --- a/lib/File/KDBX/Entry.pm +++ b/lib/File/KDBX/Entry.pm @@ -15,13 +15,13 @@ use List::Util qw(first sum0); use Ref::Util qw(is_coderef is_hashref is_plain_hashref); use Scalar::Util qw(blessed looks_like_number); use Storable qw(dclone); -use Time::Piece; +use Time::Piece 1.33; use boolean; use namespace::clean; extends 'File::KDBX::Object'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION my $PLACEHOLDER_MAX_DEPTH = 10; my %PLACEHOLDERS; @@ -681,7 +681,7 @@ File::KDBX::Entry - A KDBX database entry =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Error.pm b/lib/File/KDBX/Error.pm index ae02c5f..7181c77 100644 --- a/lib/File/KDBX/Error.pm +++ b/lib/File/KDBX/Error.pm @@ -9,7 +9,7 @@ use Exporter qw(import); use Scalar::Util qw(blessed looks_like_number); use namespace::clean -except => 'import'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our @EXPORT = qw(alert error throw); @@ -167,7 +167,7 @@ File::KDBX::Error - Represents something bad that happened =head1 VERSION -version 0.902 +version 0.903 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Group.pm b/lib/File/KDBX/Group.pm index cf24d71..9b8c8bf 100644 --- a/lib/File/KDBX/Group.pm +++ b/lib/File/KDBX/Group.pm @@ -13,13 +13,13 @@ use Hash::Util::FieldHash; use List::Util qw(any sum0); use Ref::Util qw(is_coderef is_ref); use Scalar::Util qw(blessed); -use Time::Piece; +use Time::Piece 1.33; use boolean; use namespace::clean; extends 'File::KDBX::Object'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION # has uuid => sub { generate_uuid(printable => 1) }; @@ -398,7 +398,7 @@ File::KDBX::Group - A KDBX database group =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO.pm b/lib/File/KDBX/IO.pm index 135820e..ef14245 100644 --- a/lib/File/KDBX/IO.pm +++ b/lib/File/KDBX/IO.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'IO::Handle'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _croak { require Carp; goto &Carp::croak } @@ -390,7 +390,7 @@ File::KDBX::IO - Base IO class for KDBX-related streams =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO/Crypt.pm b/lib/File/KDBX/IO/Crypt.pm index 7675776..e3ef400 100644 --- a/lib/File/KDBX/IO/Crypt.pm +++ b/lib/File/KDBX/IO/Crypt.pm @@ -11,7 +11,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our $BUFFER_SIZE = 16384; our $ERROR; @@ -139,7 +139,7 @@ File::KDBX::IO::Crypt - Encrypter/decrypter IO handle =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/IO/HashBlock.pm b/lib/File/KDBX/IO/HashBlock.pm index 2d83249..f3b5757 100644 --- a/lib/File/KDBX/IO/HashBlock.pm +++ b/lib/File/KDBX/IO/HashBlock.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our $ALGORITHM = 'SHA256'; our $BLOCK_SIZE = 1048576; # 1MiB our $ERROR; @@ -208,7 +208,7 @@ File::KDBX::IO::HashBlock - Hash block stream IO handle =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/IO/HmacBlock.pm b/lib/File/KDBX/IO/HmacBlock.pm index e14100e..be4902d 100644 --- a/lib/File/KDBX/IO/HmacBlock.pm +++ b/lib/File/KDBX/IO/HmacBlock.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::IO'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our $BLOCK_SIZE = 1048576; # 1MiB our $ERROR; @@ -212,7 +212,7 @@ File::KDBX::IO::HmacBlock - HMAC block stream IO handle =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Iterator.pm b/lib/File/KDBX/Iterator.pm index b5d0b91..e6b5665 100644 --- a/lib/File/KDBX/Iterator.pm +++ b/lib/File/KDBX/Iterator.pm @@ -14,7 +14,7 @@ use namespace::clean; BEGIN { mark_as_loaded('Iterator::Simple::Iterator') } extends 'Iterator::Simple::Iterator'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub new { @@ -221,7 +221,7 @@ File::KDBX::Iterator - KDBX database iterator =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS @@ -239,7 +239,7 @@ version 0.902 A buffered iterator compatible with and expanding upon L, this provides an easy way to navigate a L database. The documentation for B documents functions and methods -supported but this iterator that are not documented here, so consider that additional reading. +supported by this iterator that are not documented here, so consider that additional reading. =head2 Buffer @@ -330,6 +330,7 @@ B This method drains the iterator completely, leaving it empty. See Lgrep(\&query); + \&iterator = $iterator->grep(sub($item) { ... }); Get a new iterator draining from an existing iterator but providing only items that pass a test or are matched by a query. In its basic form this method is very much like perl's built-in grep function, except for @@ -410,7 +411,7 @@ Alias for L. Get a new iterator draining from an existing iterator but providing only a limited number of items. -C as an alias for L<< Iterator::Simple/"$iterator->head($count)" >>. +C is an alias for L<< Iterator::Simple/"$iterator->head($count)" >>. =head2 to_array @@ -442,6 +443,9 @@ B lists which are always finite -- unless you do something weird lik its own ancestor -- but I'm noting it here as a potential issue if you use this iterator class for other things (which you probably shouldn't do). +KDBX databases are always fully-loaded into memory anyway, so there's not a significant memory cost to +draining an iterator completely. + =head1 BUGS Please report any bugs or feature requests on the bugtracker website diff --git a/lib/File/KDBX/KDF.pm b/lib/File/KDBX/KDF.pm index 1cf335d..4520fb5 100644 --- a/lib/File/KDBX/KDF.pm +++ b/lib/File/KDBX/KDF.pm @@ -12,7 +12,7 @@ use Module::Load; use Scalar::Util qw(blessed); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION my %KDFS; @@ -120,7 +120,7 @@ File::KDBX::KDF - A key derivation function =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/KDF/AES.pm b/lib/File/KDBX/KDF/AES.pm index d86ce48..206bc13 100644 --- a/lib/File/KDBX/KDF/AES.pm +++ b/lib/File/KDBX/KDF/AES.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::KDF'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION # Rounds higher than this are eligible for forking: my $FORK_OPTIMIZATION_THRESHOLD = 100_000; @@ -111,7 +111,7 @@ File::KDBX::KDF::AES - Using the AES cipher as a key derivation function =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/KDF/Argon2.pm b/lib/File/KDBX/KDF/Argon2.pm index 9f88f74..4e7889b 100644 --- a/lib/File/KDBX/KDF/Argon2.pm +++ b/lib/File/KDBX/KDF/Argon2.pm @@ -12,7 +12,7 @@ use namespace::clean; extends 'File::KDBX::KDF'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub salt { $_[0]->{+KDF_PARAM_ARGON2_SALT} or throw 'Salt is not set' } @@ -69,7 +69,7 @@ File::KDBX::KDF::Argon2 - The Argon2 family of key derivation functions =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Key.pm b/lib/File/KDBX/Key.pm index 1fa09f6..c790570 100644 --- a/lib/File/KDBX/Key.pm +++ b/lib/File/KDBX/Key.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_coderef is_hashref is_ref is_scalarref); use Scalar::Util qw(blessed openhandle); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION fieldhashes \my %SAFE; @@ -140,7 +140,7 @@ File::KDBX::Key - A credential that can protect a KDBX file =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Key/ChallengeResponse.pm b/lib/File/KDBX/Key/ChallengeResponse.pm index 74555f4..0e53369 100644 --- a/lib/File/KDBX/Key/ChallengeResponse.pm +++ b/lib/File/KDBX/Key/ChallengeResponse.pm @@ -10,7 +10,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub init { my $self = shift; @@ -56,7 +56,7 @@ File::KDBX::Key::ChallengeResponse - A challenge-response key =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/Composite.pm b/lib/File/KDBX/Key/Composite.pm index fcaef54..39253fa 100644 --- a/lib/File/KDBX/Key/Composite.pm +++ b/lib/File/KDBX/Key/Composite.pm @@ -13,7 +13,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub init { my $self = shift; @@ -92,7 +92,7 @@ File::KDBX::Key::Composite - A composite key made up of component keys =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/File.pm b/lib/File/KDBX/Key/File.pm index 10b57d4..32b27ad 100644 --- a/lib/File/KDBX/Key/File.pm +++ b/lib/File/KDBX/Key/File.pm @@ -17,7 +17,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has 'type', is => 'ro'; @@ -262,7 +262,7 @@ File::KDBX::Key::File - A file key =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/Password.pm b/lib/File/KDBX/Key/Password.pm index ba2809d..9dac813 100644 --- a/lib/File/KDBX/Key/Password.pm +++ b/lib/File/KDBX/Key/Password.pm @@ -12,7 +12,7 @@ use namespace::clean; extends 'File::KDBX::Key'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub init { my $self = shift; @@ -37,7 +37,7 @@ File::KDBX::Key::Password - A password key =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Key/YubiKey.pm b/lib/File/KDBX/Key/YubiKey.pm index d55cdaf..86337b4 100644 --- a/lib/File/KDBX/Key/YubiKey.pm +++ b/lib/File/KDBX/Key/YubiKey.pm @@ -14,7 +14,7 @@ use namespace::clean; extends 'File::KDBX::Key::ChallengeResponse'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION # It can take some time for the USB device to be ready again, so we can retry a few times. our $RETRY_COUNT = 5; @@ -296,7 +296,7 @@ File::KDBX::Key::YubiKey - A Yubico challenge-response key =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Loader.pm b/lib/File/KDBX/Loader.pm index 727f4c6..504fee7 100644 --- a/lib/File/KDBX/Loader.pm +++ b/lib/File/KDBX/Loader.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_ref is_scalarref); use Scalar::Util qw(looks_like_number openhandle); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub new { @@ -249,7 +249,7 @@ File::KDBX::Loader - Load KDBX files =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Loader/KDB.pm b/lib/File/KDBX/Loader/KDB.pm index 1edccb2..82ec7f1 100644 --- a/lib/File/KDBX/Loader/KDB.pm +++ b/lib/File/KDBX/Loader/KDB.pm @@ -11,15 +11,15 @@ use File::KDBX::Util qw(:class :empty :io :uuid load_optional); use File::KDBX; use Ref::Util qw(is_arrayref is_hashref); use Scalar::Util qw(looks_like_number); -use Time::Piece; +use Time::Piece 1.33; use boolean; use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION -my $DEFAULT_EXPIRATION = Time::Piece->new(32503677839); # 2999-12-31 23:59:59 +my $DEFAULT_EXPIRATION = Time::Piece->strptime('2999-12-31 23:59:59', '%Y-%m-%d %H:%M:%S'); sub _read_headers { '' } @@ -397,7 +397,7 @@ File::KDBX::Loader::KDB - Read KDB files =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Loader/Raw.pm b/lib/File/KDBX/Loader/Raw.pm index 0352c62..d88e29f 100644 --- a/lib/File/KDBX/Loader/Raw.pm +++ b/lib/File/KDBX/Loader/Raw.pm @@ -9,7 +9,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _read { my $self = shift; @@ -47,7 +47,7 @@ File::KDBX::Loader::Raw - A no-op loader that doesn't do any parsing =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Loader/V3.pm b/lib/File/KDBX/Loader/V3.pm index 1d42365..0990bff 100644 --- a/lib/File/KDBX/Loader/V3.pm +++ b/lib/File/KDBX/Loader/V3.pm @@ -27,7 +27,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _read_header { my $self = shift; @@ -174,7 +174,7 @@ File::KDBX::Loader::V3 - Load KDBX3 files =head1 VERSION -version 0.902 +version 0.903 =head1 BUGS diff --git a/lib/File/KDBX/Loader/V4.pm b/lib/File/KDBX/Loader/V4.pm index 8f73e42..0e011f0 100644 --- a/lib/File/KDBX/Loader/V4.pm +++ b/lib/File/KDBX/Loader/V4.pm @@ -30,7 +30,7 @@ use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub _read_header { my $self = shift; @@ -273,7 +273,7 @@ File::KDBX::Loader::V4 - Load KDBX4 files =head1 VERSION -version 0.902 +version 0.903 =head1 BUGS diff --git a/lib/File/KDBX/Loader/XML.pm b/lib/File/KDBX/Loader/XML.pm index 412de23..a5fff50 100644 --- a/lib/File/KDBX/Loader/XML.pm +++ b/lib/File/KDBX/Loader/XML.pm @@ -11,14 +11,14 @@ use File::KDBX::Error; use File::KDBX::Safe; use File::KDBX::Util qw(:class :int :text gunzip erase_scoped); use Scalar::Util qw(looks_like_number); -use Time::Piece; +use Time::Piece 1.33; use XML::LibXML::Reader; use boolean; use namespace::clean; extends 'File::KDBX::Loader'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION has '_reader', is => 'ro'; has '_safe', is => 'ro', default => sub { File::KDBX::Safe->new(cipher => $_[0]->kdbx->random_stream) }; @@ -496,7 +496,7 @@ sub _read_xml_content { my $decoded = eval { _decode_primitive($content, $type) }; if (my $err = $@) { ref $err and $err->details(node => $reader->nodePath, line => $reader->lineNumber); - throw $err + throw $err; } return $decoded; @@ -536,10 +536,9 @@ sub _decode_datetime { $binary .= \0 x (8 - length($binary)) if length($binary) < 8; my ($seconds_since_ad1) = unpack_Ql($binary); my $epoch = $seconds_since_ad1 - TIME_SECONDS_AD1_TO_UNIX_EPOCH; - return Time::Piece->new($epoch); + return gmtime($epoch); } - my $dt = eval { Time::Piece->strptime($_, '%Y-%m-%dT%H:%M:%SZ') }; if (my $err = $@) { throw 'Failed to parse datetime', text => $_, error => $err; @@ -590,7 +589,7 @@ File::KDBX::Loader::XML - Load unencrypted XML KeePass files =head1 VERSION -version 0.902 +version 0.903 =head1 BUGS diff --git a/lib/File/KDBX/Object.pm b/lib/File/KDBX/Object.pm index 33d1e03..50ad02b 100644 --- a/lib/File/KDBX/Object.pm +++ b/lib/File/KDBX/Object.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_plain_arrayref is_plain_hashref is_ref); use Scalar::Util qw(blessed weaken); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION fieldhashes \my (%KDBX, %PARENT, %TXNS, %REFS, %SIGNALS); @@ -526,7 +526,7 @@ File::KDBX::Object - A KDBX database object =head1 VERSION -version 0.902 +version 0.903 =head1 DESCRIPTION diff --git a/lib/File/KDBX/Safe.pm b/lib/File/KDBX/Safe.pm index 4052404..a8ec2b3 100644 --- a/lib/File/KDBX/Safe.pm +++ b/lib/File/KDBX/Safe.pm @@ -14,7 +14,7 @@ use Ref::Util qw(is_arrayref is_coderef is_hashref is_scalarref); use Scalar::Util qw(refaddr); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub new { @@ -217,7 +217,7 @@ File::KDBX::Safe - Keep strings encrypted while in memory =head1 VERSION -version 0.902 +version 0.903 =head1 SYNOPSIS diff --git a/lib/File/KDBX/Transaction.pm b/lib/File/KDBX/Transaction.pm index d71863c..3d852fb 100644 --- a/lib/File/KDBX/Transaction.pm +++ b/lib/File/KDBX/Transaction.pm @@ -8,7 +8,7 @@ use Devel::GlobalDestruction; use File::KDBX::Util qw(:class); use namespace::clean; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION sub new { @@ -59,7 +59,7 @@ File::KDBX::Transaction - Make multiple database edits atomically =head1 VERSION -version 0.902 +version 0.903 =head1 ATTRIBUTES diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 57e0e18..9557b7d 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -13,11 +13,11 @@ use List::Util 1.33 qw(any all); use Module::Load; use Ref::Util qw(is_arrayref is_coderef is_hashref is_ref is_refref is_scalarref); use Scalar::Util qw(blessed looks_like_number readonly); -use Time::Piece; +use Time::Piece 1.33; use boolean; use namespace::clean -except => 'import'; -our $VERSION = '0.902'; # VERSION +our $VERSION = '0.903'; # VERSION our %EXPORT_TAGS = ( assert => [qw(DEBUG assert)], @@ -422,6 +422,7 @@ sub pack_Ql { require Config; if ($Config::Config{ivsize} < 8) { if (blessed $num && $num->can('as_hex')) { + require Math::BigInt; return "\xff\xff\xff\xff\xff\xff\xff\xff" if Math::BigInt->new('18446744073709551615') <= $num; return "\x00\x00\x00\x00\x00\x00\x00\x80" if $num <= Math::BigInt->new('-9223372036854775808'); my $neg; @@ -869,7 +870,7 @@ File::KDBX::Util - Utility functions for working with KDBX files =head1 VERSION -version 0.902 +version 0.903 =head1 FUNCTIONS diff --git a/t/00-report-prereqs.dd b/t/00-report-prereqs.dd index 3979100..9256fc0 100644 --- a/t/00-report-prereqs.dd +++ b/t/00-report-prereqs.dd @@ -61,7 +61,7 @@ do { my $x = { 'IPC::Cmd' => '0.84', 'Iterator::Simple' => '0', 'List::Util' => '1.33', - 'Math::BigInt' => '0', + 'Math::BigInt' => '1.993', 'Module::Load' => '0', 'Module::Loaded' => '0', 'POSIX' => '0', @@ -71,7 +71,7 @@ do { my $x = { 'Storable' => '0', 'Symbol' => '0', 'Text::ParseWords' => '0', - 'Time::Piece' => '0', + 'Time::Piece' => '1.33', 'XML::LibXML' => '0', 'XML::LibXML::Reader' => '0', 'boolean' => '0', @@ -94,9 +94,10 @@ do { my $x = { 'Getopt::Std' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', + 'Math::BigInt' => '1.993', 'Test::Deep' => '0', 'Test::Fatal' => '0', - 'Test::More' => '0', + 'Test::More' => '1.001004_001', 'Test::Warnings' => '0', 'lib' => '0', 'utf8' => '0' diff --git a/t/crypt.t b/t/crypt.t index c003a5f..69a52ef 100644 --- a/t/crypt.t +++ b/t/crypt.t @@ -15,6 +15,7 @@ use Test::More; subtest 'Round-trip block stream' => sub { plan tests => 3; + my $block_cipher = File::KDBX::Cipher->new(uuid => CIPHER_UUID_AES256, key => 0x01 x 32, iv => 0x01 x 16); test_roundtrip($block_cipher, 'Smell the pretty flowers.', @@ -24,6 +25,7 @@ subtest 'Round-trip block stream' => sub { subtest 'Round-trip cipher stream' => sub { plan tests => 3; + my $cipher_stream = File::KDBX::Cipher->new(stream_id => 2, key => 0x01 x 16); test_roundtrip($cipher_stream, 'Smell the pretty flowers.', diff --git a/t/database.t b/t/database.t index 94e1ea8..997d04c 100644 --- a/t/database.t +++ b/t/database.t @@ -11,7 +11,7 @@ use TestCommon; use File::KDBX; use File::Temp qw(tempfile); use Test::Deep; -use Test::More; +use Test::More 1.001004_001; use Time::Piece; subtest 'Create a new database' => sub { @@ -49,7 +49,7 @@ subtest 'Clone' => sub { my @objects = $copy->objects->each; subtest 'Cloned objects refer to the cloned database' => sub { plan tests => scalar @_; - for my $object (@objects) { + for my $object (@_) { my $object_kdbx = eval { $object->kdbx }; is $object_kdbx, $copy, 'Object: ' . $object->label; } diff --git a/t/kdb.t b/t/kdb.t index 02927e8..ccaeda3 100644 --- a/t/kdb.t +++ b/t/kdb.t @@ -9,7 +9,7 @@ use TestCommon; use Encode qw(decode); use File::KDBX; use Test::Deep; -use Test::More; +use Test::More 1.001004_001; eval { require File::KeePass; require File::KeePass::KDBX } or plan skip_all => 'File::KeePass and File::KeePass::KDBX required to test KDB files'; diff --git a/t/kdbx4.t b/t/kdbx4.t index 5afceeb..ff48700 100644 --- a/t/kdbx4.t +++ b/t/kdbx4.t @@ -10,7 +10,7 @@ use TestCommon; use File::KDBX; use File::KDBX::Constants qw(:version :kdf); use Test::Deep; -use Test::More; +use Test::More 1.001004_001; use boolean qw(:all); subtest 'Verify Format400' => sub { @@ -111,7 +111,7 @@ subtest 'KDBX4.1 upgrade' => sub { is $kdbx->minimum_version, KDBX_VERSION_4_1, 'Icon with name requires upgrade'; $kdbx->remove_custom_icon($icon_uuid); is $kdbx->minimum_version, KDBX_VERSION_3_1, 'Reset upgrade requirement'; - $icon_uuid = $kdbx->add_custom_icon('data2', last_modification_time => gmtime); + $icon_uuid = $kdbx->add_custom_icon('data2', last_modification_time => scalar gmtime); is $kdbx->minimum_version, KDBX_VERSION_4_1, 'Icon with modtime requires upgrade'; $kdbx->remove_custom_icon($icon_uuid); is $kdbx->minimum_version, KDBX_VERSION_3_1, 'Reset upgrade requirement'; diff --git a/t/keys.t b/t/keys.t index 601260c..0bcf4dc 100644 --- a/t/keys.t +++ b/t/keys.t @@ -10,7 +10,7 @@ use Crypt::Misc 0.029 qw(decode_b64 encode_b64); use File::KDBX::Constants qw(:key_file); use File::KDBX::Key; use File::Temp qw(tempfile); -use Test::More; +use Test::More 1.001004_001; subtest 'Primitives' => sub { my $pkey = File::KDBX::Key->new('password'); diff --git a/t/memory-protection.t b/t/memory-protection.t index 328e28c..5ca4079 100644 --- a/t/memory-protection.t +++ b/t/memory-protection.t @@ -17,7 +17,7 @@ use List::Util qw(max); use POSIX (); use Scalar::Util qw(looks_like_number); use Scope::Guard; -use Test::More; +use Test::More 1.001004_001; BEGIN { if (!$ENV{AUTHOR_TESTING}) { diff --git a/t/util.t b/t/util.t index a785b2f..45fbbe2 100644 --- a/t/util.t +++ b/t/util.t @@ -7,7 +7,7 @@ use lib 't/lib'; use TestCommon; use File::KDBX::Util qw(:all); -use Math::BigInt; +use Math::BigInt 1.993; use Scalar::Util qw(blessed); use Test::More;