mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #6273 from anhu/wolfSSL_get_chain_cert
Documentation fixup for wolfSSL_get_chain_cert();
This commit is contained in:
@ -6368,6 +6368,9 @@ unsigned char* wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN* chain, int idx);
|
|||||||
memory SESSION_CACHE.
|
memory SESSION_CACHE.
|
||||||
\param idx the index of the WOLFSSL_X509 certificate.
|
\param idx the index of the WOLFSSL_X509 certificate.
|
||||||
|
|
||||||
|
Note that it is the user's responsibility to free the returned memory
|
||||||
|
by calling wolfSSL_FreeX509().
|
||||||
|
|
||||||
_Example_
|
_Example_
|
||||||
\code
|
\code
|
||||||
WOLFSSL_X509_CHAIN* chain = &session->chain;
|
WOLFSSL_X509_CHAIN* chain = &session->chain;
|
||||||
@ -6377,9 +6380,10 @@ unsigned char* wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN* chain, int idx);
|
|||||||
prt = wolfSSL_get_chain_X509(chain, idx);
|
prt = wolfSSL_get_chain_X509(chain, idx);
|
||||||
|
|
||||||
if(ptr != NULL){
|
if(ptr != NULL){
|
||||||
//ptr contains the cert at the index specified
|
// ptr contains the cert at the index specified
|
||||||
|
wolfSSL_FreeX509(ptr);
|
||||||
} else {
|
} else {
|
||||||
// ptr is NULL
|
// ptr is NULL
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user