GNU extensions to read_s2k for GnuTLS 2.4.x
Simon Josefsson
simon at josefsson.org
Mon Sep 1 18:59:46 CEST 2008
Daniel Kahn Gillmor <dkg-debian.org at fifthhorseman.net> writes:
> On Fri 2008-08-22 08:45:35 -0400, Simon Josefsson wrote:
>
>> Daniel, it would be excellent if you could implement a small self-test
>> of the functionality using that dummy private key, to be placed in
>> tests/. It should use the public gnutls interfaces, not the direct
>> opencdk interfaces. For inspiration, look at for example
>> tests/certificate_set_x509_crl.c.
>
> Attached is such a test. On a system running 2.4.1 without the
> patches, it gives me rc -59 on the gnutls_openpgp_privkey_import.
> With a patched GnuTLS, it exits cleanly:
>
> 0 vulcan:~# ./openpgp_gnu-dummy_extension
> gnutls_openpgp_privkey_import rc -59: GnuTLS internal error.
> 1 vulcan:~# dpkg --install ~dkg/src/gnutls/tmp.rLUgIlxWJV/libgnutls26_2.4.1-1.s2kext1_amd64.deb
> (Reading database ... 22502 files and directories currently installed.)
> Preparing to replace libgnutls26 2.4.1-1 (using .../libgnutls26_2.4.1-1.s2kext1_amd64.deb) ...
> Unpacking replacement libgnutls26 ...
> Setting up libgnutls26 (2.4.1-1.s2kext1) ...
> 0 vulcan:~# ./openpgp_gnu-dummy_extension
> 0 vulcan:~#
>
> I see no reason why the same shouldn't be a valid test for the 2.5.x
> series.
Neat! Please push it.
> There are too many Makefiles in my git tests/ directory (and i assume
> that some of them are generated from others -- why are they all in the
> git repo? i'm confused.) for me to know where/how to properly include
> this in the actual tests that get run. I'll watch the git repo
> changes to see how it's done if this gets added for future reference,
> though.
The Makefile's are not stored in git, they are generated by
autoconf/automake. To add a new self-test, you only modify
tests/Makefile.am. Add the name of your self test next to the others.
And a NEWS entry. :)
Btw, please chose a shorter filename for the tests, like pgps2kgnu.c
instead.
Thanks,
Simon
More information about the Gnutls-devel
mailing list