doc/man3: use the documented coding style in the example code
[openssl.git] / doc / man3 / SSL_set1_host.pod
index 3339a0e803b58c05944ff4b5ed884699b17bf17a..9e0210d0622993d928cb564a240fc17145372d3d 100644 (file)
@@ -81,23 +81,20 @@ matched in the certificate (which might be a wildcard) is retrieved,
 and must be copied by the application if it is to be retained beyond
 the lifetime of the SSL connection.
 
-  SSL_set_hostflags(ssl, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
-  if (!SSL_set1_host(ssl, "smtp.example.com")) {
-    /* handle error */
-  }
-  if (!SSL_add1_host(ssl, "example.com")) {
-    /* handle error */
-  }
-
-  /* XXX: Perform SSL_connect() handshake and handle errors here */
-
-  if (SSL_get_verify_result(ssl) == X509_V_OK) {
-      const char *peername = SSL_get0_peername(ssl);
-
-      if (peername != NULL) {
-          /* Name checks were in scope and matched the peername */
-      }
-  }
+ SSL_set_hostflags(ssl, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
+ if (!SSL_set1_host(ssl, "smtp.example.com"))
+     /* error */
+ if (!SSL_add1_host(ssl, "example.com"))
+     /* error */
+
+ /* XXX: Perform SSL_connect() handshake and handle errors here */
+
+ if (SSL_get_verify_result(ssl) == X509_V_OK) {
+     const char *peername = SSL_get0_peername(ssl);
+
+     if (peername != NULL)
+         /* Name checks were in scope and matched the peername */
+ }
 
 =head1 SEE ALSO