forked from grahamedgecombe/nginx-ct
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngx_ssl_ct_module.h
47 lines (39 loc) · 1.63 KB
/
ngx_ssl_ct_module.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Copyright (c) 2015-2017 Graham Edgecombe <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _NGX_SSL_CT_H_INCLUDED_
#define _NGX_SSL_CT_H_INCLUDED_
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_SSL_CT_EXT 18 /* from RFC 6962 */
#define NGX_SSL_CT_EXT_MAX_LEN 0xFFFF
#define NGX_SSL_CT_OCSP_MAX_LEN 5000
#define ngx_strrchr(s1, c) strrchr((const char *) s1, (int) c)
typedef struct {
ngx_flag_t enable;
ngx_array_t *sct_dirs;
} ngx_ssl_ct_srv_conf_t;
typedef struct {
u_char buf[NGX_SSL_CT_EXT_MAX_LEN];
size_t len;
u_char ocspResp[NGX_SSL_CT_OCSP_MAX_LEN];
size_t ocspRespLen;
} ngx_ssl_ct_ext;
ngx_int_t ngx_ssl_ct_init(ngx_log_t *log);
ngx_ssl_ct_ext *ngx_ssl_ct_read_static_scts(ngx_conf_t *cf, ngx_str_t *path);
void *ngx_ssl_ct_create_srv_conf(ngx_conf_t *cf);
char *ngx_ssl_ct_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child,
SSL_CTX *ssl_ctx, ngx_array_t *certificates);
#endif