comparison src/event/ngx_event_openssl.h @ 8839:fac88e160653 quic

Merged with the default branch.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 01 Sep 2021 10:57:25 +0300
parents 6674a50cbb6c 509b663a789c
children 61d0fa67b55e
comparison
equal deleted inserted replaced
8838:d6e191a583cc 8839:fac88e160653
9 #define _NGX_EVENT_OPENSSL_H_INCLUDED_ 9 #define _NGX_EVENT_OPENSSL_H_INCLUDED_
10 10
11 11
12 #include <ngx_config.h> 12 #include <ngx_config.h>
13 #include <ngx_core.h> 13 #include <ngx_core.h>
14
15 #define OPENSSL_SUPPRESS_DEPRECATED
14 16
15 #include <openssl/ssl.h> 17 #include <openssl/ssl.h>
16 #include <openssl/err.h> 18 #include <openssl/err.h>
17 #include <openssl/bn.h> 19 #include <openssl/bn.h>
18 #include <openssl/conf.h> 20 #include <openssl/conf.h>
33 #include <openssl/hmac.h> 35 #include <openssl/hmac.h>
34 #ifndef OPENSSL_NO_OCSP 36 #ifndef OPENSSL_NO_OCSP
35 #include <openssl/ocsp.h> 37 #include <openssl/ocsp.h>
36 #endif 38 #endif
37 #include <openssl/rand.h> 39 #include <openssl/rand.h>
38 #include <openssl/rsa.h>
39 #include <openssl/x509.h> 40 #include <openssl/x509.h>
40 #include <openssl/x509v3.h> 41 #include <openssl/x509v3.h>
41 42
42 #define NGX_SSL_NAME "OpenSSL" 43 #define NGX_SSL_NAME "OpenSSL"
43 44
67 #define ngx_ssl_conn_t SSL 68 #define ngx_ssl_conn_t SSL
68 69
69 70
70 #if (OPENSSL_VERSION_NUMBER < 0x10002000L) 71 #if (OPENSSL_VERSION_NUMBER < 0x10002000L)
71 #define SSL_is_server(s) (s)->server 72 #define SSL_is_server(s) (s)->server
73 #endif
74
75
76 #if (OPENSSL_VERSION_NUMBER >= 0x30000000L && !defined SSL_get_peer_certificate)
77 #define SSL_get_peer_certificate(s) SSL_get1_peer_certificate(s)
78 #endif
79
80
81 #if (OPENSSL_VERSION_NUMBER < 0x30000000L && !defined ERR_peek_error_data)
82 #define ERR_peek_error_data(d, f) ERR_peek_error_line_data(NULL, NULL, d, f)
72 #endif 83 #endif
73 84
74 85
75 typedef struct ngx_ssl_ocsp_s ngx_ssl_ocsp_t; 86 typedef struct ngx_ssl_ocsp_s ngx_ssl_ocsp_t;
76 87
202 ngx_resolver_t *resolver, ngx_msec_t resolver_timeout); 213 ngx_resolver_t *resolver, ngx_msec_t resolver_timeout);
203 ngx_int_t ngx_ssl_ocsp_validate(ngx_connection_t *c); 214 ngx_int_t ngx_ssl_ocsp_validate(ngx_connection_t *c);
204 ngx_int_t ngx_ssl_ocsp_get_status(ngx_connection_t *c, const char **s); 215 ngx_int_t ngx_ssl_ocsp_get_status(ngx_connection_t *c, const char **s);
205 void ngx_ssl_ocsp_cleanup(ngx_connection_t *c); 216 void ngx_ssl_ocsp_cleanup(ngx_connection_t *c);
206 ngx_int_t ngx_ssl_ocsp_cache_init(ngx_shm_zone_t *shm_zone, void *data); 217 ngx_int_t ngx_ssl_ocsp_cache_init(ngx_shm_zone_t *shm_zone, void *data);
207 RSA *ngx_ssl_rsa512_key_callback(ngx_ssl_conn_t *ssl_conn, int is_export,
208 int key_length);
209 ngx_array_t *ngx_ssl_read_password_file(ngx_conf_t *cf, ngx_str_t *file); 218 ngx_array_t *ngx_ssl_read_password_file(ngx_conf_t *cf, ngx_str_t *file);
210 ngx_array_t *ngx_ssl_preserve_passwords(ngx_conf_t *cf, 219 ngx_array_t *ngx_ssl_preserve_passwords(ngx_conf_t *cf,
211 ngx_array_t *passwords); 220 ngx_array_t *passwords);
212 ngx_int_t ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file); 221 ngx_int_t ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file);
213 ngx_int_t ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name); 222 ngx_int_t ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name);