> > I made a patch (attached) based on your suggestions but the build is = > failing on the following errors: > certificate_db.cc: In member function 'bool = > Ssl::CertificateDb::deleteInvalidCertificate()': > certificate_db.cc:439: error: invalid conversion from 'void*' to 'const = > _STACK*' > certificate_db.cc:439: error: initializing argument 1 of 'void* = > sk_value(const _STACK*, int)' > certificate_db.cc: In member function 'bool = > Ssl::CertificateDb::deleteOldestCertificate()': Which squid version you are using ? I am attaching my patch for certifiacate_db.cc (for squid version squid-3.2.0.19). It should compile Regards, Nipun
diff -ur squid-3.2.0.19/src/ssl/certificate_db.cc squid-3.2.0.19_sslcompilefix/src/ssl/certificate_db.cc --- squid-3.2.0.19/src/ssl/certificate_db.cc 2012-08-02 05:14:34.000000000 -0700 +++ squid-3.2.0.19_sslcompilefix/src/ssl/certificate_db.cc 2012-08-09 05:25:19.362601312 -0700 @@ -450,7 +450,7 @@ corrupt = true; // Create indexes in db. -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L if (!corrupt && !TXT_DB_create_index(temp_db.get(), cnlSerial, NULL, LHASH_HASH_FN(index_serial), LHASH_COMP_FN(index_serial))) corrupt = true; @@ -489,7 +489,7 @@ void Ssl::CertificateDb::deleteRow(const char **row, int rowIndex) { const std::string filename(cert_full + "/" + row[cnlSerial] + ".pem"); -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L sk_OPENSSL_PSTRING_delete(db.get()->data, rowIndex); #else sk_delete(db.get()->data, rowIndex); @@ -497,7 +497,7 @@ const Columns db_indexes[]={cnlSerial, cnlName}; for (unsigned int i = 0; i < countof(db_indexes); ++i) { -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L if (LHASH_OF(OPENSSL_STRING) *fieldIndex = db.get()->index[db_indexes[i]]) lh_OPENSSL_STRING_delete(fieldIndex, (char **)row); #else @@ -518,9 +518,9 @@ return false; bool removed_one = false; -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L for (int i = 0; i < sk_OPENSSL_PSTRING_num(db.get()->data); ++i) { - const char ** current_row = ((const char **)sk_OPENSSL_PSTRING_value(db.get()->data, i)); + const char ** current_row = ((const char **)sk_value((const _STACK *)(db.get()->data), i)); #else for (int i = 0; i < sk_num(db.get()->data); ++i) { const char ** current_row = ((const char **)sk_value(db.get()->data, i)); @@ -543,15 +543,15 @@ if (!db) return false; -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L if (sk_OPENSSL_PSTRING_num(db.get()->data) == 0) #else if (sk_num(db.get()->data) == 0) #endif return false; -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL - const char **row = (const char **)sk_OPENSSL_PSTRING_value(db.get()->data, 0); +#if OPENSSL_VERSION_NUMBER >= 0x10000003L + const char **row = (const char **)sk_value((const _STACK *)(db.get()->data), 0); #else const char **row = (const char **)sk_value(db.get()->data, 0); #endif @@ -566,9 +566,9 @@ if (!db) return false; -#if OPENSSL_VERSION_NUMBER >= 0x1000004fL +#if OPENSSL_VERSION_NUMBER >= 0x10000003L for (int i = 0; i < sk_OPENSSL_PSTRING_num(db.get()->data); ++i) { - const char ** current_row = ((const char **)sk_OPENSSL_PSTRING_value(db.get()->data, i)); + const char ** current_row = ((const char **)sk_value((const _STACK *)(db.get()->data), i)); #else for (int i = 0; i < sk_num(db.get()->data); ++i) { const char ** current_row = ((const char **)sk_value(db.get()->data, i));