Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/crypto/keying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ impl std::fmt::Debug for KeyingMaterial {

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[allow(non_camel_case_types)]
#[non_exhaustive]
/// Supported SRTP protection profiles (RFC 5764).
pub enum SrtpProfile {
/// SRTP_AES128_CM_HMAC_SHA1_80 (RFC 5764)
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Public error type returned by the high-level DTLS API.

#[derive(Debug)]
#[non_exhaustive]
/// Errors returned by DTLS processing functions.
pub enum Error {
/// Parser requested more data
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ impl fmt::Debug for Dtls {
}

/// Output events produced by the DTLS engine when polled.
#[non_exhaustive]
pub enum Output<'a> {
/// A DTLS record to transmit on the wire.
Packet(&'a [u8]),
Expand Down
3 changes: 3 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl Random {
/// Used for Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.
/// The same named groups are used in both DTLS 1.2 and DTLS 1.3.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum NamedGroup {
/// sect163k1 (deprecated).
Sect163k1,
Expand Down Expand Up @@ -536,6 +537,7 @@ impl PartialOrd for Sequence {
/// separate.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[allow(non_camel_case_types)]
#[non_exhaustive]
pub enum SignatureScheme {
/// ECDSA with P-256 and SHA-256.
ECDSA_SECP256R1_SHA256,
Expand Down Expand Up @@ -700,6 +702,7 @@ impl SignatureScheme {
/// and hash function. Key exchange is negotiated separately via key_share.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[allow(non_camel_case_types)]
#[non_exhaustive]
pub enum Dtls13CipherSuite {
/// TLS_AES_128_GCM_SHA256.
AES_128_GCM_SHA256,
Expand Down
1 change: 1 addition & 0 deletions tests/auto/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn drain_outputs(endpoint: &mut Dtls) -> DrainedOutputs {
result.timeout = Some(t);
break;
}
_ => {}
}
}
result
Expand Down
1 change: 1 addition & 0 deletions tests/dtls12/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ pub fn drain_outputs(endpoint: &mut Dtls) -> DrainedOutputs {
result.timeout = Some(t);
break;
}
_ => {}
}
}
result
Expand Down
1 change: 1 addition & 0 deletions tests/dtls12/fragmentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ fn run_client_server_with_mtu(mtu: usize) -> (usize, usize) {
Output::Timeout(_) => {
continue_polling = false;
}
_ => {}
}
}

Expand Down
2 changes: 2 additions & 0 deletions tests/dtls12/ossl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fn dtls12_ossl_client_handshake() {
// so we stop polling in this iteration
continue_polling = false;
}
_ => {}
}
}

Expand Down Expand Up @@ -315,6 +316,7 @@ fn dtls12_ossl_server_handshake() {
server_received_data.extend_from_slice(data);
}
Output::Timeout(_) => break,
_ => {}
}
}

Expand Down
1 change: 1 addition & 0 deletions tests/dtls13/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn drain_outputs(endpoint: &mut Dtls) -> DrainedOutputs {
result.timeout = Some(t);
break;
}
_ => {}
}
}
result
Expand Down
1 change: 1 addition & 0 deletions tests/dtls13/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ fn dtls13_srtp_keying_material_correct_size() {
SrtpProfile::AEAD_AES_128_GCM => 2 * (16 + 12), // 2 * (key + salt) for AES-128-GCM
SrtpProfile::AEAD_AES_256_GCM => 2 * (32 + 12), // 2 * (key + salt) for AES-256-GCM
SrtpProfile::AES128_CM_SHA1_80 => 2 * (16 + 14), // 2 * (key + salt) for AES-128-CM
_ => unreachable!(),
};

assert_eq!(
Expand Down
1 change: 1 addition & 0 deletions tests/dtls13/wolfssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fn drain_dimpl_outputs(endpoint: &mut Dtls) -> DrainedOutputs {
result.timeout = Some(t);
break;
}
_ => {}
}
}

Expand Down
1 change: 1 addition & 0 deletions tests/ossl/dtls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ fn openssl_name(profile: &SrtpProfile) -> &'static str {
SrtpProfile::AES128_CM_SHA1_80 => "SRTP_AES128_CM_SHA1_80",
SrtpProfile::AEAD_AES_128_GCM => "SRTP_AEAD_AES_128_GCM",
SrtpProfile::AEAD_AES_256_GCM => "SRTP_AEAD_AES_256_GCM",
_ => unreachable!(),
}
}

Expand Down