pub struct XmlPolicy {
pub clock_drifts: (i64, i64),
pub redirect_inflate_max_bytes: usize,
pub limits: XmlLimits,
pub encryption: XmlEncryptionPolicy,
}Expand description
XML parser, redirect decompression, clock, and XML encryption policy.
§Examples
Software RSA key-transport decryption is disabled by default on the
RustCrypto provider because that backend, reached through bergshamra /
kryptering, is affected by RUSTSEC-2023-0071. Enable it only as an
explicit compatibility exception for a RustCrypto deployment that accepts
that risk. AWS-LC and FIPS ignore this opt-in.
use saml_rs::{AcsEndpoint, EntityId, SpConfig, XmlEncryptionPolicy, XmlPolicy};
let xml = XmlPolicy {
encryption: XmlEncryptionPolicy::default()
.with_insecure_software_rsa_key_transport_decryption_allowed(),
..XmlPolicy::default()
};
let sp_builder = SpConfig::builder(EntityId::try_new("https://sp.example.com/metadata")?)
.acs_endpoint(AcsEndpoint::post("https://sp.example.com/acs")?)
.xml(xml);Fields§
§clock_drifts: (i64, i64)Clock drift tolerance (not_before_ms, not_on_or_after_ms).
redirect_inflate_max_bytes: usizeMaximum decoded compressed and inflated raw-DEFLATE bytes accepted for HTTP-Redirect input.
limits: XmlLimitsXML parser resource limits.
encryption: XmlEncryptionPolicyXML encryption behavior.
Trait Implementations§
impl Copy for XmlPolicy
impl Eq for XmlPolicy
impl StructuralPartialEq for XmlPolicy
Auto Trait Implementations§
impl Freeze for XmlPolicy
impl RefUnwindSafe for XmlPolicy
impl Send for XmlPolicy
impl Sync for XmlPolicy
impl Unpin for XmlPolicy
impl UnsafeUnpin for XmlPolicy
impl UnwindSafe for XmlPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more