Rust Requires Chilkat v11.0.0+
Rust
Example: Http.GetServerCert method
Demonstrates how to call the GetServerCert method.Chilkat Rust Downloads
let http = chilkat::Http::new();
let cert = chilkat::Cert::new();
if http.get_server_cert("chilkatsoft.com", 443, &cert).is_err() {
println!("{}", http.last_error_text());
return;
}
println!("{}", cert.subject_dn());
println!("{}", cert.valid_to_str());
// Output:
// CN=*.chilkatsoft.com
// Wed, 10 Jun 2026 23:59:59 GMT