Skip Menu |
 

This queue is for tickets about the XML-Sig CPAN distribution.

Report information
The Basics
Id: 84833
Status: open
Priority: 0/
Queue: XML-Sig

People
Owner: Nobody in particular
Requestors: DELTOMBE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: bug at verifying XML sig with X509 RSA private key
Download (untitled) / with headers
text/plain 1.2k
Hello, I tried to install XML::Sig and got an error at make test : /tmp/XML-Sig-0.22$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/001_load.t ......... ok t/002_xmlsec.t ....... ok t/003_params.t ....... ok t/004_keyhandling.t .. ok t/005_rsakeys.t ...... ok t/006_signing.t ...... 1/13 RSA.xs:178: OpenSSL error: bad base64 decode at blib/lib/Crypt/OpenSSL/RSA.pm (autosplit into blib/lib/auto/Crypt/OpenSSL/RSA/new_public_key.al) line 91. # Looks like you planned 13 tests but ran 6. # Looks like your test exited with 2 just after 6. t/006_signing.t ...... Dubious, test returned 2 (wstat 512, 0x200) Failed 7/13 subtests Test Summary Report ------------------- t/006_signing.t (Wstat: 512 Tests: 6 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 13 tests but ran 6. Files=6, Tests=27, 1 wallclock secs ( 0.03 usr 0.02 sys + 0.68 cusr 0.06 csys = 0.79 CPU) Result: FAIL Failed 1/6 test programs. 0/27 subtests failed. make: *** [test_dynamic] Erreur 2 But it seems to work fine by commenting the 7th test and the previous line in t/006_signing.t. So, I guess signing works fine with X509 RSA private key, but not verifying signatures. Or maybe I missed sthg ? Regards.
Download (untitled) / with headers
text/plain 599b
The following patch fixes this bug: diff -ru XML-Sig-0.22/lib/XML/Sig.pm XML-Sig-0.22_patched/lib/XML/Sig.pm --- XML-Sig-0.22/lib/XML/Sig.pm 2009-12-08 18:57:08.000000000 +0100 +++ XML-Sig-0.22_patched/lib/XML/Sig.pm 2015-02-23 09:17:14.310007000 +0100 @@ -188,7 +188,7 @@ sub _clean_x509 { my $self = shift; my ($cert) = @_; - $cert =~ s/\n//g; + #$cert =~ s/\n//g; ###BEWARE OpenSSL needs these newlines, otherwise the key is refused # my $n = 64; # $n is group size. # my @parts = unpack "a$n" x ((length($cert)/$n)-0) . "a*", $cert; # $cert = join("\n",@parts);


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.