Skip to content

Commit

Permalink
augment get_peer_cert_chain doc to be more similar to get_ciphers
Browse files Browse the repository at this point in the history
  • Loading branch information
jetmore committed Nov 11, 2023
1 parent 9404593 commit ec162b4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/Net/SSLeay.pod
Original file line number Diff line number Diff line change
Expand Up @@ -4158,12 +4158,19 @@ Check openssl doc L<http://www.openssl.org/docs/ssl/SSL_get_peer_certificate.htm

Get the certificate chain of the peer as an array of X509 structures.

my @rv = Net::SSLeay::get_peer_cert_chain($ssl);
my @chain = Net::SSLeay::get_peer_cert_chain($ssl);
# $ssl - value corresponding to openssl's SSL structure
#
# returns: list of X509 structures

Check openssl doc L<http://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html|http://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html>
Example:

my @chain = Net::SSLeay::get_peer_cert_chain($ssl);
foreach my $x509 (@chain) {
print Net::SSLeay::X509_NAME_oneline(Net::SSLeay::X509_get_subject_name($cert)) . "\n";
}

Check openssl doc L<http://www.openssl.org/docs/ssl/SSL_get_peer_cert_chain.html|http://www.openssl.org/docs/ssl/SSL_get_peer_cert_chain.html>

=item * get_quiet_shutdown

Expand Down

0 comments on commit ec162b4

Please sign in to comment.