patch-ssh_c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- dsniff-2.4.orig/ssh.c 2001-03-15 09:33:04.000000000 +0100
  3. +++ dsniff-2.4/ssh.c 2009-05-09 23:17:07.000000000 +0200
  4. @@ -331,12 +331,14 @@ SSH_accept(SSH *ssh)
  5. ssh->encrypt = des3_encrypt;
  6. ssh->decrypt = des3_decrypt;
  7. }
  8. +#ifndef OPENSSL_NO_BF
  9. else if (cipher == SSH_CIPHER_BLOWFISH) {
  10. ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  11. ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  12. ssh->encrypt = blowfish_encrypt;
  13. ssh->decrypt = blowfish_decrypt;
  14. }
  15. +#endif
  16. /* Send verification. */
  17. msg[0] = SSH_SMSG_SUCCESS;
  18. @@ -461,18 +463,20 @@ SSH_connect(SSH *ssh)
  19. return (-1);
  20. }
  21. /* Set cipher. */
  22. - if (cipher == SSH_CIPHER_BLOWFISH) {
  23. - ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  24. - ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  25. - ssh->encrypt = blowfish_encrypt;
  26. - ssh->decrypt = blowfish_decrypt;
  27. - }
  28. - else if (cipher == SSH_CIPHER_3DES) {
  29. + if (cipher == SSH_CIPHER_3DES) {
  30. ssh->estate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
  31. ssh->dstate = des3_init(ssh->sesskey, sizeof(ssh->sesskey));
  32. ssh->encrypt = des3_encrypt;
  33. ssh->decrypt = des3_decrypt;
  34. }
  35. +#ifndef OPENSSL_NO_BF
  36. + else if (cipher == SSH_CIPHER_BLOWFISH) {
  37. + ssh->estate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  38. + ssh->dstate = blowfish_init(ssh->sesskey,sizeof(ssh->sesskey));
  39. + ssh->encrypt = blowfish_encrypt;
  40. + ssh->decrypt = blowfish_decrypt;
  41. + }
  42. +#endif
  43. /* Get server response. */
  44. if ((i = SSH_recv(ssh, pkt, sizeof(pkt))) <= 0) {
  45. warn("SSH_recv");