OpenVAS Libraries  4.0+rc3.SVN
misc/openvas_ssh_login.h
00001 /* OpenVAS Libraries
00002  * $Id$
00003  * Description: LSC Credentials management.
00004  *
00005  * Authors:
00006  * Felix Wolfsteller <felix.wolfsteller@intevation.de>
00007  *
00008  * Copyright:
00009  * Copyright (C) 2009 Greenbone Networks GmbH
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License version 2,
00013  * or, at your option, any later version as published by the Free
00014  * Software Foundation
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
00024  */
00025 
00026 #ifndef _OPENVAS_SSH_LOGIN_H
00027 #define _OPENVAS_SSH_LOGIN_H
00028 
00029 #include <glib.h>
00030 
00034 typedef struct
00035 {
00036   char *name;                   
00037   char *username;               
00038   char *userpassword;           
00039   char *public_key_path;        
00040   char *private_key_path;       
00041   char *ssh_key_passphrase;     
00042   char *comment;                
00043   gboolean valid;           
00045 } openvas_ssh_login;
00046 
00047 openvas_ssh_login *openvas_ssh_login_new (char *name, char *pubkey_file,
00048                                           char *privkey_file, char *passphrase,
00049                                           char *comment, char *uname,
00050                                           char *upass);
00051 
00052 void openvas_ssh_login_free (openvas_ssh_login * loginfo);
00053 
00054 GHashTable *openvas_ssh_login_file_read (char *filename, gboolean check);
00055 
00056 GHashTable *openvas_ssh_login_file_read_buffer (const char *buffer,
00057                                                 gsize buffer_size,
00058                                                 gboolean check);
00059 
00060 gboolean openvas_ssh_login_file_write (GHashTable * ssh_logins, char *filename);
00061 
00062 char *openvas_ssh_login_prefstring (openvas_ssh_login * loginfo);
00063 
00064 #endif