summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--cipher.c15
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f71dacaf2..8298194a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
120020910 120020910
2 - (djm) Bug #365: Read /.ssh/environment properly under CygWin. 2 - (djm) Bug #365: Read /.ssh/environment properly under CygWin.
3 Patch from Mark Bradshaw <bradshaw@staff.crosswalk.com> 3 Patch from Mark Bradshaw <bradshaw@staff.crosswalk.com>
4 - (djm) Bug #138: Make protocol 1 blowfish work with old OpenSSL.
5 Patch from Robert Halubek <rob@adso.com.pl>
4 6
520020905 720020905
6 - (djm) OpenBSD CVS Sync 8 - (djm) OpenBSD CVS Sync
@@ -1612,4 +1614,4 @@
1612 - (stevesk) entropy.c: typo in debug message 1614 - (stevesk) entropy.c: typo in debug message
1613 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1615 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1614 1616
1615$Id: ChangeLog,v 1.2449 2002/09/10 11:43:53 djm Exp $ 1617$Id: ChangeLog,v 1.2450 2002/09/10 12:26:17 djm Exp $
diff --git a/cipher.c b/cipher.c
index 9e8ef999b..1933d3eab 100644
--- a/cipher.c
+++ b/cipher.c
@@ -437,6 +437,18 @@ swap_bytes(const u_char *src, u_char *dst, int n)
437 } 437 }
438} 438}
439 439
440#ifdef SSH_OLD_EVP
441static void bf_ssh1_init (EVP_CIPHER_CTX * ctx, const unsigned char *key,
442 const unsigned char *iv, int enc)
443{
444 if (iv != NULL)
445 memcpy (&(ctx->oiv[0]), iv, 8);
446 memcpy (&(ctx->iv[0]), &(ctx->oiv[0]), 8);
447 if (key != NULL)
448 BF_set_key (&(ctx->c.bf_ks), EVP_CIPHER_CTX_key_length (ctx),
449 key);
450}
451#endif
440static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL; 452static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL;
441 453
442static int 454static int
@@ -458,6 +470,9 @@ evp_ssh1_bf(void)
458 memcpy(&ssh1_bf, EVP_bf_cbc(), sizeof(EVP_CIPHER)); 470 memcpy(&ssh1_bf, EVP_bf_cbc(), sizeof(EVP_CIPHER));
459 orig_bf = ssh1_bf.do_cipher; 471 orig_bf = ssh1_bf.do_cipher;
460 ssh1_bf.nid = NID_undef; 472 ssh1_bf.nid = NID_undef;
473#ifdef SSH_OLD_EVP
474 ssh1_bf.init = bf_ssh1_init;
475#endif
461 ssh1_bf.do_cipher = bf_ssh1_cipher; 476 ssh1_bf.do_cipher = bf_ssh1_cipher;
462 ssh1_bf.key_len = 32; 477 ssh1_bf.key_len = 32;
463 return (&ssh1_bf); 478 return (&ssh1_bf);