From: djm@openbsd.org Date: Mon, 27 Apr 2015 01:52:30 +0000 (+0000) Subject: upstream commit X-Git-Tag: V_6_9_P1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=734226b4480a6c736096c729fcf6f391400599c7;p=thirdparty%2Fopenssh-portable.git upstream commit fix compilation with OPENSSL=no; ok dtucker@ --- diff --git a/monitor.c b/monitor.c index fb3ea6753..6908a0a6b 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.146 2015/04/17 04:32:31 djm Exp $ */ +/* $OpenBSD: monitor.c,v 1.147 2015/04/27 01:52:30 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl diff --git a/packet.c b/packet.c index ec2cbd30e..4922573ab 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.210 2015/03/24 20:10:08 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.211 2015/04/27 01:52:30 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -792,7 +792,9 @@ ssh_packet_set_compress_hooks(struct ssh *ssh, void *ctx, void ssh_packet_set_encryption_key(struct ssh *ssh, const u_char *key, u_int keylen, int number) { -#ifdef WITH_SSH1 +#ifndef WITH_SSH1 + fatal("no SSH protocol 1 support"); +#else /* WITH_SSH1 */ struct session_state *state = ssh->state; const struct sshcipher *cipher = cipher_by_number(number); int r; @@ -2733,13 +2735,14 @@ sshpkt_put_stringb(struct ssh *ssh, const struct sshbuf *v) return sshbuf_put_stringb(ssh->state->outgoing_packet, v); } -#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) +#ifdef WITH_OPENSSL +#ifdef OPENSSL_HAS_ECC int sshpkt_put_ec(struct ssh *ssh, const EC_POINT *v, const EC_GROUP *g) { return sshbuf_put_ec(ssh->state->outgoing_packet, v, g); } -#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */ +#endif /* OPENSSL_HAS_ECC */ #ifdef WITH_SSH1 int @@ -2749,7 +2752,6 @@ sshpkt_put_bignum1(struct ssh *ssh, const BIGNUM *v) } #endif /* WITH_SSH1 */ -#ifdef WITH_OPENSSL int sshpkt_put_bignum2(struct ssh *ssh, const BIGNUM *v) { @@ -2801,13 +2803,14 @@ sshpkt_get_cstring(struct ssh *ssh, char **valp, size_t *lenp) return sshbuf_get_cstring(ssh->state->incoming_packet, valp, lenp); } -#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) +#ifdef WITH_OPENSSL +#ifdef OPENSSL_HAS_ECC int sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g) { return sshbuf_get_ec(ssh->state->incoming_packet, v, g); } -#endif /* WITH_OPENSSL && OPENSSL_HAS_ECC */ +#endif /* OPENSSL_HAS_ECC */ #ifdef WITH_SSH1 int @@ -2817,7 +2820,6 @@ sshpkt_get_bignum1(struct ssh *ssh, BIGNUM *v) } #endif /* WITH_SSH1 */ -#ifdef WITH_OPENSSL int sshpkt_get_bignum2(struct ssh *ssh, BIGNUM *v) { diff --git a/ssh-keygen.c b/ssh-keygen.c index ad9f3026b..2c0543c96 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.270 2015/04/24 01:36:01 deraadt Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.271 2015/04/27 01:52:30 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -183,8 +183,7 @@ static void type_bits_valid(int type, const char *name, u_int32_t *bitsp) { #ifdef WITH_OPENSSL - u_int maxbits; - int nid; + u_int maxbits, nid; #endif if (type == KEY_UNSPEC)