[][src]Function caramel_client::certs::verify_cert

pub fn verify_cert(
    cert_data: &[u8],
    ca_cert_data: &[u8],
    private_key_data: &[u8],
    client_id: &str
) -> Result<(), CcError>

Verify that the CA certificate we downloaded matches what we want checks.

  1. Private key corresponds to public key in the cert.
  2. Subject/ Common name in certificate matches our client id.
  3. Certificate signature was signed by our expected CA certificate.

Errors

  • CcError if CA certificate does not match or cannot be valided.