Skip to content

Commit

Permalink
jose-jws: remove broken url feature
Browse files Browse the repository at this point in the history
It was never actually declared properly in Cargo.toml and therefore
never worked (and therefore this is not actually a breaking change), but
also the code behind the feature does not otherwise compile, even if a
proper `url` optional dependency is added.
  • Loading branch information
tarcieri committed Sep 5, 2024
1 parent 58d2bd7 commit 3566b73
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions jose-jws/src/head.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ pub struct Protected {
#[serde(skip_serializing_if = "Option::is_none", default)]
pub crit: Option<Vec<String>>,

/// RFC 8555 Section 6.4.1
#[cfg(feature = "url")]
#[serde(skip_serializing_if = "Option::is_none", default)]
pub url: Option<url::Url>,

/// RFC 8555 Section 6.5.2
#[serde(skip_serializing_if = "Option::is_none", default)]
pub nonce: Option<Bytes>,
Expand All @@ -52,9 +47,7 @@ impl Default for Protected {
nonce: None,
b64: true,
oth: Unprotected::default(),

#[cfg(feature = "url")]
url: None,
oth: Unprotected::default(),
}
}
}
Expand All @@ -66,11 +59,6 @@ pub struct Unprotected {
#[serde(skip_serializing_if = "Option::is_none", default)]
pub alg: Option<Signing>,

/// RFC 7515 Section 4.1.2
#[cfg(feature = "url")]
#[serde(skip_serializing_if = "Option::is_none", default)]
pub jku: Option<url::Url>,

/// RFC 7515 Section 4.1.3
#[serde(skip_serializing_if = "Option::is_none", default)]
pub jwk: Option<Jwk>,
Expand All @@ -79,11 +67,6 @@ pub struct Unprotected {
#[serde(skip_serializing_if = "Option::is_none", default)]
pub kid: Option<String>,

/// RFC 7515 Section 4.1.5
#[serde(skip_serializing_if = "Option::is_none", default)]
#[cfg(feature = "url")]
pub x5u: Option<url::Url>,

/// RFC 7515 Section 4.1.6
#[serde(skip_serializing_if = "Option::is_none", default)]
pub x5c: Option<Vec<Bytes<Box<[u8]>, Base64>>>, // base64, not base64url
Expand Down

0 comments on commit 3566b73

Please sign in to comment.