Klaus Demo nginx / c17bc31
SSL: removed OpenSSL 0.9.7 compatibility. Sergey Kandaurov 6 years ago
4 changed file(s) with 6 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
163163
164164 #endif
165165
166 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
167166 #ifndef SSL_OP_NO_COMPRESSION
168167 {
169168 /*
181180 }
182181 }
183182 #endif
184 #endif
185183
186184 ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
187185
902900 "SSL_load_client_CA_file(\"%s\") failed", cert->data);
903901 return NGX_ERROR;
904902 }
905
906 /*
907 * before 0.9.7h and 0.9.8 SSL_load_client_CA_file()
908 * always leaved an error in the error queue
909 */
910
911 ERR_clear_error();
912903
913904 SSL_CTX_set_client_CA_list(ssl->ctx, list);
914905
10751066 * added to wbio, and set buffer size.
10761067 */
10771068
1078 rbio = SSL_get_rbio((ngx_ssl_conn_t *) ssl_conn);
1079 wbio = SSL_get_wbio((ngx_ssl_conn_t *) ssl_conn);
1069 rbio = SSL_get_rbio(ssl_conn);
1070 wbio = SSL_get_wbio(ssl_conn);
10801071
10811072 if (rbio != wbio) {
10821073 (void) BIO_set_write_buffer_size(wbio, NGX_SSL_BUFSIZE);
13591350 ngx_int_t
13601351 ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name)
13611352 {
1362 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
13631353 #ifndef OPENSSL_NO_ECDH
13641354
13651355 /*
14321422 SSL_CTX_set_tmp_ecdh(ssl->ctx, ecdh);
14331423
14341424 EC_KEY_free(ecdh);
1435 #endif
14361425 #endif
14371426 #endif
14381427
33633352 }
33643353 }
33653354
3366 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
3367
33683355 session_id = (u_char *) SSL_SESSION_get_id(sess, &session_id_length);
3369
3370 #else
3371
3372 session_id = sess->session_id;
3373 session_id_length = sess->session_id_length;
3374
3375 #endif
33763356
33773357 #if (NGX_PTR_SIZE == 8)
33783358
34493429 #endif
34503430 u_char *id, int len, int *copy)
34513431 {
3452 #if OPENSSL_VERSION_NUMBER >= 0x0090707fL
3453 const
3454 #endif
3455 u_char *p;
34563432 size_t slen;
34573433 uint32_t hash;
34583434 ngx_int_t rc;
3435 const u_char *p;
34593436 ngx_shm_zone_t *shm_zone;
34603437 ngx_slab_pool_t *shpool;
34613438 ngx_rbtree_node_t *node, *sentinel;
35773554
35783555 cache = shm_zone->data;
35793556
3580 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
3581
35823557 id = (u_char *) SSL_SESSION_get_id(sess, &len);
3583
3584 #else
3585
3586 id = sess->session_id;
3587 len = sess->session_id_length;
3588
3589 #endif
35903558
35913559 hash = ngx_crc32_short(id, len);
35923560
43864354 return NGX_OK;
43874355 }
43884356
4389 #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
4390
43914357 buf = (u_char *) SSL_SESSION_get_id(sess, &len);
4392
4393 #else
4394
4395 buf = sess->session_id;
4396 len = sess->session_id_length;
4397
4398 #endif
43994358
44004359 s->len = 2 * len;
44014360 s->data = ngx_pnalloc(pool, 2 * len);
588588 static void
589589 ngx_ssl_stapling_ocsp_handler(ngx_ssl_ocsp_ctx_t *ctx)
590590 {
591 #if OPENSSL_VERSION_NUMBER >= 0x0090707fL
592 const
593 #endif
594 u_char *p;
595591 int n;
596592 size_t len;
597593 time_t now, valid;
598594 ngx_str_t response;
599595 X509_STORE *store;
596 const u_char *p;
600597 STACK_OF(X509) *chain;
601598 OCSP_CERTID *id;
602599 OCSP_RESPONSE *ocsp;
668668 ngx_http_upstream_rr_peer_t *peer;
669669 #if (NGX_HTTP_UPSTREAM_ZONE)
670670 int len;
671 #if OPENSSL_VERSION_NUMBER >= 0x0090707fL
672 const
673 #endif
674 u_char *p;
671 const u_char *p;
675672 ngx_http_upstream_rr_peers_t *peers;
676673 u_char buf[NGX_SSL_MAX_SESSION_SIZE];
677674 #endif
700700 ngx_stream_upstream_rr_peer_t *peer;
701701 #if (NGX_STREAM_UPSTREAM_ZONE)
702702 int len;
703 #if OPENSSL_VERSION_NUMBER >= 0x0090707fL
704 const
705 #endif
706 u_char *p;
703 const u_char *p;
707704 ngx_stream_upstream_rr_peers_t *peers;
708705 u_char buf[NGX_SSL_MAX_SESSION_SIZE];
709706 #endif