Possibly a dumb question, but when using okhttp is...
# squarelibraries
c
Possibly a dumb question, but when using okhttp is there a way to view the expiration date of the tls cert? Weird ask/requirement from my security team is to build something in the app where you can see the exp date of tls certs, and I'm kinda out of my league when it comes to tls/certs. I do think this is a super weird request though.
a
Something like this might work? I didn't test exactly this code, but when I put it in an interceptor it returned a reasonable result
✔️ 2
e
that looks right. if you're going to do this in many places, I would consider adding an interceptor that extracts the TLS information you care about and converts them to internal headers that are easier to consume, e.g. https://github.com/google/conscrypt/pull/619
c
Thanks!