Support parsing of the CMS KeyAgreeRecipientInfo.
* src/cms-parser.c (_ksba_cms_parse_enveloped_data_part_1): Decode at the RecipientInfo level. * src/cms.c (ksba_cms_get_issuer_serial): Adjust for this change. Support KeyAgreeRecipientInfo. (ksba_cms_get_enc_val): Ditto. (dbg_print_sexp): New commented debug helper. * src/keyinfo.c (enc_algo_table): Add and entry of ECDH. (_ksba_parse_algorithm_identifier2): Make R_NREAD optional. (cryptval_to_sexp): Add args to support ECDH. (_ksba_sigval_to_sexp): Adjust for this. (_ksba_encval_to_sexp): Ditto. (_ksba_encval_kari_to_sexp): New. * tests/t-cms-parser.c (one_file): Print the enc-val. * tests/samples/ecdh-sample1.p7m: New sample. * tests/samples/ecdh-sample1.p7m.asn: And a dump with some comments.
- GnuPG-bug-id: T4920
- Signed-off-by: Werner Koch <wk@gnupg.org>