diff options
| author | 2017-04-30 23:10:43 +0000 | |
|---|---|---|
| committer | 2017-04-30 23:10:43 +0000 | |
| commit | 67cc3a3cf8518dd2e78b340d35c15dbfd1e7e89d (patch) | |
| tree | 8092cdbbddcde08ee62518f1db74e4b13c5be4f6 /usr.bin/ssh/packet.c | |
| parent | Make early attrbute work here as well. Remove unreachable panic while there. (diff) | |
| download | wireguard-openbsd-67cc3a3cf8518dd2e78b340d35c15dbfd1e7e89d.tar.xz wireguard-openbsd-67cc3a3cf8518dd2e78b340d35c15dbfd1e7e89d.zip | |
unifdef WITH_SSH1
ok markus@
Diffstat (limited to 'usr.bin/ssh/packet.c')
| -rw-r--r-- | usr.bin/ssh/packet.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index f9b02fca09b..3166979003c 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.247 2017/03/11 13:07:35 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.248 2017/04/30 23:10:43 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -800,34 +800,7 @@ uncompress_buffer(struct ssh *ssh, struct sshbuf *in, struct sshbuf *out) void ssh_packet_set_encryption_key(struct ssh *ssh, const u_char *key, u_int keylen, int number) { -#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; - const char *wmsg; - - if (cipher == NULL) - fatal("%s: unknown cipher number %d", __func__, number); - if (keylen < 20) - fatal("%s: keylen too small: %d", __func__, keylen); - if (keylen > SSH_SESSION_KEY_LENGTH) - fatal("%s: keylen too big: %d", __func__, keylen); - memcpy(state->ssh1_key, key, keylen); - state->ssh1_keylen = keylen; - if ((r = cipher_init(&state->send_context, cipher, key, keylen, - NULL, 0, CIPHER_ENCRYPT)) != 0 || - (r = cipher_init(&state->receive_context, cipher, key, keylen, - NULL, 0, CIPHER_DECRYPT) != 0)) - fatal("%s: cipher_init failed: %s", __func__, ssh_err(r)); - if (!state->cipher_warning_done && - ((wmsg = cipher_warning_message(state->send_context)) != NULL || - (wmsg = cipher_warning_message(state->send_context)) != NULL)) { - error("Warning: %s", wmsg); - state->cipher_warning_done = 1; - } -#endif /* WITH_SSH1 */ } /* @@ -2840,13 +2813,6 @@ sshpkt_put_ec(struct ssh *ssh, const EC_POINT *v, const EC_GROUP *g) return sshbuf_put_ec(ssh->state->outgoing_packet, v, g); } -#ifdef WITH_SSH1 -int -sshpkt_put_bignum1(struct ssh *ssh, const BIGNUM *v) -{ - return sshbuf_put_bignum1(ssh->state->outgoing_packet, v); -} -#endif /* WITH_SSH1 */ int sshpkt_put_bignum2(struct ssh *ssh, const BIGNUM *v) @@ -2906,13 +2872,6 @@ sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g) return sshbuf_get_ec(ssh->state->incoming_packet, v, g); } -#ifdef WITH_SSH1 -int -sshpkt_get_bignum1(struct ssh *ssh, BIGNUM *v) -{ - return sshbuf_get_bignum1(ssh->state->incoming_packet, v); -} -#endif /* WITH_SSH1 */ int sshpkt_get_bignum2(struct ssh *ssh, BIGNUM *v) |
