summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/cipher.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-05-04 01:33:21 +0000
committerdjm <djm@openbsd.org>2017-05-04 01:33:21 +0000
commit6cf998ea6778e98f77466c009c7449d629512722 (patch)
tree16d1759d7e2e304d459a26804c27a740acdcbd27 /usr.bin/ssh/cipher.c
parentBring boot() in line with our other architectures. (diff)
downloadwireguard-openbsd-6cf998ea6778e98f77466c009c7449d629512722.tar.xz
wireguard-openbsd-6cf998ea6778e98f77466c009c7449d629512722.zip
another tentacle: cipher_set_key_string() was only ever used for SSHv1
Diffstat (limited to 'usr.bin/ssh/cipher.c')
-rw-r--r--usr.bin/ssh/cipher.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c
index 4cde43ce863..52b73791a70 100644
--- a/usr.bin/ssh/cipher.c
+++ b/usr.bin/ssh/cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cipher.c,v 1.105 2017/05/01 00:03:18 djm Exp $ */
+/* $OpenBSD: cipher.c,v 1.106 2017/05/04 01:33:21 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -444,28 +444,6 @@ cipher_free(struct sshcipher_ctx *cc)
}
/*
- * Selects the cipher, and keys if by computing the MD5 checksum of the
- * passphrase and using the resulting 16 bytes as the key.
- */
-int
-cipher_set_key_string(struct sshcipher_ctx **ccp,
- const struct sshcipher *cipher, const char *passphrase, int do_encrypt)
-{
- u_char digest[16];
- int r = SSH_ERR_INTERNAL_ERROR;
-
- if ((r = ssh_digest_memory(SSH_DIGEST_MD5,
- passphrase, strlen(passphrase),
- digest, sizeof(digest))) != 0)
- goto out;
-
- r = cipher_init(ccp, cipher, digest, 16, NULL, 0, do_encrypt);
- out:
- explicit_bzero(digest, sizeof(digest));
- return r;
-}
-
-/*
* Exports an IV from the sshcipher_ctx required to export the key
* state back from the unprivileged child to the privileged parent
* process.