Skip to content

Commit

Permalink
fix stun test and example
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Jun 2, 2024
1 parent 4bee644 commit 6d7794d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rtc-stun/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ring = "0.17.8"
md5 = "0.7.0"

[dev-dependencies]
clap = "4.5.2"
clap = { version = "4.5.2", features = ["derive"] }
criterion = "0.5.1"

[[bench]]
Expand Down
12 changes: 12 additions & 0 deletions rtc-stun/src/integrity/integrity_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ use crate::textattrs::TextAttribute;

#[test]
fn test_message_integrity_add_to_simple() -> Result<()> {
{
let i = MessageIntegrity::new_long_term_integrity(
"user".to_owned(),
"realm".to_owned(),
"passsss".to_owned(),
);
let expected = vec![
104, 228, 91, 113, 61, 154, 222, 34, 101, 61, 181, 146, 177, 90, 4, 29,
];
assert_eq!(i.0, expected, "{}", Error::ErrIntegrityMismatch);
}

let i = MessageIntegrity::new_long_term_integrity(
"user".to_owned(),
"realm".to_owned(),
Expand Down

0 comments on commit 6d7794d

Please sign in to comment.