1
1
Fork 0
mirror of https://github.com/DNSCrypt/encrypted-dns-server.git synced 2024-05-06 12:06:07 +02:00

Update serde_big_array

This commit is contained in:
Frank Denis 2022-03-28 11:21:12 +02:00
parent 0deb4f4d0b
commit 9e52627655
5 changed files with 5 additions and 11 deletions

View File

@ -43,7 +43,7 @@ rand = "0.8.4"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
serde = "1.0.136" serde = "1.0.136"
serde_derive = "1.0.136" serde_derive = "1.0.136"
serde-big-array = "0.3.2" serde-big-array = "0.4.1"
siphasher = "0.3.9" siphasher = "0.3.9"
tokio = { version = "1.16.1", features = [ tokio = { version = "1.16.1", features = [
"net", "net",

View File

@ -1,6 +1,7 @@
use crate::errors::*; use crate::errors::*;
use libsodium_sys::*; use libsodium_sys::*;
use serde_big_array::BigArray;
use siphasher::sip::SipHasher13; use siphasher::sip::SipHasher13;
use std::ffi::CStr; use std::ffi::CStr;
use std::hash::Hasher; use std::hash::Hasher;
@ -23,8 +24,6 @@ impl Signature {
} }
} }
big_array! { BigArray; crypto_sign_SECRETKEYBYTES as usize }
#[derive(Serialize, Deserialize, Derivative, Clone)] #[derive(Serialize, Deserialize, Derivative, Clone)]
#[derivative(Default)] #[derivative(Default)]
pub struct SignSK( pub struct SignSK(

View File

@ -8,6 +8,7 @@ use byteorder::{BigEndian, ByteOrder};
use clockpro_cache::ClockProCache; use clockpro_cache::ClockProCache;
use parking_lot::Mutex; use parking_lot::Mutex;
use rand::prelude::*; use rand::prelude::*;
use serde_big_array::BigArray;
use std::mem; use std::mem;
use std::slice; use std::slice;
use std::sync::Arc; use std::sync::Arc;
@ -39,8 +40,6 @@ impl DNSCryptCertInner {
} }
} }
big_array! { BigArray; 64 }
#[derive(Derivative, Serialize, Deserialize)] #[derive(Derivative, Serialize, Deserialize)]
#[derivative(Debug, Default, Clone)] #[derivative(Debug, Default, Clone)]
#[repr(C, packed)] #[repr(C, packed)]

View File

@ -9,16 +9,12 @@
#[global_allocator] #[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[macro_use]
extern crate clap;
#[macro_use] #[macro_use]
extern crate derivative; extern crate derivative;
#[macro_use] #[macro_use]
extern crate log; extern crate log;
#[macro_use] #[macro_use]
extern crate serde_derive; extern crate serde_derive;
#[macro_use]
extern crate serde_big_array;
#[cfg(feature = "metrics")] #[cfg(feature = "metrics")]
#[macro_use] #[macro_use]
extern crate prometheus; extern crate prometheus;
@ -509,7 +505,7 @@ fn main() -> Result<(), Error> {
crypto::init()?; crypto::init()?;
let time_updater = coarsetime::Updater::new(1000).start()?; let time_updater = coarsetime::Updater::new(1000).start()?;
let matches = app_from_crate!() let matches = clap::command!()
.arg( .arg(
Arg::new("config") Arg::new("config")
.long("config") .long("config")

View File

@ -76,7 +76,7 @@ pub async fn resolve_udp(
pub async fn resolve_tcp( pub async fn resolve_tcp(
globals: &Globals, globals: &Globals,
packet: &mut Vec<u8>, packet: &mut [u8],
packet_qname: &[u8], packet_qname: &[u8],
tid: u16, tid: u16,
) -> Result<Vec<u8>, Error> { ) -> Result<Vec<u8>, Error> {