]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Mon, 27 Apr 2015 01:52:30 +0000 (01:52 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 29 Apr 2015 08:19:05 +0000 (18:19 +1000)
fix compilation with OPENSSL=no; ok dtucker@

monitor.c
packet.c
ssh-keygen.c

index fb3ea67536423865d679352ddfbd33cd255630e6..6908a0a6b7dcd286da5f58010092a3ce99736dfa 100644 (file)
--- 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 <provos@citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus@openbsd.org>
index ec2cbd30e5646cc75e6e4151844a7649f8076c11..4922573ab7325617fc0871ab3690efa6f978911c 100644 (file)
--- 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 <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, 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)
 {
index ad9f3026bee02cb3cf9aad8480a32ec11ac4abb0..2c0543c96594a13d5b21275d788da554cb0ce61a 100644 (file)
@@ -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 <ylo@cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, 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)