[gnutls-help] openpgp and gnutls_privkey_import_openpgp

Petr Vanek petr at yarpen.cz
Fri May 31 11:31:19 CEST 2013


On 05/31/2013 10:44 AM, Nikos Mavrogiannopoulos wrote:
> On Thu, May 30, 2013 at 3:16 PM, Petr Vanek <petr at yarpen.cz> wrote:
>> hi all,
>> what is proper use of gnutls_privkey_import_openpgp, please?
>> I have a playground application to examine gnutls as a potential backend
>> for new Qore language module and I'm getting crashes in nettle when I
>> try to decrypt data.
> It seems that you triggered a bug on deinitialization of parameters.
> The attached patch should fix the crash, but will not make your use
> case work. The crash happens prior to error reporting because for some
> reason no keys could be extracted from the openpgp key you specified
> (what kind of key was that?).

it's a testing key generated by gpg itself. Pub and priv ASCII exports
attached (it's safe it's really testing only key).
Is there any way how to verify the key, please?

Anyway - thanks for crash fix. Now I'm getting GNUTLS_E_INVALID_REQUEST
error.

LOG> 2: ASSERT: privkey.c:1220
LOG> 9: Decrypting using master PGP key
LOG> 2: ASSERT: privkey.c:1220
LOG> 2: ASSERT: pubkey.c:287
LOG> 2: ASSERT: pgp.c:1181
LOG> 2: ASSERT: privkey.c:812
LOG> 2: ASSERT: privkey.c:1425
test_decrypt(303): -50 GNUTLS_E_INVALID_REQUEST = The request is invalid.
ERROR: FATAL

>> Is there any public implementation of this functionality I can look into? Any hints?
> In general I'd suggest to prefer the X.509 functionality than the
> openpgp one which is often behind in terms of functionality and
> testing.

yes, I bet it's a good advice. Unfortunately I'm in the project where I
cannot change technologies and openpgp is used there by a 3rd party.


thanks,
petr

-------------- next part --------------
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.19 (GNU/Linux)

mQENBFGcmlQBCADDKesnW2oreCuub5jlW8HhoFPxUYtrCVUw8UKhsrBC1LNvWpcZ
utJBg8kDnj1bCm4mEL54ZfHrDZT4OjM8v8z8nJoK2Iq/a6+wesjd0b8C4E2vhRRq
9na5hplAp0ol6Oy0xTbV79vU8HiN5Enc/OWYAimwZgHcBkpJ67UwWKz69Z3QJAD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OAAAoJEHdAS70bVQVPhEIIAIr9j/ISoXDL
wFhwii7nn/D01GHtpsvp3if1LGt0ehPMcjDwYykYHkL/BG5T7vF4yr0c4NP9qUp2
etr5XCbvwuPYC4Rj3Ypy3nFlfBGCth1hL8Y5toLFdXwEGiBZW6xt6t2WOLRGmNRh
Bb1RaYsqUy86TiYCkrSMHCJ37+89dhbXnIlDnuL1l1H0vW76oLCv28r2dUzcPaGr
+IqekJogWRDA0ERR8DrCb0JOIxA4q+qRe1CiyTYFme8HC6J66xhywQmmBj6E0Im1
aCTir3GS48OtCkITCA7RTQ75n2oVpjAI/wDuFcAXxmfSvfcWUg+VdUgjO0PqaivP
ROtAdTwkHLM=
=vT3/
-----END PGP PUBLIC KEY BLOCK-----
-------------- next part --------------
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v2.0.19 (GNU/Linux)

lQO+BFGcmlQBCADDKesnW2oreCuub5jlW8HhoFPxUYtrCVUw8UKhsrBC1LNvWpcZ
utJBg8kDnj1bCm4mEL54ZfHrDZT4OjM8v8z8nJoK2Iq/a6+wesjd0b8C4E2vhRRq
9na5hplAp0ol6Oy0xTbV79vU8HiN5Enc/OWYAimwZgHcBkpJ67UwWKz69Z3QJADq
gf77bF3hxy1gsOrzXTueTl6yCNWIJTXdwx4wYBqfPk9aZPZRrDkPt1L6U5takNcG
2tBJk/1b4jmpCzC+XXGWzwfX5YxdOrptvlLErrvtdAyVd0ipFQPJgqbmsjgCGMJu
8l1eZMOpmy0zMf41Q2Pcv4LYUmOAllbAsn43ABEBAAH+AwMCAWmlWlAPXDbbolxI
A3HoByJKJqToMjreG2J+zUaP3+PNVCd6yCpHXhQIvE7uxamdXQAJShOssTQL8J5u
WH+2R7G/Xa0tg+bugqWgTQLkFrtP1Awmx3c03zu/mabmxl0B0MFXEo1mvfaI+YM+
R1YIrQqqV8N80/T7GM+O4wG2pcHlSmNQoLxYRYp5nyTw9s+IL6g1+PliwHBYoYD2
p2YY31GBZPHHhJ5cYS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x2fjF/QiXOZpI0xlnuLE8t0M0Mav63yUKhU5xh
E7poCrE8JOqnISfBuxlF7kHjUY+ghI1YUr9uSMTBG7eoFXEiJ0/6UaS7Cd73F9wf
2HQA3pSquh8Al5yO4QNNzp1r10hddYRaV1r5g9hzNZT+YgUTVW1oY+ANTOfM1SIZ
h1tsdNfT40H0toYEnHna2hSJk0McK5G87BxAwZj6/nF9hmUoIkQAq88tCKB/XGSz
FGeYIwiDJxu+2a9SfbjcEiyqKQSapjrmlkNnE6pYR+QfXL+jv9oXdNDAmXma+/cb
mKD8Xp28Nk/rvvQimhhRca7mJh1nXKx7NNFyqHn4N03lrYkBJQQYAQIADwUCUZya
VAIbDAUJAeEzgAAKCRB3QEu9G1UFT4RCCACK/Y/yEqFwy8BYcIou55/w9NRh7abL
6d4n9SxrdHoTzHIw8GMpGB5C/wRuU+7xeMq9HODT/alKdnra+Vwm78Lj2AuEY92K
ct5xZXwRgrYdYS/GObaCxXV8BBogWVusberdlji0RpjUYQW9UWmLKlMvOk4mApK0
jBwid+/vPXYW15yJQ57i9ZdR9L1u+qCwr9vK9nVM3D2hq/iKnpCaIFkQwNBEUfA6
wm9CTiMQOKvqkXtQosk2BZnvBwuieusYcsEJpgY+hNCJtWgk4q9xkuPDrQpCEwgO
0U0O+Z9qFaYwCP8A7hXAF8Zn0r33FlIPlXVIIztD6morz0TrQHU8JByz
=jJ6i
-----END PGP PRIVATE KEY BLOCK-----


More information about the Gnutls-help mailing list