Re: Decrypting openpgp data created by gpg

Lahiru Dissanayake <[email protected]> Wed, 27 Feb 2013 14:28:55 +0800
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <CAHeAcfD1h8pUd4DssZ0cEseSCgDVAAXmU++Bj+8nE0K77K9UBg@mail.gmail.com>
Hi Peter,

Found another issue similar to this when specifying the
CRYPT_ENVINFO_SIGNATURE attribute to verify a digitally signed PGP
envelope. The following line returns -2 in the de-enveloping process:

status = cryptSetAttribute(cryptEnvelope, CRYPT_ENVINFO_SIGNATURE,
publicKeyContext);

You don't get this error when the envelope type is CRYPT_FORMAT_CRYPTLIB.
Similar to the issue with the private key context, directly specifying a
keyset instead of the above line works.

I'd appreciate it if you could provide a simple workaround as before,
rather than having to wait for the next release.

Thanks,
Lahiru


On Mon, Feb 25, 2013 at 10:47 AM, Peter Gutmann
<[email protected]>wrote:

> Lahiru Dissanayake <[email protected]> writes:
>
> >Are you sure this works? Because the line
> >{ CRYPT_ENVINFO_PRIVATEKEY,     formatAll,              ACTION_CRYPT,
> MESSAGE_CHECK_PKC_DECRYPT, 0 },
> >fixed the error, but the new one
> >{ CRYPT_ENVINFO_PRIVATEKEY,     formatAllDeenv, ACTION_CRYPT,
> MESSAGE_CHECK_PKC_DECRYPT, ENVELOPE_ISDEENVELOPE },
> >brought it back.
>
> Ah, you also need to change formatAllDeenv to:
>
> static const CRYPT_FORMAT_TYPE formatAllDeenv[] = {
>         CRYPT_FORMAT_AUTO, CRYPT_FORMAT_CMS, CRYPT_FORMAT_PGP,
>         CRYPT_FORMAT_NONE, CRYPT_FORMAT_NONE };
>
> but then there are changes elsewhere as well... for now just leave it at
> formatAll and it should work, the next release will contain the full set of
> changes.
>
> Peter.
>

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.