aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/dnscrypt/cert.h
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2017-06-16 20:16:05 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2017-06-17 23:04:00 +1000
commita85b5759f34c0c4110a479a8b5fa606f15ed9b23 (patch)
tree518cb8346249a42fd2aa8a78c09c3631e14db6aa /external/unbound/dnscrypt/cert.h
parentMerge pull request #2059 (diff)
downloadmonero-a85b5759f34c0c4110a479a8b5fa606f15ed9b23.tar.xz
Upgrade unbound library
These files were pulled from the 1.6.3 release tarball. This new version builds against OpenSSL version 1.1 which will be the default in the new Debian Stable which is due to be released RealSoonNow (tm).
Diffstat (limited to 'external/unbound/dnscrypt/cert.h')
-rw-r--r--external/unbound/dnscrypt/cert.h32
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