diff options
Diffstat (limited to 'sm/gpgsm.h')
-rw-r--r-- | sm/gpgsm.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sm/gpgsm.h b/sm/gpgsm.h index 00ae32e00..916a2cd38 100644 --- a/sm/gpgsm.h +++ b/sm/gpgsm.h @@ -45,7 +45,7 @@ struct { int fingerprint; /* list fingerprints in all key listings */ - int armor; /* force base64 armoring */ + int armor; /* force base64 armoring (see also ctrl.with_base64) */ int no_armor; /* don't try to figure out whether data is base64 armored*/ int def_cipher_algo; /* cipher algorithm to use if nothing else is know */ @@ -89,9 +89,20 @@ struct server_control_s { int status_fd; /* only for non-server mode */ struct server_local_s *server_local; int with_colons; /* use column delimited output format */ + + int autodetect_encoding; /* try to detect the input encoding */ + int is_pem; /* Is in PEM format */ + int is_base64; /* is in plain base-64 format */ + + int create_base64; /* Create base64 encoded output */ + int create_pem; /* create PEM output */ + }; typedef struct server_control_s *CTRL; +/* data structure osed in base64.c */ +typedef struct base64_context_s *Base64Context; + /*-- gpgsm.c --*/ void gpgsm_exit (int rc); @@ -107,6 +118,14 @@ char *gpgsm_get_fingerprint_hexstring (KsbaCert cert, int algo); char *gpgsm_get_keygrip (KsbaCert cert, char *array); char *gpgsm_get_keygrip_hexstring (KsbaCert cert); +/*-- base64.c --*/ +int gpgsm_create_reader (Base64Context *ctx, + CTRL ctrl, FILE *fp, KsbaReader *r_reader); +void gpgsm_destroy_reader (Base64Context ctx); +int gpgsm_create_writer (Base64Context *ctx, + CTRL ctrl, FILE *fp, KsbaWriter *r_writer); +void gpgsm_destroy_writer (Base64Context ctx); + /*-- certdump.c --*/ void gpgsm_dump_cert (const char *text, KsbaCert cert); |