Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/developer-guide/api/functions/TSSslClientContext.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ Server source distribution. It demonstrates how to use :func:`TSSslClientContext

.. literalinclude:: ../../../../example/plugins/c-api/client_context_dump/client_context_dump.cc
:language: c
:lines: 137-145
:lines: 154-166


.. literalinclude:: ../../../../example/plugins/c-api/client_context_dump/client_context_dump.cc
:language: c
:lines: 51-55
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ asn1_string_extract(ASN1_STRING *s)
void
dump_context(const char *ca_path, const char *ck_path)
{
SSL_CTX *ctx = reinterpret_cast<SSL_CTX *>(TSSslClientContextFindByName(ca_path, ck_path));
TSSslContext ctx = TSSslClientContextFindByName(ca_path, ck_path);
if (ctx) {
SSL *s = SSL_new(ctx);
SSL *s = SSL_new(reinterpret_cast<SSL_CTX *>(ctx));
if (s) {
char *data = nullptr;
long length = 0;
Expand Down Expand Up @@ -137,6 +137,7 @@ dump_context(const char *ca_path, const char *ck_path)
}
}
SSL_free(s);
TSSslContextDestroy(ctx);
}
}

Expand Down