mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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>
This commit is contained in:
parent
919e76b407
commit
28c31524be
10 changed files with 150 additions and 62 deletions
18
sm/gpgsm.h
18
sm/gpgsm.h
|
@ -33,6 +33,7 @@
|
|||
#include "../common/status.h"
|
||||
#include "../common/audit.h"
|
||||
#include "../common/session-env.h"
|
||||
#include "../common/ksba-io-support.h"
|
||||
|
||||
|
||||
#define MAX_DIGEST_LEN 64
|
||||
|
@ -205,10 +206,6 @@ struct server_control_s
|
|||
};
|
||||
|
||||
|
||||
/* Data structure used in base64.c. */
|
||||
typedef struct base64_context_s *Base64Context;
|
||||
|
||||
|
||||
/* An object to keep a list of certificates. */
|
||||
struct certlist_s
|
||||
{
|
||||
|
@ -262,19 +259,6 @@ int gpgsm_get_key_algo_info (ksba_cert_t cert, unsigned int *nbits);
|
|||
char *gpgsm_get_certid (ksba_cert_t cert);
|
||||
|
||||
|
||||
/*-- base64.c --*/
|
||||
int gpgsm_create_reader (Base64Context *ctx,
|
||||
ctrl_t ctrl, estream_t fp, int allow_multi_pem,
|
||||
ksba_reader_t *r_reader);
|
||||
int gpgsm_reader_eof_seen (Base64Context ctx);
|
||||
void gpgsm_destroy_reader (Base64Context ctx);
|
||||
int gpgsm_create_writer (Base64Context *ctx,
|
||||
ctrl_t ctrl, estream_t stream,
|
||||
ksba_writer_t *r_writer);
|
||||
int gpgsm_finish_writer (Base64Context ctx);
|
||||
void gpgsm_destroy_writer (Base64Context ctx);
|
||||
|
||||
|
||||
/*-- certdump.c --*/
|
||||
void gpgsm_print_serial (estream_t fp, ksba_const_sexp_t p);
|
||||
void gpgsm_print_time (estream_t fp, ksba_isotime_t t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue