Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'STORAGE.H')
-rw-r--r--STORAGE.H31
1 files changed, 29 insertions, 2 deletions
diff --git a/STORAGE.H b/STORAGE.H
index 6464b69d..e9138f40 100644
--- a/STORAGE.H
+++ b/STORAGE.H
@@ -6,6 +6,8 @@
#ifndef PUTTY_STORAGE_H
#define PUTTY_STORAGE_H
+#include "defs.h"
+
/* ----------------------------------------------------------------------
* Functions to save and restore PuTTY sessions. Note that this is
* only the low-level code to do the reading and writing. The
@@ -81,8 +83,8 @@ void enum_settings_finish(settings_e *handle);
* be 0 (entry matches database), 1 (entry is absent in database),
* or 2 (entry exists in database and is different).
*/
-int verify_host_key(const char *hostname, int port,
- const char *keytype, const char *key);
+int check_stored_host_key(const char *hostname, int port,
+ const char *keytype, const char *key);
/*
* Write a host key into the database, overwriting any previous
@@ -92,6 +94,31 @@ void store_host_key(const char *hostname, int port,
const char *keytype, const char *key);
/* ----------------------------------------------------------------------
+ * Functions to access PuTTY's configuration for trusted host
+ * certification authorities. This must be stored separately from the
+ * saved-session data, because the whole point is to avoid having to
+ * configure CAs separately per session.
+ */
+
+struct host_ca {
+ char *name;
+ strbuf *ca_public_key;
+ char *validity_expression;
+ ca_options opts;
+};
+
+host_ca_enum *enum_host_ca_start(void);
+bool enum_host_ca_next(host_ca_enum *handle, strbuf *out);
+void enum_host_ca_finish(host_ca_enum *handle);
+
+host_ca *host_ca_load(const char *name);
+char *host_ca_save(host_ca *); /* NULL on success, or dynamic error msg */
+char *host_ca_delete(const char *name); /* likewise */
+
+host_ca *host_ca_new(void); /* initialises to default settings */
+void host_ca_free(host_ca *);
+
+/* ----------------------------------------------------------------------
* Functions to access PuTTY's random number seed file.
*/