]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add some additional comments to the demos
authorMatt Caswell <matt@openssl.org>
Thu, 17 Aug 2023 09:49:17 +0000 (10:49 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 25 Aug 2023 10:42:51 +0000 (11:42 +0100)
Add some additional explanation for some code lines in the demos that did
not have a comment.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21765)

demos/guide/quic-client-block.c
demos/guide/quic-multi-stream.c
doc/man7/ossl-guide-quic-client-block.pod

index be17934f6b519ac57711c4db4d45c26d67f20cd3..be797707f1429be02ef1dd99c0acc709454ba552 100644 (file)
@@ -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
index 67f2f836529c4f89ba7fe94e6e332204201aa1d7..7a40d61ad4529c614de3c38dac5be9197eb2c4b0 100644 (file)
@@ -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
index 10658f9bc8a456c9c137750b573776aee877cb1d..6ae193567f3fbf0f1bff157793ed39b32901eaca 100644 (file)
@@ -222,6 +222,7 @@ is being connected to. In L</Creating the socket and BIO> above we saved that
 address away for future use. Now we need to use it via the
 L<SSL_set1_initial_peer_addr(3)> 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;