Commit Graph

18 Commits

Author SHA1 Message Date
git@daemon.de
0820428be8 forgot pack() format string to change to H* as well 2013-06-17 12:07:50 +02:00
git@daemon.de
f3be7877ff forgot to change the uuid field pack format 2013-06-17 12:03:28 +02:00
git@daemon.de
d8365f915b the unpack() formatstring for the uuid (field 0x01) "L<4" didn't
return a hex string, but a number only, which is fine for most
        cases, but isn't a correct Data::UUID representation. Changed back
        to "H*".
2013-06-17 11:51:13 +02:00
git@daemon.de
fca71efd62 fixed pack/unpack formats to use strictly little-endian values as required
by database format
2012-11-27 17:41:49 +01:00
git@daemon.de
37b3bf567d 1.07 2012-11-20 09:34:41 +01:00
Marcin Kasperski
83754a4a07 some test files were not cleaned after the tests 2012-11-19 21:55:09 +01:00
Marcin Kasperski
65856ec811 Attempts to install module on the system on which Bytes::Random::Secure
was installed ended up with:

Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/run.t .. 1/?
#   Failed test 'open a pwsafe3 database'
#   at t/run.t line 36.

#   Failed test 'read a pwsafe3 database and change a record (Undefined subroutine &Crypt::PWSafe3::random_bytes called at /home/marcink/.cpan/build/Crypt-PWSafe3-1.06-qScJdO/blib/lib/Crypt/PWSafe3.pm line 56.
# )'
#   at t/run.t line 66.

(and more such errors).
2012-11-19 21:50:24 +01:00
git@daemon.de
3d80bb1608 made Bytes::Random::Secure optional, version++ 2012-11-19 11:57:15 +01:00
Marcin Kasperski
cda77bea88 Added deleterecord method and test for it.
Note: I am not sure about return value. Currently I return "did I delete
sth flag", alternatively one could return deleted record, or even croak
if record was not there.
2012-11-18 01:34:38 +01:00
Marcin Kasperski
3bbb724b08 (needs careful review)
Attempt to improve performance.

Previous implementation happened to be very slow (on my laptop it took 5
minutes to read small pwsafe file and save it back). I profiled the code
and it turned out, this cost was totally dominated by the
Crypt::PWSafe3::random function (which on every call accesses system
random seed).

I replaced it with Bytes::Random::Secure which seeds using OS crypto but
afterwards uses embedded generator. Performance improvement is drastical,
the same read&save takes about half a second on the same laptop.
2012-11-18 00:46:34 +01:00
Marcin Kasperski
aacfeeb474 (needs review)
Resolved problem with warnings
Use of uninitialized value within %map2name in hash element at /usr/local/share/perl/5.14.2/Crypt/PWSafe3/Record.pm line 140.
occuring on true PasswordSafe file.

I am not sure whether this could cause some data to be dropped, but the fix seems consistent with the other code.
2012-11-18 00:38:10 +01:00
git@daemon.de
9b0a3db439 nix 2012-11-15 10:53:00 +01:00
TLINDEN
e5a80d508a 1.04 => 1.05 2012-11-15 10:49:26 +01:00
Marcin Kasperski
fc4192f9c8 Cleaning up after tests (removing all those .out files) 2012-11-15 09:26:18 +01:00
Marcin Kasperski
dc40f820d9 Patching previous path (File::Copy::move is even more suitable for the task, than cp+unlink, works efficiently if temp is on the same drive and reverts to cp+unlink otherwise). 2012-11-15 09:25:59 +01:00
Marcin Kasperski
5568a6cc1e Switching from shell cp to File::Copy. It:
- is slightly faster (no subprocess)

- makes it possible to use Crypt::PWSafe3 under perl -T (taint mode)
  { older version generated errors Insecure $ENV{PATH} while running with -T switch }

- should resolve problems with running and testing on Windows
  (http://www.cpantesters.org/cpan/report/5be028b2-d2ec-11e1-853f-cec147eb5e0d
   http://www.cpantesters.org/cpan/report/ea8cb70f-6e9c-1014-b601-c7411ede6b02
   http://www.cpantesters.org/cpan/report/2dd017ec-6c05-1014-a000-7353ce65dec9 )
2012-11-15 09:18:27 +01:00
TLINDEN
4cf8fe6eb9 fixed rt.cpan.org#75145. rt.cpan.org#75146. 2012-07-20 13:40:43 +02:00
TLINDEN
5c28e1f954 first commit 2012-07-20 12:58:07 +02:00