aboutsummaryrefslogtreecommitdiffstats
path: root/common/ksba-io-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/ksba-io-support.h')
-rw-r--r--common/ksba-io-support.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/common/ksba-io-support.h b/common/ksba-io-support.h
index 7028686de..0f448ec25 100644
--- a/common/ksba-io-support.h
+++ b/common/ksba-io-support.h
@@ -30,4 +30,37 @@
#ifndef GNUPG_KSBA_IO_SUPPORT_H
#define GNUPG_KSBA_IO_SUPPORT_H
+/* Flags used with gnupg_ksba_create_reader and
+ * gnupg_ksba_create_writer. */
+#define GNUPG_KSBA_IO_PEM 1 /* X.509 PEM format. */
+#define GNUPG_KSBA_IO_BASE64 2 /* Plain Base64 format. */
+#define GNUPG_KSBA_IO_AUTODETECT 4 /* Try toautodeect the format. */
+#define GNUPG_KSBA_IO_MULTIPEM 8 /* Allow more than one PEM chunk. */
+
+
+/* Context object. */
+typedef struct base64_context_s *Base64Context;
+
+
+
+gpg_error_t gnupg_ksba_create_reader (Base64Context *ctx,
+ unsigned int flags,
+ estream_t fp,
+ ksba_reader_t *r_reader);
+
+int gpgsm_reader_eof_seen (Base64Context ctx);
+void gpgsm_destroy_reader (Base64Context ctx);
+
+gpg_error_t gnupg_ksba_create_writer (Base64Context *ctx,
+ unsigned int flags,
+ const char *pem_name,
+ estream_t stream,
+ ksba_writer_t *r_writer);
+
+int gpgsm_finish_writer (Base64Context ctx);
+void gpgsm_destroy_writer (Base64Context ctx);
+
+
+
+
#endif /*GNUPG_KSBA_IO_SUPPORT_H*/