diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:03 +0000 |
commit | 932e4432596447eb9331cc2a2bb74a26a35b4efc (patch) | |
tree | 95161711ea07fd64f0c82d6e7943024c033dd5a8 /upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl | |
parent | Adding debian version 4.22.0-1. (diff) | |
download | manpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.tar.xz manpages-l10n-932e4432596447eb9331cc2a2bb74a26a35b4efc.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl')
-rw-r--r-- | upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl b/upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl index d5c5ab1e..b98cd415 100644 --- a/upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl +++ b/upstream/debian-unstable/man3/OSSL_trace_enabled.3ssl @@ -55,7 +55,7 @@ .\" ======================================================================== .\" .IX Title "OSSL_TRACE_ENABLED 3SSL" -.TH OSSL_TRACE_ENABLED 3SSL 2024-02-03 3.1.5 OpenSSL +.TH OSSL_TRACE_ENABLED 3SSL 2024-04-04 3.2.2-dev OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -66,6 +66,7 @@ OSSL_TRACE_BEGIN, OSSL_TRACE_END, OSSL_TRACE_CANCEL, OSSL_TRACE, OSSL_TRACE1, OSSL_TRACE2, OSSL_TRACE3, OSSL_TRACE4, OSSL_TRACE5, OSSL_TRACE6, OSSL_TRACE7, OSSL_TRACE8, OSSL_TRACE9, OSSL_TRACEV, +OSSL_TRACE_STRING, OSSL_TRACE_STRING_MAX, OSSL_trace_string, OSSL_TRACE_ENABLED \&\- OpenSSL Tracing API .SH SYNOPSIS @@ -90,10 +91,16 @@ OSSL_TRACE_ENABLED \& } OSSL_TRACE_END(category); \& \& /* one\-shot trace macros */ +\& OSSL_TRACE(category, text) \& OSSL_TRACE1(category, format, arg1) \& OSSL_TRACE2(category, format, arg1, arg2) \& ... \& OSSL_TRACE9(category, format, arg1, ..., arg9) +\& OSSL_TRACE_STRING(category, text, full, data, len) +\& +\& #define OSSL_TRACE_STRING_MAX 80 +\& int OSSL_trace_string(BIO *out, int text, int full, +\& const unsigned char *data, size_t size); \& \& /* check whether a trace category is enabled */ \& if (OSSL_TRACE_ENABLED(category)) { @@ -155,6 +162,12 @@ Using \fBOSSL_trace_begin()\fR and \fBOSSL_trace_end()\fR to wrap tracing sectio is \fImandatory\fR. The result of trying to produce tracing output outside of such sections is undefined. +.PP +\&\fBOSSL_trace_string()\fR outputs \fIdata\fR of length \fIsize\fR as a string on BIO \fIout\fR. +If \fItext\fR is 0, the function masks any included control characters apart from +newlines and makes sure for nonempty input that the output ends with a newline. +Unless \fIfull\fR is nonzero, the length is limited (with a suitable warning) +to \fBOSSL_TRACE_STRING_MAX\fR characters, which currently is 80. .SS Macros .IX Subsection "Macros" There are a number of convenience macros defined, to make tracing @@ -226,7 +239,7 @@ It expands to: .PP .Vb 3 \& OSSL_TRACE_BEGIN(category) { -\& BIO_printf(trc_out, format, arg1, ..., argN) +\& BIO_printf(trc_out, format, arg1, ..., argN); \& } OSSL_TRACE_END(category) .Ve .PP @@ -234,6 +247,17 @@ Internally, all one-shot macros are implemented using a generic \fBOSSL_TRACEV() macro, since C90 does not support variadic macros. This helper macro has a rather weird synopsis and should not be used directly. .PP +The macro call \f(CW\*(C`OSSL_TRACE_STRING(category, text, full, data, len)\*(C'\fR +outputs \fIdata\fR of length \fIsize\fR as a string +if tracing for the given \fIcategory\fR is enabled. +It expands to: +.PP +.Vb 3 +\& OSSL_TRACE_BEGIN(category) { +\& OSSL_trace_string(trc_out, text, full, data, len); +\& } OSSL_TRACE_END(category) +.Ve +.PP The \fBOSSL_TRACE_ENABLED()\fR macro can be used to conditionally execute some code only if a specific trace category is enabled. In some situations this is simpler than entering a trace section using @@ -339,15 +363,20 @@ operational and enabled, otherwise 0. .PP \&\fBOSSL_trace_begin()\fR returns a \fBBIO\fR pointer if the given \fItype\fR is enabled, otherwise NULL. +.PP +\&\fBOSSL_trace_string()\fR returns the number of characters emitted, or \-1 on error. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBOSSL_trace_set_channel\fR\|(3), \fBOSSL_trace_set_callback\fR\|(3) .SH HISTORY .IX Header "HISTORY" The OpenSSL Tracing API was added in OpenSSL 3.0. +.PP +\&\fBOSSL_TRACE_STRING()\fR, OSSL_TRACE_STRING_MAX, and OSSL_trace_string +were added in OpenSSL 3.2. .SH COPYRIGHT .IX Header "COPYRIGHT" -Copyright 2019\-2022 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2019\-2023 The OpenSSL Project Authors. All Rights Reserved. .PP Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy |