New functions to check a hostname email or IP address against a
[openssl.git] / apps / s_cb.c
index e339a6c..5a2222e 100644 (file)
@@ -1533,3 +1533,16 @@ void print_ssl_summary(BIO *bio, SSL *s)
                ssl_print_tmp_key(bio, s);
        }
 
+void print_ssl_cert_checks(BIO *bio, SSL *s,
+                               const unsigned char *checkhost,
+                               const unsigned char *checkemail,
+                               const char *checkip)
+       {
+       X509 *peer;
+       peer = SSL_get_peer_certificate(s);
+       if (peer)
+               {
+               print_cert_checks(bio, peer, checkhost, checkemail, checkip);
+               X509_free(peer);
+               }
+       }