From 70917d9a4bb8259aa5c9bb3145bbe01c85a56fa5 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 23 Apr 2005 16:28:01 +0000 Subject: [PATCH] Import OpenSSH 4.0 from ftp.openbsd.org --- crypto/dist/ssh/bufaux.h | 14 ++++++++++++-- crypto/dist/ssh/buffer.h | 8 ++++++-- crypto/dist/ssh/cipher-ctr.c | 15 +++------------ crypto/dist/ssh/moduli.c | 8 ++++---- crypto/dist/ssh/scp.1 | 6 ++++-- 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/crypto/dist/ssh/bufaux.h b/crypto/dist/ssh/bufaux.h index 430fc9ccb275..34995e1f033d 100644 --- a/crypto/dist/ssh/bufaux.h +++ b/crypto/dist/ssh/bufaux.h @@ -1,5 +1,5 @@ -/* $NetBSD: bufaux.h,v 1.1.1.8 2005/02/13 00:52:54 christos Exp $ */ -/* $OpenBSD: bufaux.h,v 1.19 2003/11/10 16:23:41 jakob Exp $ */ +/* $NetBSD: bufaux.h,v 1.1.1.9 2005/04/23 16:28:01 christos Exp $ */ +/* $OpenBSD: bufaux.h,v 1.20 2004/10/29 23:56:17 djm Exp $ */ /* * Author: Tatu Ylonen @@ -43,4 +43,14 @@ void buffer_put_cstring(Buffer *, const char *); #define buffer_skip_string(b) \ do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while(0) +int buffer_put_bignum_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum_ret(Buffer *, BIGNUM *); +int buffer_put_bignum2_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum2_ret(Buffer *, BIGNUM *); +int buffer_get_short_ret(u_short *, Buffer *); +int buffer_get_int_ret(u_int *, Buffer *); +int buffer_get_int64_ret(u_int64_t *, Buffer *); +void *buffer_get_string_ret(Buffer *, u_int *); +int buffer_get_char_ret(char *, Buffer *); + #endif /* BUFAUX_H */ diff --git a/crypto/dist/ssh/buffer.h b/crypto/dist/ssh/buffer.h index 2e97dc7b1883..785d29e8cd99 100644 --- a/crypto/dist/ssh/buffer.h +++ b/crypto/dist/ssh/buffer.h @@ -1,5 +1,5 @@ -/* $NetBSD: buffer.h,v 1.1.1.6 2002/03/08 01:20:34 itojun Exp $ */ -/* $OpenBSD: buffer.h,v 1.11 2002/03/04 17:27:39 stevesk Exp $ */ +/* $NetBSD: buffer.h,v 1.1.1.7 2005/04/23 16:28:01 christos Exp $ */ +/* $OpenBSD: buffer.h,v 1.12 2004/10/29 23:56:17 djm Exp $ */ /* * Author: Tatu Ylonen @@ -41,4 +41,8 @@ void buffer_consume_end(Buffer *, u_int); void buffer_dump(Buffer *); +int buffer_get_ret(Buffer *, void *, u_int); +int buffer_consume_ret(Buffer *, u_int); +int buffer_consume_end_ret(Buffer *, u_int); + #endif /* BUFFER_H */ diff --git a/crypto/dist/ssh/cipher-ctr.c b/crypto/dist/ssh/cipher-ctr.c index 628ad36de9b9..f4107b7a8ae3 100644 --- a/crypto/dist/ssh/cipher-ctr.c +++ b/crypto/dist/ssh/cipher-ctr.c @@ -1,4 +1,4 @@ -/* $NetBSD: cipher-ctr.c,v 1.1.1.1 2005/02/13 00:52:56 christos Exp $ */ +/* $NetBSD: cipher-ctr.c,v 1.1.1.2 2005/04/23 16:28:04 christos Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -15,23 +15,14 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: cipher-ctr.c,v 1.4 2004/02/06 23:41:13 dtucker Exp $"); +RCSID("$OpenBSD: cipher-ctr.c,v 1.5 2004/12/22 02:13:19 djm Exp $"); #include +#include #include "log.h" #include "xmalloc.h" -#if OPENSSL_VERSION_NUMBER < 0x00907000L -#include "rijndael.h" -#define AES_KEY rijndael_ctx -#define AES_BLOCK_SIZE 16 -#define AES_encrypt(a, b, c) rijndael_encrypt(c, a, b) -#define AES_set_encrypt_key(a, b, c) rijndael_set_key(c, (char *)a, b, 1) -#else -#include -#endif - const EVP_CIPHER *evp_aes_128_ctr(void); void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); diff --git a/crypto/dist/ssh/moduli.c b/crypto/dist/ssh/moduli.c index 7533b2c82e3a..3be3c013a180 100644 --- a/crypto/dist/ssh/moduli.c +++ b/crypto/dist/ssh/moduli.c @@ -1,5 +1,5 @@ -/* $NetBSD: moduli.c,v 1.1.1.1 2005/02/13 00:53:02 christos Exp $ */ -/* $OpenBSD: moduli.c,v 1.9 2004/07/11 17:48:47 deraadt Exp $ */ +/* $NetBSD: moduli.c,v 1.1.1.2 2005/04/23 16:28:10 christos Exp $ */ +/* $OpenBSD: moduli.c,v 1.10 2005/01/17 03:25:46 dtucker Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -57,7 +57,7 @@ #define QTYPE_UNKNOWN (0) #define QTYPE_UNSTRUCTURED (1) #define QTYPE_SAFE (2) -#define QTYPE_SCHNOOR (3) +#define QTYPE_SCHNORR (3) #define QTYPE_SOPHIE_GERMAIN (4) #define QTYPE_STRONG (5) @@ -531,7 +531,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted) break; case QTYPE_UNSTRUCTURED: case QTYPE_SAFE: - case QTYPE_SCHNOOR: + case QTYPE_SCHNORR: case QTYPE_STRONG: case QTYPE_UNKNOWN: debug2("%10u: (%u)", count_in, in_type); diff --git a/crypto/dist/ssh/scp.1 b/crypto/dist/ssh/scp.1 index 9dfd82217224..66b75e21ee92 100644 --- a/crypto/dist/ssh/scp.1 +++ b/crypto/dist/ssh/scp.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: scp.1,v 1.1.1.9 2005/02/13 00:53:09 christos Exp $ +.\" $NetBSD: scp.1,v 1.1.1.10 2005/04/23 16:28:15 christos Exp $ .\" -*- nroff -*- .\" .\" scp.1 @@ -10,7 +10,7 @@ .\" .\" Created: Sun May 7 00:14:37 1995 ylo .\" -.\" $OpenBSD: scp.1,v 1.36 2004/06/13 15:03:02 djm Exp $ +.\" $OpenBSD: scp.1,v 1.38 2005/03/01 17:19:35 jmc Exp $ .\" .Dd September 25, 1999 .Dt SCP 1 @@ -134,6 +134,7 @@ For full details of the options listed below, and their possible values, see .It GlobalKnownHostsFile .It GSSAPIAuthentication .It GSSAPIDelegateCredentials +.It HashKnownHosts .It Host .It HostbasedAuthentication .It HostKeyAlgorithms @@ -141,6 +142,7 @@ For full details of the options listed below, and their possible values, see .It HostName .It IdentityFile .It IdentitiesOnly +.It KbdInteractiveDevices .It LogLevel .It MACs .It NoHostAuthenticationForLocalhost