Get website ssl certificate details using rust

Greetings

I'm trying to write a zabbix loadable module in rust that implements a zabbix item to check SSL certificate expiry date of a website.

I tried to use rust hyper crate to do this. I use hyper to connect to a website, and i can access response http headers, body etc. but i cant find a way to access https handshake information, or any certificate information for that matter. I read hyper documentation, but i believe there's no information there on how to get website SSL certificate details.

Is there a way to do this in Rust?

I'm a begginner to rust. I could do this by writing a python script (and pass return value to zabbix), but since I'm trying to learn rust, i want to do this using rust.

Any help is appreciated.

Perhaps look at libssl (and related documentation), then use an FFI. There is a rust-openssl project, plus this may be of some help.

Thank you @pastoraleman, this set me on the right track.
I'll try the Foreign Function Interface with libssl, i think i'll learn more this way.