Ticket #49109: patch-qca-ossl.diff

File patch-qca-ossl.diff, 2.6 KB (added by RJVB (René Bertin), 9 years ago)
  • plugins/qca-ossl/qca-ossl.cpp

    diff --git plugins/qca-ossl/qca-ossl.cpp plugins/qca-ossl/qca-ossl.cpp
    index 783a20d..b218992 100644
    public: 
    19301930                        md = EVP_sha1();
    19311931                else if(alg == EMSA3_MD5)
    19321932                        md = EVP_md5();
    1933 #ifdef HAVE_OPENSSL_MD2
     1933#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    19341934                else if(alg == EMSA3_MD2)
    19351935                        md = EVP_md2();
    19361936#endif
    public: 
    19581958                        md = EVP_sha1();
    19591959                else if(alg == EMSA3_MD5)
    19601960                        md = EVP_md5();
    1961 #ifdef HAVE_OPENSSL_MD2
     1961#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    19621962                else if(alg == EMSA3_MD2)
    19631963                        md = EVP_md2();
    19641964#endif
    public: 
    36063606                case NID_md5WithRSAEncryption:
    36073607                        p.sigalgo = QCA::EMSA3_MD5;
    36083608                        break;
    3609 #ifdef HAVE_OPENSSL_MD2
     3609#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    36103610                case NID_md2WithRSAEncryption:
    36113611                        p.sigalgo = QCA::EMSA3_MD2;
    36123612                        break;
    public: 
    41064106                case NID_md5WithRSAEncryption:
    41074107                        p.sigalgo = QCA::EMSA3_MD5;
    41084108                        break;
    4109 #ifdef HAVE_OPENSSL_MD2
     4109#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    41104110                case NID_md2WithRSAEncryption:
    41114111                        p.sigalgo = QCA::EMSA3_MD2;
    41124112                        break;
    public: 
    42984298                case NID_md5WithRSAEncryption:
    42994299                        p.sigalgo = QCA::EMSA3_MD5;
    43004300                        break;
    4301 #ifdef HAVE_OPENSSL_MD2
     4301#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    43024302                case NID_md2WithRSAEncryption:
    43034303                        p.sigalgo = QCA::EMSA3_MD2;
    43044304                        break;
    static QStringList all_hash_types() 
    68786878        list += "sha1";
    68796879        list += "sha0";
    68806880        list += "ripemd160";
    6881 #ifdef HAVE_OPENSSL_MD2
     6881#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    68826882        list += "md2";
    68836883#endif
    68846884        list += "md4";
    public: 
    70987098                list += all_hash_types();
    70997099                list += all_mac_types();
    71007100                list += all_cipher_types();
    7101 #ifdef HAVE_OPENSSL_MD2
     7101#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    71027102                list += "pbkdf1(md2)";
    71037103#endif
    71047104                list += "pbkdf1(sha1)";
    public: 
    71337133                        return new opensslHashContext( EVP_sha(), this, type);
    71347134                else if ( type == "ripemd160" )
    71357135                        return new opensslHashContext( EVP_ripemd160(), this, type);
    7136 #ifdef HAVE_OPENSSL_MD2
     7136#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    71377137                else if ( type == "md2" )
    71387138                        return new opensslHashContext( EVP_md2(), this, type);
    71397139#endif
    public: 
    71657165*/
    71667166                else if ( type == "pbkdf1(sha1)" )
    71677167                        return new opensslPbkdf1Context( EVP_sha1(), this, type );
    7168 #ifdef HAVE_OPENSSL_MD2
     7168#if defined(HAVE_OPENSSL_MD2) && !defined(OPENSSL_NO_MD2)
    71697169                else if ( type == "pbkdf1(md2)" )
    71707170                        return new opensslPbkdf1Context( EVP_md2(), this, type );
    71717171#endif