00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KEYS_H_
00022 #define KEYS_H_
00023
00024 #include "config.h"
00025 #include "libssh/libssh.h"
00026 #include "libssh/wrapper.h"
00027
00028 struct ssh_public_key_struct {
00029 int type;
00030 const char *type_c;
00031 #ifdef HAVE_LIBGCRYPT
00032 gcry_sexp_t dsa_pub;
00033 gcry_sexp_t rsa_pub;
00034 #elif HAVE_LIBCRYPTO
00035 DSA *dsa_pub;
00036 RSA *rsa_pub;
00037 #endif
00038 };
00039
00040 struct ssh_private_key_struct {
00041 int type;
00042 #ifdef HAVE_LIBGCRYPT
00043 gcry_sexp_t dsa_priv;
00044 gcry_sexp_t rsa_priv;
00045 #elif defined HAVE_LIBCRYPTO
00046 DSA *dsa_priv;
00047 RSA *rsa_priv;
00048 #endif
00049 };
00050
00051 const char *ssh_type_to_char(int type);
00052 int ssh_type_from_name(const char *name);
00053
00054 ssh_public_key publickey_from_string(ssh_session session, ssh_string pubkey_s);
00055
00056 #endif