trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: July 2011

[PATCH master 1/1] openssl1.patch

From: Patches at Lincom <rxu_patch@...>
Date: Wed, 20 Jul 2011 19:21:50 -0400
Hi! This is rxu_patch@.... I'm writing this email to send a 
new patch to the list. The Reply-To for this email address is: robxu9 
<AT> gmail <DOT> com. Mailing lists may change this depending on 
configured settings. The preferred method is to reply to the list.
Thanks! Patches At Lincom.

Patch is included below:

Fixes some functionality with later versions of openssl (afaict)


--- kcontrol/crypto/crypto.cpp.orig 2006-10-02 06:31:49.000000000 +1300
+++ kcontrol/crypto/crypto.cpp
@@ -2321,7 +2321,11 @@ bool KCryptoConfig::loadCiphers() {
  unsigned int i;
  SSL_CTX *ctx;
  SSL *ssl;
+#if OPENSSL_VERSION_NUMBER < 0x00909000L
  SSL_METHOD *meth;
+#else
+const SSL_METHOD *meth;
+#endif

    SSLv2Box->clear();
    SSLv3Box->clear();
@@ -2337,8 +2341,10 @@ SSL_METHOD *meth;
    CipherItem *item;
    for (i=0; ; i++) {
      int j, k;
-    SSL_CIPHER *sc;
-    sc = (meth->get_cipher)(i);
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 
0x10000000L
+    const
+#endif
+    SSL_CIPHER *sc = (meth->get_cipher)(i);
      if (!sc)
        break;
      // Leak of sc*?
@@ -2365,8 +2371,10 @@ SSL_METHOD *meth;

    for (i=0; ; i++) {
      int j, k;
-    SSL_CIPHER *sc;
-    sc = (meth->get_cipher)(i);
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 
0x10000000L
+    const
+#endif
+    SSL_CIPHER *sc = (meth->get_cipher)(i);
      if (!sc)
        break;
      // Leak of sc*?