From fecf526ed334c8b987b37a3702e85a08bb7a9e68 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 26 Aug 2018 18:54:19 +0200 Subject: Began implementing configuration fetching from an sshportal mysql database --- src/mysql.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/mysql.h (limited to 'src/mysql.h') diff --git a/src/mysql.h b/src/mysql.h new file mode 100644 index 0000000..46e607e --- /dev/null +++ b/src/mysql.h @@ -0,0 +1,18 @@ +#ifndef MYSQL_H_ +#define MYSQL_H_ + +struct db_host_info { + char * privkeytxt; + char * address; + char * username; + char * hostkeyhash; +}; + +char db_init(void); +void db_clean(void); +char * db_get_username_from_pubkey(ssh_key pubkey); +struct db_host_info * db_get_host_info(const char * hostname); +void db_free_host_info(struct db_host_info * info); +void db_set_host_publickey_hash(const char * hostname, const char * hash); + +#endif -- cgit v1.2.3