Ticket #42156: patch-md2.diff

File patch-md2.diff, 905 bytes (added by mojca (Mojca Miklavec), 11 years ago)
  • nasl/nasl_crypto.c

    old new  
    2222  */
    2323#include <includes.h>
    2424#ifdef HAVE_SSL
     25#ifdef HAVE_OPENSSL_MD2_H
    2526#include <openssl/md2.h>
     27#endif
    2628#include <openssl/md4.h>
    2729#include <openssl/md5.h>
    2830#include <openssl/ripemd.h>
     
    4547
    4648
    4749/*-------------------[  Std. HASH ]-------------------------------------*/
     50#ifdef HAVE_OPENSSL_MD2_H
    4851tree_cell * nasl_md2(lex_ctxt * lexic)
    4952{
    5053 char * data = get_str_var_by_num(lexic, 0);
    tree_cell * nasl_md2(lex_ctxt * lexic) 
    6366 retc->size = MD2_DIGEST_LENGTH;
    6467 return retc;
    6568}
     69#endif
    6670
    6771tree_cell * nasl_md4(lex_ctxt * lexic)
    6872{
    static tree_cell * nasl_hmac(lex_ctxt * lexic, const EVP_MD * evp_md) 
    193197}
    194198
    195199
     200#ifdef HAVE_OPENSSL_MD2_H
    196201tree_cell * nasl_hmac_md2(lex_ctxt * lexic)
    197202{
    198203 return nasl_hmac(lexic, EVP_md2());
    199204}
     205#endif
    200206
    201207
    202208tree_cell * nasl_hmac_md5(lex_ctxt * lexic)