简体   繁体   中英

Print an x509 certificate c++

I have an x509 certificate pointer like x509* cert = SSL_get_peer_certificate(connection);

What is the function that I should use to print the complete certificate?

X509_NAME_print_ex系列功能就是您的答案

X509_print and X509_print_fp is a simpler choice if you want to print all certificate data. Link to docs

This will print the certificate to console

PEM_write_X509(stdout, peer);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM