diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:28 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:29 +0200 |
commit | 389cd6c466486e670e6f9cd74d2cfdf46f392340 (patch) | |
tree | c4b10fac237c407badc8300b2d6116fe6a1ce7cb /external/unbound/dnscrypt/cert.h | |
parent | Merge pull request #2073 (diff) | |
parent | Upgrade unbound library (diff) | |
download | monero-389cd6c466486e670e6f9cd74d2cfdf46f392340.tar.xz |
Merge pull request #2089
a85b5759 Upgrade unbound library (Erik de Castro Lopo)
Diffstat (limited to '')
-rw-r--r-- | external/unbound/dnscrypt/cert.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/external/unbound/dnscrypt/cert.h b/external/unbound/dnscrypt/cert.h new file mode 100644 index 000000000..044f49f26 --- /dev/null +++ b/external/unbound/dnscrypt/cert.h @@ -0,0 +1,32 @@ +#ifndef UNBOUND_DNSCRYPT_CERT_H +#define UNBOUND_DNSCRYPT_CERT_H + +/** + * \file + * certificate type for dnscrypt for use in other header files + */ + +#include <sodium.h> +#define CERT_MAGIC_CERT "DNSC" +#define CERT_MAJOR_VERSION 1 +#define CERT_MINOR_VERSION 0 +#define CERT_OLD_MAGIC_HEADER "7PYqwfzt" + +#define CERT_FILE_EXPIRE_DAYS 365 + +struct SignedCert { + uint8_t magic_cert[4]; + uint8_t version_major[2]; + uint8_t version_minor[2]; + + // Signed Content + uint8_t server_publickey[crypto_box_PUBLICKEYBYTES]; + uint8_t magic_query[8]; + uint8_t serial[4]; + uint8_t ts_begin[4]; + uint8_t ts_end[4]; + uint8_t end[64]; +}; + + +#endif |