rustls::crypto

Function verify_tls12_signature

source
pub fn verify_tls12_signature(
    message: &[u8],
    cert: &CertificateDer<'_>,
    dss: &DigitallySignedStruct,
    supported_schemes: &WebPkiSupportedAlgorithms,
) -> Result<HandshakeSignatureValid, Error>
Expand description

Verify a message signature using the cert public key and any supported scheme.

This function verifies the dss signature over message using the subject public key from cert. Since TLS 1.2 doesn’t provide enough information to map the dss.scheme into a single SignatureVerificationAlgorithm, this function will map to several candidates and try each in succession until one succeeds or we exhaust all candidates.

See WebPkiSupportedAlgorithms::mapping for more information.