SWI-Prolog Did You Know Did you know? SWI-Prolog has lots of useful Packages Search Documentation:
Predicate ssl_peer_certificate/2