diff options
author | Werner Koch <[email protected]> | 2001-11-27 17:40:09 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2001-11-27 17:40:09 +0000 |
commit | 944fee70bc3461d80dfe73873f3d66ab0e425e4c (patch) | |
tree | 9d80b776360c32ce54f0326e76141a102f5b4766 /sm/gpgsm.h | |
parent | * assuan-handler.c (assuan_register_input_notify): New. (diff) | |
download | gnupg-944fee70bc3461d80dfe73873f3d66ab0e425e4c.tar.gz gnupg-944fee70bc3461d80dfe73873f3d66ab0e425e4c.zip |
* base64.c: New. Changed all other functions to use this instead
of direct creation of ksba_reader/writer.
* gpgsm.c (main): Set ctrl.auto_encoding unless --no-armor is used.
This way we can feed PEM encoded stuff to --verify.
Diffstat (limited to '')
-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); |