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        STACKOF(X509) *SSL_get_peer_cert_chain(const SSL *ssl);
12

DESCRIPTION

14       SSL_get_peer_cert_chain() returns a pointer to STACKOF(X509) certifi‐
15       cates forming the certificate chain of the peer. If called on the
16       client side, the stack also contains the peer's certificate; if called
17       on the server side, the peer's certificate must be obtained separately
18       using SSL_get_peer_certificate(3).  If the peer did not present a cer‐
19       tificate, 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 STACKOF(X509) object is not incremented.  If
26       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 STACKOF(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
460.9.8b                            2005-03-30        SSL_get_peer_cert_chain(3)
Impressum