Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 604882 | Differences between
and this patch

Collapse All | Expand All

(-)a/configure.ac (+1 lines)
Lines 806-811 AC_CHECK_DECLS([SSL_CTX_get0_param],[], [], [[#include <openssl/ssl.h>]]) Link Here
806
AC_CHECK_DECLS([X509_STORE_CTX_get0_cert],[], [], [[#include <openssl/ssl.h>]])
806
AC_CHECK_DECLS([X509_STORE_CTX_get0_cert],[], [], [[#include <openssl/ssl.h>]])
807
AC_CHECK_DECLS([X509_get_extension_flags], [], [], [[#include <openssl/x509v3.h>]])
807
AC_CHECK_DECLS([X509_get_extension_flags], [], [], [[#include <openssl/x509v3.h>]])
808
AC_CHECK_DECLS([EVP_MD_CTX_reset], [], [], [[#include <openssl/evp.h>]])
808
AC_CHECK_DECLS([EVP_MD_CTX_reset], [], [], [[#include <openssl/evp.h>]])
809
AC_CHECK_DECLS([ASN1_STRING_get0_data], [], [], [[#include <openssl/asn1.h>]])
809
810
810
dnl
811
dnl
811
dnl Right now, openssl is never linked statically as it is only used by the
812
dnl Right now, openssl is never linked statically as it is only used by the
(-)a/lib/compat/openssl_support.h (+4 lines)
Lines 49-53 uint32_t X509_get_extension_flags(X509 *x); Link Here
49
#define EVP_MD_CTX_destroy(md_ctx) EVP_MD_CTX_cleanup(md_ctx) 
49
#define EVP_MD_CTX_destroy(md_ctx) EVP_MD_CTX_cleanup(md_ctx) 
50
#endif
50
#endif
51
51
52
#if !HAVE_DECL_ASN1_STRING_GET0_DATA
53
#define ASN1_STRING_get0_data ASN1_STRING_data
54
#endif
55
52
#endif
56
#endif
53
57
(-)a/lib/crypto.c (-1 / +7 lines)
Lines 34-42 Link Here
34
#include <openssl/ssl.h>
34
#include <openssl/ssl.h>
35
#include <stdio.h>
35
#include <stdio.h>
36
36
37
static gboolean randfile_loaded;
38
#if OPENSSL_VERSION_NUMBER < 0x10100000L
37
static gint ssl_lock_count;
39
static gint ssl_lock_count;
38
static GStaticMutex *ssl_locks;
40
static GStaticMutex *ssl_locks;
39
static gboolean randfile_loaded;
40
41
41
static void
42
static void
42
ssl_locking_callback(int mode, int type, const char *file, int line)
43
ssl_locking_callback(int mode, int type, const char *file, int line)
Lines 83-88 crypto_deinit_threading(void) Link Here
83
    }
84
    }
84
  g_free(ssl_locks);
85
  g_free(ssl_locks);
85
}
86
}
87
#endif
86
88
87
void
89
void
88
crypto_deinit(void)
90
crypto_deinit(void)
Lines 95-110 crypto_deinit(void) Link Here
95
      if (rnd_file[0])
97
      if (rnd_file[0])
96
        RAND_write_file(rnd_file);
98
        RAND_write_file(rnd_file);
97
    }
99
    }
100
#if OPENSSL_VERSION_NUMBER < 0x10100000L
98
  crypto_deinit_threading();
101
  crypto_deinit_threading();
102
#endif
99
}
103
}
100
104
101
static void
105
static void
102
crypto_init(void)
106
crypto_init(void)
103
{
107
{
108
#if OPENSSL_VERSION_NUMBER < 0x10100000L
104
  SSL_library_init();
109
  SSL_library_init();
105
  SSL_load_error_strings();
110
  SSL_load_error_strings();
106
  OpenSSL_add_all_algorithms();
111
  OpenSSL_add_all_algorithms();
107
  crypto_init_threading();
112
  crypto_init_threading();
113
#endif
108
114
109
  if (RAND_status() < 0 || getenv("RANDFILE"))
115
  if (RAND_status() < 0 || getenv("RANDFILE"))
110
    {
116
    {
(-)a/lib/tlscontext.c (-1 / +1 lines)
Lines 559-565 tls_verify_certificate_name(X509 *cert, const gchar *host_name) Link Here
559
              gen_name = sk_GENERAL_NAME_value(alt_names, i);
559
              gen_name = sk_GENERAL_NAME_value(alt_names, i);
560
              if (gen_name->type == GEN_DNS)
560
              if (gen_name->type == GEN_DNS)
561
                {
561
                {
562
                  guchar *dnsname = ASN1_STRING_data(gen_name->d.dNSName);
562
                  const guchar *dnsname = ASN1_STRING_get0_data(gen_name->d.dNSName);
563
                  guint dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
563
                  guint dnsname_len = ASN1_STRING_length(gen_name->d.dNSName);
564
564
565
                  if (dnsname_len > sizeof(pattern_buf) - 1)
565
                  if (dnsname_len > sizeof(pattern_buf) - 1)
(-)a/tests/loggen/loggen.c (-1 / +4 lines)
Lines 530-536 gen_messages_ssl(int sock, int id, FILE *readfrom) Link Here
530
  SSL *ssl;
530
  SSL *ssl;
531
531
532
  /* Initialize SSL library */
532
  /* Initialize SSL library */
533
#if OPENSSL_VERSION_NUMBER < 0x10100000L
533
  OpenSSL_add_ssl_algorithms();
534
  OpenSSL_add_ssl_algorithms();
535
#endif
534
536
535
  if (NULL == (ctx = SSL_CTX_new(SSLv23_client_method())))
537
  if (NULL == (ctx = SSL_CTX_new(SSLv23_client_method())))
536
    return 1;
538
    return 1;
Lines 538-545 gen_messages_ssl(int sock, int id, FILE *readfrom) Link Here
538
  if (NULL == (ssl = SSL_new(ctx)))
540
  if (NULL == (ssl = SSL_new(ctx)))
539
    return 1;
541
    return 1;
540
542
543
#if OPENSSL_VERSION_NUMBER < 0x10100000L
541
  SSL_load_error_strings();
544
  SSL_load_error_strings();
542
  ERR_load_crypto_strings();
545
  ERR_load_crypto_strings();
546
#endif
543
547
544
  SSL_set_fd (ssl, sock);
548
  SSL_set_fd (ssl, sock);
545
  if (-1 == (err = SSL_connect(ssl)))
549
  if (-1 == (err = SSL_connect(ssl)))
546
- 

Return to bug 604882