I have created a server with TLS and I need to read the certificate used by the client (the client code is also made by me). I have read that I can use the
ssl.session->peer_cert object, but I get the message
Certificate is uninitialised! when I use
mbedtls_x509_crt_info. I have also defined the macro
Basically what I need is to validate the client certificate, check that the certificate issuer is trusted and the expiration date has not been reached or is close to being reached.
I am reading code and following breakponts in debugging, but if someone could shed some light I would appreciate it, I have just recently started with MbedTLS.