diff options
author | jp161948 <none@none> | 2007-10-12 03:45:44 -0700 |
---|---|---|
committer | jp161948 <none@none> | 2007-10-12 03:45:44 -0700 |
commit | 442d23f49355a5d0694c758975be57af39f91a61 (patch) | |
tree | e23b7adde8dcbf0470e4de6883cfbef0bdcfd165 /usr/src/cmd/ssh/include | |
parent | d54f1b9de6449e2955636f55ecfb3d50e13a0d98 (diff) | |
download | illumos-gate-442d23f49355a5d0694c758975be57af39f91a61.tar.gz |
PSARC/2007/034 ssh/sshd resync with OpenSSH
6324633 OpenSSH HashKnownHosts functionality desired for SunSSH
Diffstat (limited to 'usr/src/cmd/ssh/include')
-rw-r--r-- | usr/src/cmd/ssh/include/base64.h | 6 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/hostfile.h | 34 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/key.h | 32 | ||||
-rw-r--r-- | usr/src/cmd/ssh/include/readconf.h | 26 |
4 files changed, 52 insertions, 46 deletions
diff --git a/usr/src/cmd/ssh/include/base64.h b/usr/src/cmd/ssh/include/base64.h index cca84b7bc3..7e2ccf7d3e 100644 --- a/usr/src/cmd/ssh/include/base64.h +++ b/usr/src/cmd/ssh/include/base64.h @@ -1,8 +1,8 @@ -/* $Id: base64.h,v 1.3 2002/02/26 16:59:59 stevesk Exp $ */ - #ifndef _BASE64_H #define _BASE64_H +/* $Id: base64.h,v 1.3 2002/02/26 16:59:59 stevesk Exp $ */ + #pragma ident "%Z%%M% %I% %E% SMI" #ifdef __cplusplus @@ -16,7 +16,7 @@ extern "C" { # ifndef HAVE_B64_NTOP int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); -int b64_pton(char const *src, u_char *target, size_t targsize); +int b64_pton(u_char const *src, u_char *target, size_t targsize); # endif /* !HAVE_B64_NTOP */ # define __b64_ntop b64_ntop # define __b64_pton b64_pton diff --git a/usr/src/cmd/ssh/include/hostfile.h b/usr/src/cmd/ssh/include/hostfile.h index 8c41856bec..3a2c7e6a06 100644 --- a/usr/src/cmd/ssh/include/hostfile.h +++ b/usr/src/cmd/ssh/include/hostfile.h @@ -1,15 +1,3 @@ -/* $OpenBSD: hostfile.h,v 1.12 2002/09/08 20:24:08 markus Exp $ */ - -#ifndef _HOSTFILE_H -#define _HOSTFILE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - - /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -22,17 +10,33 @@ extern "C" { * called by a name other than "ssh" or "Secure Shell". */ +#ifndef _HOSTFILE_H +#define _HOSTFILE_H + +/* $OpenBSD: hostfile.h,v 1.12 2002/09/08 20:24:08 markus Exp $ */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { HOST_OK, HOST_NEW, HOST_CHANGED, HOST_FOUND } HostStatus; int hostfile_read_key(char **, u_int *, Key *); HostStatus -check_host_in_hostfile(const char *, const char *, Key *, Key *, int *); -int add_host_to_hostfile(const char *, const char *, Key *); -int +check_host_in_hostfile(const char *, const char *, const Key *, Key *, int *); +int add_host_to_hostfile(const char *, const char *, const Key *, int); +int lookup_key_in_hostfile_by_type(const char *, const char *, int , Key *, int *); +#define HASH_MAGIC "|1|" +#define HASH_DELIM '|' + +char *host_hash(const char *, const char *, u_int); + #ifdef __cplusplus } #endif diff --git a/usr/src/cmd/ssh/include/key.h b/usr/src/cmd/ssh/include/key.h index 33f96eeec9..862b2d81d4 100644 --- a/usr/src/cmd/ssh/include/key.h +++ b/usr/src/cmd/ssh/include/key.h @@ -1,15 +1,3 @@ -/* $OpenBSD: key.h,v 1.19 2002/03/18 17:23:31 markus Exp $ */ - -#ifndef _KEY_H -#define _KEY_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - - /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -34,6 +22,18 @@ extern "C" { * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _KEY_H +#define _KEY_H + +/* $OpenBSD: key.h,v 1.19 2002/03/18 17:23:31 markus Exp $ */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + + #include <openssl/rsa.h> #include <openssl/dsa.h> @@ -68,10 +68,10 @@ Key *key_new(int); Key *key_new_private(int); void key_free(Key *); Key *key_demote(Key *); -int key_equal(Key *, Key *); +int key_equal(const Key *, const Key *); char *key_fingerprint(Key *, enum fp_type, enum fp_rep); char *key_type(Key *); -int key_write(Key *, FILE *); +int key_write(const Key *, FILE *); int key_read(Key *, char **); u_int key_size(Key *); @@ -80,8 +80,8 @@ Key *key_from_private(Key *); int key_type_from_name(char *); Key *key_from_blob(u_char *, int); -int key_to_blob(Key *, u_char **, u_int *); -char *key_ssh_name(Key *); +int key_to_blob(const Key *, u_char **, u_int *); +char *key_ssh_name(const Key *); int key_names_valid2(const char *); int key_sign(Key *, u_char **, u_int *, u_char *, u_int); diff --git a/usr/src/cmd/ssh/include/readconf.h b/usr/src/cmd/ssh/include/readconf.h index e47098f3bf..a81048c0da 100644 --- a/usr/src/cmd/ssh/include/readconf.h +++ b/usr/src/cmd/ssh/include/readconf.h @@ -1,15 +1,3 @@ -/* $OpenBSD: readconf.h,v 1.43 2002/06/08 05:17:01 markus Exp $ */ - -#ifndef _READCONF_H -#define _READCONF_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - - /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -27,6 +15,18 @@ extern "C" { * Use is subject to license terms. */ +#ifndef _READCONF_H +#define _READCONF_H + +/* $OpenBSD: readconf.h,v 1.43 2002/06/08 05:17:01 markus Exp $ */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#ifdef __cplusplus +extern "C" { +#endif + + #include "key.h" /* Data structure for representing a forwarding request. */ @@ -129,6 +129,8 @@ typedef struct { int no_host_authentication_for_localhost; int server_alive_interval; int server_alive_count_max; + + int hash_known_hosts; } Options; |