View | Details | Raw Unified | Return to bug 62346
Collapse All | Expand All

(-)modules/md/md_crypt.c (-1 / +1 lines)
Lines 471-477 apr_status_t md_pkey_gen(md_pkey_t **ppkey, apr_po Link Here
471
    }
471
    }
472
}
472
}
473
473
474
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
474
#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
475
475
476
#ifndef NID_tlsfeature
476
#ifndef NID_tlsfeature
477
#define NID_tlsfeature          1020
477
#define NID_tlsfeature          1020
(-)modules/ssl/mod_ssl.c (-1 / +1 lines)
Lines 398-404 static int ssl_hook_pre_config(apr_pool_t *pconf, Link Here
398
    /* We must register the library in full, to ensure our configuration
398
    /* We must register the library in full, to ensure our configuration
399
     * code can successfully test the SSL environment.
399
     * code can successfully test the SSL environment.
400
     */
400
     */
401
#if MODSSL_USE_OPENSSL_PRE_1_1_API
401
#if MODSSL_USE_OPENSSL_PRE_1_1_API || defined(LIBRESSL_VERSION_NUMBER)
402
    (void)CRYPTO_malloc_init();
402
    (void)CRYPTO_malloc_init();
403
#else
403
#else
404
    OPENSSL_malloc_init();
404
    OPENSSL_malloc_init();
(-)modules/ssl/ssl_engine_init.c (-2 / +4 lines)
Lines 546-552 static apr_status_t ssl_init_ctx_protocol(server_r Link Here
546
    char *cp;
546
    char *cp;
547
    int protocol = mctx->protocol;
547
    int protocol = mctx->protocol;
548
    SSLSrvConfigRec *sc = mySrvConfig(s);
548
    SSLSrvConfigRec *sc = mySrvConfig(s);
549
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
549
#if OPENSSL_VERSION_NUMBER >= 0x10100000L  && \
550
	(!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x20800000L)
550
    int prot;
551
    int prot;
551
#endif
552
#endif
552
553
Lines 616-622 static apr_status_t ssl_init_ctx_protocol(server_r Link Here
616
617
617
    SSL_CTX_set_options(ctx, SSL_OP_ALL);
618
    SSL_CTX_set_options(ctx, SSL_OP_ALL);
618
619
619
#if OPENSSL_VERSION_NUMBER < 0x10100000L
620
#if OPENSSL_VERSION_NUMBER < 0x10100000L  || \
621
	(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20800000L)
620
    /* always disable SSLv2, as per RFC 6176 */
622
    /* always disable SSLv2, as per RFC 6176 */
621
    SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
623
    SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
622
624
(-)modules/ssl/ssl_private.h (-6 / +8 lines)
Lines 132-144 Link Here
132
        SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
132
        SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
133
#define SSL_CTX_set_max_proto_version(ctx, version) \
133
#define SSL_CTX_set_max_proto_version(ctx, version) \
134
        SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
134
        SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
135
#endif
135
#elif LIBRESSL_VERSION_NUMBER < 0x2070000f
136
/* LibreSSL declares OPENSSL_VERSION_NUMBER == 2.0 but does not include most
136
/* LibreSSL before 2.7 declares OPENSSL_VERSION_NUMBER == 2.0 but does not
137
 * changes from OpenSSL >= 1.1 (new functions, macros, deprecations, ...), so
137
 * include most changes from OpenSSL >= 1.1 (new functions, macros, 
138
 * we have to work around this...
138
 * deprecations, ...), so we have to work around this...
139
 */
139
 */
140
#define MODSSL_USE_OPENSSL_PRE_1_1_API (1)
140
#define MODSSL_USE_OPENSSL_PRE_1_1_API (1)
141
#else
141
#endif /* LIBRESSL_VERSION_NUMBER < 0x2060000f */
142
#else /* defined(LIBRESSL_VERSION_NUMBER) */
142
#define MODSSL_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L)
143
#define MODSSL_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L)
143
#endif
144
#endif
144
145
Lines 238-244 void init_bio_methods(void); Link Here
238
void free_bio_methods(void);
239
void free_bio_methods(void);
239
#endif
240
#endif
240
241
241
#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
242
#if OPENSSL_VERSION_NUMBER < 0x10002000L || \
243
	(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
242
#define X509_STORE_CTX_get0_store(x) (x->ctx)
244
#define X509_STORE_CTX_get0_store(x) (x->ctx)
243
#endif
245
#endif
244
246

Return to bug 62346