59 lines
2.5 KiB
Plaintext
59 lines
2.5 KiB
Plaintext
$OpenBSD: patch-src_privkey_h,v 1.1 2006/10/31 19:54:22 alek Exp $
|
|
--- src/privkey.h.orig Sun Oct 16 17:51:11 2005
|
|
+++ src/privkey.h Sun Oct 29 00:31:54 2006
|
|
@@ -20,6 +20,7 @@
|
|
#ifndef __PRIVKEY_H__
|
|
#define __PRIVKEY_H__
|
|
|
|
+#include <stdio.h>
|
|
#include "privkey-t.h"
|
|
#include "userstate.h"
|
|
|
|
@@ -36,12 +37,23 @@ char *otrl_privkey_fingerprint(OtrlUserS
|
|
* OtrlUserState. */
|
|
gcry_error_t otrl_privkey_read(OtrlUserState us, const char *filename);
|
|
|
|
+/* Read a sets of private DSA keys from a FILE* into the given
|
|
+ * OtrlUserState. The FILE* must be open for reading. */
|
|
+gcry_error_t otrl_privkey_read_FILEp(OtrlUserState us, FILE *privf);
|
|
+
|
|
/* Generate a private DSA key for a given account, storing it into a
|
|
* file on disk, and loading it into the given OtrlUserState. Overwrite any
|
|
* previously generated keys for that account in that OtrlUserState. */
|
|
gcry_error_t otrl_privkey_generate(OtrlUserState us, const char *filename,
|
|
const char *accountname, const char *protocol);
|
|
|
|
+/* Generate a private DSA key for a given account, storing it into a
|
|
+ * FILE*, and loading it into the given OtrlUserState. Overwrite any
|
|
+ * previously generated keys for that account in that OtrlUserState.
|
|
+ * The FILE* must be open for reading and writing. */
|
|
+gcry_error_t otrl_privkey_generate_FILEp(OtrlUserState us, FILE *privf,
|
|
+ const char *accountname, const char *protocol);
|
|
+
|
|
/* Read the fingerprint store from a file on disk into the given
|
|
* OtrlUserState. Use add_app_data to add application data to each
|
|
* ConnContext so created. */
|
|
@@ -50,9 +62,22 @@ gcry_error_t otrl_privkey_read_fingerpri
|
|
void (*add_app_data)(void *data, ConnContext *context),
|
|
void *data);
|
|
|
|
+/* Read the fingerprint store from a FILE* into the given
|
|
+ * OtrlUserState. Use add_app_data to add application data to each
|
|
+ * ConnContext so created. The FILE* must be open for reading. */
|
|
+gcry_error_t otrl_privkey_read_fingerprints_FILEp(OtrlUserState us,
|
|
+ FILE *storef,
|
|
+ void (*add_app_data)(void *data, ConnContext *context),
|
|
+ void *data);
|
|
+
|
|
/* Write the fingerprint store from a given OtrlUserState to a file on disk. */
|
|
gcry_error_t otrl_privkey_write_fingerprints(OtrlUserState us,
|
|
const char *filename);
|
|
+
|
|
+/* Write the fingerprint store from a given OtrlUserState to a FILE*.
|
|
+ * The FILE* must be open for writing. */
|
|
+gcry_error_t otrl_privkey_write_fingerprints_FILEp(OtrlUserState us,
|
|
+ FILE *storef);
|
|
|
|
/* Fetch the private key from the given OtrlUserState associated with
|
|
* the given account */
|