Use randomness not entropy
[openssl.git] / doc / man3 / BIO_f_ssl.pod
index 48bc150c06e7b8dfaeba0ba69c9a291b0d15ceb9..1da14897f038d62dca11236af062fa30b4069521 100644 (file)
@@ -9,10 +9,10 @@ BIO_get_num_renegotiates, BIO_set_ssl_renegotiate_timeout, BIO_new_ssl,
 BIO_new_ssl_connect, BIO_new_buffer_ssl_connect, BIO_ssl_copy_session_id,
 BIO_ssl_shutdown - SSL BIO
 
-=for comment multiple includes
-
 =head1 SYNOPSIS
 
+=for comment multiple includes
+
  #include <openssl/bio.h>
  #include <openssl/ssl.h>
 
@@ -170,15 +170,15 @@ unencrypted example in L<BIO_s_connect(3)>.
      exit(1);
  }
  if (BIO_do_handshake(sbio) <= 0) {
-        fprintf(stderr, "Error establishing SSL connection\n");
-        ERR_print_errors_fp(stderr);
-        exit(1);
+     fprintf(stderr, "Error establishing SSL connection\n");
+     ERR_print_errors_fp(stderr);
+     exit(1);
  }
 
  /* XXX Could examine ssl here to get connection info */
 
  BIO_puts(sbio, "GET / HTTP/1.0\n\n");
- for ( ; ; ) {
+ for (;;) {
      len = BIO_read(sbio, tmpbuf, 1024);
      if (len <= 0)
          break;
@@ -241,12 +241,6 @@ a client and also echoes the request to standard output.
      exit(1);
  }
 
- if (BIO_do_accept(acpt) <= 0) {
-     fprintf(stderr, "Error in connection\n");
-     ERR_print_errors_fp(stderr);
-     exit(1);
- }
-
  /* We only want one connection so remove and free accept BIO */
  sbio = BIO_pop(acpt);
  BIO_free_all(acpt);
@@ -261,7 +255,7 @@ a client and also echoes the request to standard output.
  BIO_puts(sbio, "\r\nConnection Established\r\nRequest headers:\r\n");
  BIO_puts(sbio, "--------------------------------------------------\r\n");
 
- for ( ; ; ) {
+ for (;;) {
      len = BIO_gets(sbio, tmpbuf, 1024);
      if (len <= 0)
          break;