From 3a5b0233306a3db3a5db5b9ddc187c55e9b251f4 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 13 Mar 2002 13:19:42 +1100 Subject: Stupid djm commits experimental code to head instead of branch revert --- cipher.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'cipher.c') diff --git a/cipher.c b/cipher.c index 5ddf819c4..9e8f42f5e 100644 --- a/cipher.c +++ b/cipher.c @@ -541,43 +541,3 @@ evp_rijndael(void) #endif return (&rijndal_cbc); } - -/* - * Exports an IV from the CipherContext required to export the key - * state back from the unprivileged child to the privileged parent - * process. - */ - -void -cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len) -{ - Cipher *c = cc->cipher; - u_char *civ = NULL; - int evplen; - - switch (c->number) { - case SSH_CIPHER_SSH2: - evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); - if (evplen == 0) - return; - if (evplen != len) - fatal("%s: wrong iv length %d != %d", __FUNCTION__, - evplen, len); - - if (strncmp(c->name, "aes", 3) == 0) { - struct ssh_rijndael_ctx *aesc; - - aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp); - if (aesc == NULL) - fatal("ssh_rijndael_cbc: no context"); - civ = aesc->r_iv; - } else { - civ = cc->evp.iv; - } - break; - default: - fatal("%s: bad cipher %d", __FUNCTION__, c->number); - } - memcpy(iv, civ, len); -} - -- cgit v1.2.3