diff --git a/Cargo.toml b/Cargo.toml index 9c03a0e1..338553ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,13 +11,13 @@ repository = "https://github.com/ruma/ruma-signatures" version = "0.4.0" [dependencies] -base64 = "0.5.0" -lazy_static = "0.2.8" -ring = "0.9.4" +base64 = "0.10.0" +lazy_static = "1.2" +ring = "0.13.3" serde = "1.0" serde_json = "1.0" -untrusted = "0.5" -url = "1.4" +untrusted = "0.6.2" +url = "1.7" [dev-dependencies] serde_derive = "1.0" diff --git a/src/lib.rs b/src/lib.rs index 62b6e557..d2c4f9b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -140,7 +140,7 @@ use std::collections::{HashMap, HashSet}; use std::error::Error as StdError; use std::fmt::{Display, Formatter, Result as FmtResult}; -use base64::{CharacterSet, Config, LineWrap, decode_config, encode_config}; +use base64::{CharacterSet, Config, decode_config, encode_config}; use ring::signature::{ED25519, Ed25519KeyPair as RingEd25519KeyPair, verify}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use serde::de::{Error as SerdeError, MapAccess, Unexpected, Visitor}; @@ -155,8 +155,6 @@ lazy_static! { static ref BASE64_CONFIG: Config = Config::new( CharacterSet::Standard, false, - false, - LineWrap::NoWrap, ); } @@ -193,7 +191,7 @@ pub fn to_canonical_json(value: &Value) -> Result { let mut owned_value = value.clone(); { - let mut object = owned_value.as_object_mut().expect("safe since we checked above"); + let object = owned_value.as_object_mut().expect("safe since we checked above"); object.remove("signatures"); object.remove("unsigned"); }