Remove unnecessary setting SSL_MODE_AUTO_RETRY
authorNan Xiao <nan@chinadtrace.org>
Tue, 30 Mar 2021 08:30:47 +0000 (16:30 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 7 Apr 2021 11:02:37 +0000 (13:02 +0200)
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)

apps/cmp.c
apps/ocsp.c
apps/s_time.c
demos/bio/client-arg.c
demos/bio/client-conf.c
doc/man3/BIO_f_ssl.pod

index 2112df0186473ff83911e1fdbbbc0474da41eb1c..8a996f6dce533182270d5c18a0d513141d273b24 100644 (file)
@@ -1191,8 +1191,6 @@ static SSL_CTX *setup_ssl_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
     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);
index bd509d98a760e8d6513d9d0ebd483402ddd1b401..cd3a3bd6952e09745062e43714dc859f1fde60ca 100644 (file)
@@ -1202,7 +1202,6 @@ OCSP_RESPONSE *process_responder(OCSP_REQUEST *req,
             BIO_printf(bio_err, "Error creating SSL context.\n");
             goto end;
         }
-        SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
     }
 
     resp = (OCSP_RESPONSE *)
index 60861642f5448763436baa077e22f7c9eef91082..251f16ebc331ba739ca1c9a94a25ea059f544f12 100644 (file)
@@ -246,7 +246,6 @@ int s_time_main(int argc, char **argv)
     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;
index 27c4c98f966483d78743102edd0c0ddcfaa4ecd4..c35b9233a4aad7d1859e7da1177eb1ecd36b21aa 100644 (file)
@@ -80,9 +80,6 @@ int main(int argc, char **argv)
         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);
index 270df377e7dbcd4421426216744fe0123056cc14..da6548e6a326e12143cfd6cad2091f4fe1dfe65e 100644 (file)
@@ -88,9 +88,6 @@ int main(int argc, char **argv)
         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);
index 8eee317c7adf22064f3c33bdfc9a456c3dc11190..7ed179e4539876c68b35a7b8791a505c762b35a9 100644 (file)
@@ -174,9 +174,6 @@ unencrypted example in L<BIO_s_connect(3)>.
      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 @@ a client and also echoes the request to standard output.
      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");