1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
alex
5eeca041f8 Removed references to MD2, as OpenSSL 1.x.x doesn't support it anymore 2010-08-20 06:05:08 +00:00
david
36927f0810 Fix a problem in the changes to the openssl NSE library made in r17002
found by Patrik Karlsson. The second and subsequent times we call
EVP{Encrypt,Decrypt}Init_ex, we have to pass NULL for the type argument.
This allows setting to accumulate from previous calls.
2010-03-28 21:18:02 +00:00
david
181bb7ca93 Check the key and iv length before giving them to OpenSSL in l_encrypt
and l_decrypt. Otherwise, OpenSSL reads unallocated memory:

openssl.encrypt("DES", "key", "iv", "datadatadatadata")

==5691== Invalid read of size 1
==5691==    at 0x412F07D: DES_set_key_unchecked (in /usr/lib/libcrypto.so.0.9.8)
==5691==  Address 0x4bcc415 is 2 bytes after a block of size 19 alloc'd
==5691==    at 0x402598A: malloc (vg_replace_malloc.c:195)
==5691==    by 0x4025A16: realloc (vg_replace_malloc.c:476)
==5691==    by 0x80ED502: luaM_realloc_ (in /home/david/nmap/nmap)
==5691==    by 0x80F134B: luaS_newlstr (in /home/david/nmap/nmap)
==5691==    by 0x80F85FA: luaX_newstring (in /home/david/nmap/nmap)
==5691==    by 0x80F8FF6: llex (in /home/david/nmap/nmap)
==5691==    by 0x80F9861: luaX_next (in /home/david/nmap/nmap)
==5691==    by 0x80EDCAF: testnext (in /home/david/nmap/nmap)
==5691==    by 0x80EF718: explist1 (in /home/david/nmap/nmap)
==5691==    by 0x80EF7C0: funcargs (in /home/david/nmap/nmap)
==5691==    by 0x80EFA1C: primaryexp (in /home/david/nmap/nmap)
==5691==    by 0x80EEE16: subexpr (in /home/david/nmap/nmap)
2010-03-15 22:49:09 +00:00
patrik
16e0a8449f o Added the function bignum_add to the nse_openssl library to support BIGNUM
addition [Patrik]
2010-03-09 20:54:01 +00:00
batrick
07cfc5aee4 Corrected many #includes for header files (where they are included).
Moved the includes for Lua headers to the .cc files so they are
not needlessly, repeatedly included.

Similarly, moved some standard headers to the .cc files and reorganized
includes to be uniform for all nse_* source files.

Fixed whitespace (removed tabs).
2009-03-10 05:56:10 +00:00
sven
e9dd88b8a9 remove bignum_set_negative and bignum_is_negative because those functions are not available in older openssl versions 2008-10-30 13:10:01 +00:00
sven
841ab6647a show meaningful error messages on OpenSSL errors 2008-10-12 13:47:44 +00:00
david
e7cc30b6c2 Make some changes to allow a Windows build of the new openssl code. (Just
rearragement of some includes and defines.)
2008-10-08 22:58:29 +00:00
sven
d8714befb1 merging nse_openssl branch 2008-10-08 22:21:41 +00:00