comparison src/event/ngx_event_openssl.h @ 0:f0b350454894 NGINX_0_1_0

nginx 0.1.0 *) The first public version.
author Igor Sysoev <http://sysoev.ru>
date Mon, 04 Oct 2004 00:00:00 +0400
parents
children 6f8b0dc0f8dd
comparison
equal deleted inserted replaced
-1:000000000000 0:f0b350454894
1
2 /*
3 * Copyright (C) Igor Sysoev
4 */
5
6
7 #ifndef _NGX_EVENT_OPENSSL_H_INCLUDED_
8 #define _NGX_EVENT_OPENSSL_H_INCLUDED_
9
10
11 #include <ngx_config.h>
12 #include <ngx_core.h>
13
14 #include <openssl/ssl.h>
15 #include <openssl/err.h>
16
17
18 typedef struct {
19 SSL *ssl;
20 ngx_buf_t *buf;
21 ngx_event_handler_pt saved_handler;
22
23 unsigned buffer:1;
24 unsigned no_rcv_shut:1;
25 unsigned no_send_shut:1;
26 } ngx_ssl_t;
27
28
29 typedef SSL_CTX ngx_ssl_ctx_t;
30
31
32 #define NGX_SSL_BUFFER 1
33
34
35 #define NGX_SSL_BUFSIZE 16384
36
37
38 ngx_int_t ngx_ssl_init(ngx_log_t *log);
39 ngx_int_t ngx_ssl_create_session(ngx_ssl_ctx_t *ctx, ngx_connection_t *c,
40 ngx_uint_t flags);
41
42 #define ngx_ssl_handshake(c) NGX_OK
43
44 ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size);
45 ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in,
46 off_t limit);
47 ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c);
48 void ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
49 char *fmt, ...);
50
51 #define ngx_ssl_set_nosendshut(ssl) \
52 if (ssl) { \
53 ssl->no_send_shut = 1; \
54 }
55
56
57 #endif /* _NGX_EVENT_OPENSSL_H_INCLUDED_ */