forked from ginhom/dnscrypt-proxy
-
Notifications
You must be signed in to change notification settings - Fork 60
/
cert.h
26 lines (20 loc) · 823 Bytes
/
cert.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
#ifndef __CERT_H__
#define __CERT_H__ 1
#include <event2/dns.h>
#include <event2/event.h>
#define CERT_QUERY_RETRY_MIN_DELAY 1
#define CERT_QUERY_RETRY_MAX_DELAY (5 * 60)
#define CERT_QUERY_RETRY_STEPS 100
#define CERT_QUERY_RETRY_DELAY_AFTER_SUCCESS_MIN_DELAY (60 * 60)
#define CERT_QUERY_RETRY_DELAY_AFTER_SUCCESS_JITTER 100
typedef struct CertUpdater_ {
struct evdns_base *evdns_base;
struct event *cert_timer;
unsigned int query_retry_step;
} CertUpdater;
struct ProxyContext_;
int cert_updater_init(struct ProxyContext_ * const proxy_context);
int cert_updater_start(struct ProxyContext_ * const proxy_context);
void cert_updater_stop(struct ProxyContext_ * const proxy_context);
void cert_updater_free(struct ProxyContext_ * const proxy_context);
#endif