onvif-rs icon indicating copy to clipboard operation
onvif-rs copied to clipboard

Certificate validation

Open DmitrySamoylov opened this issue 4 years ago • 2 comments

Some cameras use self-signed cert which cannot be validated by default. Need to either ignore validation or allow passing the cert for communications. Reqwest supports both ways https://docs.rs/reqwest/0.10.4/reqwest/struct.Certificate.html https://docs.rs/reqwest/0.10.4/reqwest/struct.ClientBuilder.html#method.danger_accept_invalid_certs

DmitrySamoylov avatar Apr 30 '20 08:04 DmitrySamoylov

Can we make this a runtime configurable option?

chrisabruce avatar May 06 '20 17:05 chrisabruce

Along with credentials we can pass enum like

enum Cert {
  Cert(String),  // Provided by user (Safe)
  AcceptInvalid, // Accept self-signed (Dangerous)
  None           // Accept CA signed or http-only requests
}

DmitrySamoylov avatar May 06 '20 18:05 DmitrySamoylov