1SSL_get_peer_cert_chain(3)          OpenSSL         SSL_get_peer_cert_chain(3)
2
3
4

NAME

6       SSL_get_peer_cert_chain - get the X509 certificate chain of the peer
7

SYNOPSIS

9        #include <openssl/ssl.h>
10
11        STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *ssl);
12

DESCRIPTION

14       SSL_get_peer_cert_chain() returns a pointer to STACK_OF(X509)
15       certificates forming the certificate chain of the peer. If called on
16       the client side, the stack also contains the peer's certificate; if
17       called on the server side, the peer's certificate must be obtained
18       separately using SSL_get_peer_certificate(3).  If the peer did not
19       present a certificate, NULL is returned.
20

NOTES

22       The peer certificate chain is not necessarily available after reusing a
23       session, in which case a NULL pointer is returned.
24
25       The reference count of the STACK_OF(X509) object is not incremented.
26       If the corresponding session is freed, the pointer must not be used any
27       longer.
28

RETURN VALUES

30       The following return values can occur:
31
32       NULL
33           No certificate was presented by the peer or no connection was
34           established or the certificate chain is no longer available when a
35           session is reused.
36
37       Pointer to a STACK_OF(X509)
38           The return value points to the certificate chain presented by the
39           peer.
40

SEE ALSO

42       ssl(3), SSL_get_peer_certificate(3)
43
44
45
461.0.2o                            2019-09-10        SSL_get_peer_cert_chain(3)
Impressum