dnscrypto-proxy: Update to release 1.3.0
[tomato.git] / release / src / router / dnscrypt / src / proxy / cert_p.h
blobf3a4f1b9b8029bd0ec78a5bb7fe9929ddafad0c4
2 #ifndef __CERT_P_H__
3 #define __CERT_P_H__ 1
5 #include <sys/types.h>
7 #include <stdint.h>
9 #include "sodium.h"
11 #define CERT_MAGIC_CERT "DNSC"
13 typedef struct Bincert_ {
14 uint8_t magic_cert[4];
15 uint8_t version_major[2];
16 uint8_t version_minor[2];
18 uint8_t server_publickey[crypto_box_PUBLICKEYBYTES];
19 uint8_t magic_query[8];
20 uint8_t serial[4];
21 uint8_t ts_begin[4];
22 uint8_t ts_end[4];
23 uint8_t end[];
24 } Bincert;
26 typedef struct SignedBincert_ {
27 uint8_t magic_cert[4];
28 uint8_t version_major[2];
29 uint8_t version_minor[2];
31 uint8_t signed_data[];
32 } SignedBincert;
34 #endif