Remove unnecessary setting SSL_MODE_AUTO_RETRY

Since SSL_MODE_AUTO_RETRY is enabled by default, no need to set
it explicitly.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14742)
diff --git a/apps/cmp.c b/apps/cmp.c
index 2112df0..8a996f6 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -1191,8 +1191,6 @@
     if (ssl_ctx == NULL)
         return NULL;
 
-    SSL_CTX_set_mode(ssl_ctx, SSL_MODE_AUTO_RETRY);
-
     if (opt_tls_trusted != NULL) {
         trust_store = load_certstore(opt_tls_trusted, opt_otherpass,
                                      "trusted TLS certificates", vpm);
diff --git a/apps/ocsp.c b/apps/ocsp.c
index bd509d9..cd3a3bd 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -1202,7 +1202,6 @@
             BIO_printf(bio_err, "Error creating SSL context.\n");
             goto end;
         }
-        SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
     }
 
     resp = (OCSP_RESPONSE *)
diff --git a/apps/s_time.c b/apps/s_time.c
index 6086164..251f16e 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -246,7 +246,6 @@
     if ((ctx = SSL_CTX_new(meth)) == NULL)
         goto end;
 
-    SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
     SSL_CTX_set_quiet_shutdown(ctx, 1);
     if (SSL_CTX_set_min_proto_version(ctx, min_version) == 0)
         goto end;
diff --git a/demos/bio/client-arg.c b/demos/bio/client-arg.c
index 27c4c98..c35b923 100644
--- a/demos/bio/client-arg.c
+++ b/demos/bio/client-arg.c
@@ -80,9 +80,6 @@
         goto end;
     }
 
-    /* Don't want any retries */
-    SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
-
     /* We might want to do other things with ssl here */
 
     BIO_set_conn_hostname(sbio, connect_str);
diff --git a/demos/bio/client-conf.c b/demos/bio/client-conf.c
index 270df37..da6548e 100644
--- a/demos/bio/client-conf.c
+++ b/demos/bio/client-conf.c
@@ -88,9 +88,6 @@
         goto end;
     }
 
-    /* Don't want any retries */
-    SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
-
     /* We might want to do other things with ssl here */
 
     BIO_set_conn_hostname(sbio, connect_str);
diff --git a/doc/man3/BIO_f_ssl.pod b/doc/man3/BIO_f_ssl.pod
index 8eee317..7ed179e 100644
--- a/doc/man3/BIO_f_ssl.pod
+++ b/doc/man3/BIO_f_ssl.pod
@@ -174,9 +174,6 @@
      exit(1);
  }
 
- /* Don't want any retries */
- SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
-
  /* XXX We might want to do other things with ssl here */
 
  /* An empty host part means the loopback address */
@@ -234,7 +231,6 @@
      exit(1);
  }
 
- SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
  bbio = BIO_new(BIO_f_buffer());
  sbio = BIO_push(bbio, sbio);
  acpt = BIO_new_accept("4433");