Skip to content

Commit

Permalink
remove unused crates
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Mar 23, 2024
1 parent e50d264 commit f1345ed
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 24 deletions.
1 change: 0 additions & 1 deletion rtc-datachannel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sctp = { version = "0.2.0", path = "../rtc-sctp", package = "rtc-sctp" }

bytes = "1.5.0"
log = "0.4.21"
thiserror = "1.0.57"

[dev-dependencies]
env_logger = "0.11.3"
Expand Down
3 changes: 0 additions & 3 deletions rtc-dtls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ shared = { version = "0.2.0", path = "../rtc-shared", package = "rtc-shared", de
bytes = "1.5.0"
byteorder = "1.5.0"
rand_core = "0.6.4"
hkdf = "0.12.4"
p256 = { version = "0.13.2", features = ["default", "ecdh", "ecdsa"] }
p384 = "0.13.0"
rand = "0.8.5"
hmac = "0.12.1"
sec1 = { version = "0.7.3", features = ["std"] }
sha1 = "0.10.6"
sha2 = "0.10.8"
aes = "0.8.4"
Expand All @@ -37,7 +35,6 @@ bincode = "1.3.3"
serde = { version = "1.0.197", features = ["derive"] }
subtle = "2.5.0"
log = "0.4.21"
thiserror = "1.0.57"
pem = { version = "3.0.3", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rtc-dtls/src/handshake/handshake_message_client_hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl fmt::Debug for HandshakeMessageClientHello {
cipher_suites_str += &cipher_suite.to_string();
cipher_suites_str += " ";
}
let s = vec![
let s = [
format!("version: {:?} random: {:?}", self.version, self.random),
format!("cookie: {:?}", self.cookie),
format!("cipher_suites: {cipher_suites_str:?}"),
Expand Down
2 changes: 1 addition & 1 deletion rtc-dtls/src/handshake/handshake_message_server_hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl PartialEq for HandshakeMessageServerHello {

impl fmt::Debug for HandshakeMessageServerHello {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let s = vec![
let s = [
format!("version: {:?} random: {:?}", self.version, self.random),
format!("cipher_suites: {:?}", self.cipher_suite),
format!("compression_method: {:?}", self.compression_method),
Expand Down
1 change: 0 additions & 1 deletion rtc-rtcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ repository = "https://github.com/webrtc-rs/rtc"
shared = { version = "0.2.0", path = "../rtc-shared", package = "rtc-shared", default-features = false, features = ["marshal"] }

bytes = "1.5.0"
thiserror = "1.0.57"
1 change: 0 additions & 1 deletion rtc-rtp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ shared = { version = "0.2.0", path = "../rtc-shared", package = "rtc-shared", de

bytes = "1.5.0"
rand = "0.8.5"
thiserror = "1.0.57"
serde = { version = "1.0.197", features = ["derive"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rtc-sdp/src/description/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub struct MediaName {

impl fmt::Display for MediaName {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let s = vec![
let s = [
self.media.clone(),
self.port.to_string(),
self.protos.join("/"),
Expand Down
2 changes: 0 additions & 2 deletions rtc-srtp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ rtcp = { version = "0.2.0", path = "../rtc-rtcp", package = "rtc-rtcp" }

byteorder = "1.5.0"
bytes = "1.5.0"
thiserror = "1.0.57"
hmac = { version = "0.12.1", features = ["std", "reset"] }
sha1 = "0.10.6"
ctr = "0.9.2"
aes = "0.8.4"
subtle = "2.5.0"
log = "0.4.21"
aead = { version = "0.5.2", features = ["std"] }
aes-gcm = { version = "0.10.3", features = ["std"] }

Expand Down
3 changes: 1 addition & 2 deletions rtc-stun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ base64 = "0.22.0"
subtle = "2.5.0"
crc = "3.0.1"
ring = "0.17.8"
md-5 = "0.10.6"
thiserror = "1.0.57"
md5 = "0.7.0"

[dev-dependencies]
clap = "4.5.2"
Expand Down
8 changes: 2 additions & 6 deletions rtc-stun/src/integrity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::checks::*;
use crate::message::*;
use shared::error::*;

use md5::{Digest, Md5};
use ring::hmac;
use std::fmt;

Expand Down Expand Up @@ -68,11 +67,8 @@ impl MessageIntegrity {
// credentials. Password, username, and realm must be SASL-prepared.
pub fn new_long_term_integrity(username: String, realm: String, password: String) -> Self {
let s = [username, realm, password].join(CREDENTIALS_SEP);

let mut h = Md5::new();
h.update(s.as_bytes());

MessageIntegrity(h.finalize().as_slice().to_vec())
let h = md5::compute(s.as_bytes());
MessageIntegrity(h.to_vec())
}

// new_short_term_integrity returns new MessageIntegrity with key for short-term
Expand Down
4 changes: 0 additions & 4 deletions rtc-turn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ stun = { version = "0.2.0", path = "../rtc-stun", package = "rtc-stun" }

bytes = "1.5.0"
log = "0.4.21"
rand = "0.8.5"
ring = "0.17.8"
md-5 = "0.10.6"
thiserror = "1.0.57"

[dev-dependencies]
env_logger = "0.11.3"
Expand Down
2 changes: 1 addition & 1 deletion rtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ring = "0.17.8"
sha2 = "0.10.8"
hex = "0.4.3"
pem = { version = "3.0.3", optional = true }
cfg-if = "1.0.0"
#cfg-if = "1.0.0"
lazy_static = "1.4.0"
smol_str = { version = "0.2.1", features = ["serde"] }

Expand Down

0 comments on commit f1345ed

Please sign in to comment.