GNU extensions to read_s2k for GnuTLS 2.4.x

Daniel Kahn Gillmor dkg-debian.org at fifthhorseman.net
Fri Aug 22 17:30:23 CEST 2008


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.

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 test doesn't do anything fancier than verify that the key can be
successfully imported.

Regards,

        --dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp_gnu-dummy_extension.c
Type: text/x-csrc
Size: 3691 bytes
Desc: test to verify parsing of GNU-dummy S2K extension
URL: </pipermail/attachments/20080822/ddfe6573/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 826 bytes
Desc: not available
URL: </pipermail/attachments/20080822/ddfe6573/attachment.pgp>


More information about the Gnutls-devel mailing list