From: Matt Caswell Date: Thu, 17 Aug 2023 09:49:17 +0000 (+0100) Subject: Add some additional comments to the demos X-Git-Tag: openssl-3.2.0-alpha1~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d74a1316025a4730f18674ccf187c3d630d7c92;p=thirdparty%2Fopenssl.git Add some additional comments to the demos Add some additional explanation for some code lines in the demos that did not have a comment. Reviewed-by: Tomas Mraz Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/21765) --- diff --git a/demos/guide/quic-client-block.c b/demos/guide/quic-client-block.c index be17934f6b5..be797707f14 100644 --- a/demos/guide/quic-client-block.c +++ b/demos/guide/quic-client-block.c @@ -202,11 +202,13 @@ int main(void) goto end; } + /* Set the IP address of the remote peer */ if (!SSL_set1_initial_peer_addr(ssl, peer_addr)) { printf("Failed to set the initial peer address\n"); goto end; } + /* Connect to the server and perform the TLS handshake */ if ((ret = SSL_connect(ssl)) < 1) { /* * If the failure is due to a verification error we can get more diff --git a/demos/guide/quic-multi-stream.c b/demos/guide/quic-multi-stream.c index 67f2f836529..7a40d61ad45 100644 --- a/demos/guide/quic-multi-stream.c +++ b/demos/guide/quic-multi-stream.c @@ -214,11 +214,13 @@ int main(void) goto end; } + /* Set the IP address of the remote peer */ if (!SSL_set_initial_peer_addr(ssl, peer_addr)) { printf("Failed to set the initial peer address\n"); goto end; } + /* Connect to the server and perform the TLS handshake */ if ((ret = SSL_connect(ssl)) < 1) { /* * If the failure is due to a verification error we can get more diff --git a/doc/man7/ossl-guide-quic-client-block.pod b/doc/man7/ossl-guide-quic-client-block.pod index 10658f9bc8a..6ae193567f3 100644 --- a/doc/man7/ossl-guide-quic-client-block.pod +++ b/doc/man7/ossl-guide-quic-client-block.pod @@ -222,6 +222,7 @@ is being connected to. In L above we saved that address away for future use. Now we need to use it via the L function. + /* Set the IP address of the remote peer */ if (!SSL_set1_initial_peer_addr(ssl, peer_addr)) { printf("Failed to set the initial peer address\n"); goto end;