summaryrefslogtreecommitdiffstats
path: root/doc/man3/SSL_set1_host.pod
diff options
context:
space:
mode:
authorBeat Bolli <dev@drbeat.li>2016-11-19 00:10:05 +0100
committerMatt Caswell <matt@openssl.org>2017-06-08 11:54:15 +0100
commit2947af32a0ec6666efd5b287ac4609ba3a984f0d (patch)
tree7f024902fa2741965c415283a734267fcd083976 /doc/man3/SSL_set1_host.pod
parent52df25cf2e656146cb3b206d8220124f0417d03f (diff)
doc/man3: use the documented coding style in the example code
Adjust brace placement, whitespace after keywords, indentation and empty lines after variable declarations according to https://www.openssl.org/policies/codingstyle.html. Indent literal sections by exactly one space. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1956)
Diffstat (limited to 'doc/man3/SSL_set1_host.pod')
-rw-r--r--doc/man3/SSL_set1_host.pod31
1 files changed, 14 insertions, 17 deletions
diff --git a/doc/man3/SSL_set1_host.pod b/doc/man3/SSL_set1_host.pod
index 3339a0e803..9e0210d062 100644
--- a/doc/man3/SSL_set1_host.pod
+++ b/doc/man3/SSL_set1_host.pod
@@ -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