Home GnuPG

Support password based decryption.

Description

Support password based decryption.

* src/cms.asn (RecipientInfo): Add pwri element.
(PasswordRecipientInfo): New.
* src/keyinfo.c (get_algorithm): Add arg to specify the expected tag.
Change all callers.
(_ksba_parse_algorithm_identifier3): New to specify the expected tag.
* src/cms.c: Include stringbuf.h.
(ksba_cms_get_issuer_serial): Return an error code for pwri.
(ksba_cms_get_enc_val): Add special code for pwri.
* tests/t-cms-parser.c (one_file): Detect pwri recipients.

Note that this change only handles decryption. To support encryption
ksba_cms_set_enc_val needs to be extended. This can all be done w/o
an ABI or API break.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on May 18 2021, 1:04 PM
Parents
rK72f19cdabfb2: build: Update gpg-error.m4.
Branches
Unknown
Tags
Unknown