common: Remove gpgsm dependencies from ksba-io-support.
authorWerner Koch <wk@gnupg.org>
Thu, 16 Feb 2017 14:16:48 +0000 (15:16 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 16 Feb 2017 15:22:07 +0000 (16:22 +0100)
commit28c31524be84f20b34573c78bd3a94a81e4b1d61
treec994aef3b2314946c8bf92bd9b1bbbf81b1a6726
parent919e76b407ac557b0f518ec03f3cc59e9e5740c9
common: Remove gpgsm dependencies from ksba-io-support.

* common/ksba-io-support.c: Include ksba-io-support.h instead of
../sm/gpgsm.h.  Include util.h.
(writer_cb_parm_s): Remove const from 'pem_name'.
(gpgsm_destroy_writer): Free 'pem_name'.
(gpgsm_create_reader): Rename to ...
(gnupg_ksba_create_reader): this.  Replace args CTRL and
ALLOW_MULTI_PEM by a new arg FLAGS.  Change the code to evaluate
FLAGS.  Change all callers to pass the FLAGS.
(gpgsm_create_writer): Rename to ...
(gnupg_ksba_create_writer): this.  Replace arg CTRL by new arg FLAGS.
Add arg PEM_NAME.  Evaluate FLAGS.  Store a copy of PEM_NAME.  Change
all callers to pass the FLAGS and PEM_NAME.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/ksba-io-support.c
common/ksba-io-support.h
sm/certreqgen.c
sm/decrypt.c
sm/encrypt.c
sm/export.c
sm/gpgsm.h
sm/import.c
sm/sign.c
sm/verify.c