]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vtls: remove unusued 'check_cxn' from TLS handler struct
authorDaniel Stenberg <daniel@haxx.se>
Wed, 18 Dec 2024 12:54:42 +0000 (13:54 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Dec 2024 13:43:18 +0000 (14:43 +0100)
The last use was removed in 7c5637b8b4

Closes #15775

lib/vtls/bearssl.c
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/rustls.c
lib/vtls/schannel.c
lib/vtls/sectransp.c
lib/vtls/vtls.c
lib/vtls/vtls_int.h
lib/vtls/wolfssl.c

index c3617a4f6be598ebbb941661554d778b7ac1b96b..ac8036b5413bad81b70b764947772c25d6c4804d 100644 (file)
@@ -1157,7 +1157,6 @@ const struct Curl_ssl Curl_ssl_bearssl = {
   NULL,                            /* init */
   NULL,                            /* cleanup */
   bearssl_version,                 /* version */
-  NULL,                            /* check_cxn */
   bearssl_shutdown,                /* shutdown */
   bearssl_data_pending,            /* data_pending */
   bearssl_random,                  /* random */
index 4d48618441b2d33a9361df76c15ae5350113f3bc..6ef5f863640d9de3758d5b53be978e019d25add4 100644 (file)
@@ -2269,7 +2269,6 @@ const struct Curl_ssl Curl_ssl_gnutls = {
   gtls_init,                     /* init */
   gtls_cleanup,                  /* cleanup */
   gtls_version,                  /* version */
-  NULL,                          /* check_cxn */
   gtls_shutdown,                 /* shutdown */
   gtls_data_pending,             /* data_pending */
   gtls_random,                   /* random */
index 8e128df67026e60387ec4698c6ecea1572c6e01d..60f2c0797db2c28be2afb61eaaf7933a8bf44557 100644 (file)
@@ -1643,7 +1643,6 @@ const struct Curl_ssl Curl_ssl_mbedtls = {
   mbedtls_init,                     /* init */
   mbedtls_cleanup,                  /* cleanup */
   mbedtls_version,                  /* version */
-  NULL,                             /* check_cxn */
   mbedtls_shutdown,                 /* shutdown */
   mbedtls_data_pending,             /* data_pending */
   mbedtls_random,                   /* random */
index 39a7c5987e6879f992fd0cca3ec13c39e140a253..b4182aeea033a8acc215b9a2e3598a020c168504 100644 (file)
@@ -5337,7 +5337,6 @@ const struct Curl_ssl Curl_ssl_openssl = {
   ossl_init,                /* init */
   ossl_cleanup,             /* cleanup */
   ossl_version,             /* version */
-  NULL,                     /* check_cxn */
   ossl_shutdown,            /* shutdown */
   ossl_data_pending,        /* data_pending */
   ossl_random,              /* random */
index 4b844973a3af7d2e6022f4e52ff54c829cfce728..4e42c407a7b1223c4a7cdd922ef1b477d6dccf2d 100644 (file)
@@ -1079,7 +1079,6 @@ const struct Curl_ssl Curl_ssl_rustls = {
   NULL,                            /* init */
   NULL,                            /* cleanup */
   cr_version,                      /* version */
-  NULL,                            /* check_cxn */
   cr_shutdown,                     /* shutdown */
   cr_data_pending,                 /* data_pending */
   cr_random,                       /* random */
index 1ca790615cb6df2a07c84d123a2bec9d99676e56..108c1433621ae3fbf90b6c4c5d26809858b33790 100644 (file)
@@ -2798,7 +2798,6 @@ const struct Curl_ssl Curl_ssl_schannel = {
   schannel_init,                     /* init */
   schannel_cleanup,                  /* cleanup */
   schannel_version,                  /* version */
-  NULL,                              /* check_cxn */
   schannel_shutdown,                 /* shutdown */
   schannel_data_pending,             /* data_pending */
   schannel_random,                   /* random */
index e587c2de712ac02032fe4b6724bd702dc0458fc1..08343cdb9687ad187c382fda7e8fc44a85f754ea 100644 (file)
@@ -2752,7 +2752,6 @@ const struct Curl_ssl Curl_ssl_sectransp = {
   NULL,                               /* init */
   NULL,                               /* cleanup */
   sectransp_version,                  /* version */
-  NULL,                               /* check_cxn */
   sectransp_shutdown,                 /* shutdown */
   sectransp_data_pending,             /* data_pending */
   sectransp_random,                   /* random */
index 8fbdb8d07fce70344e31b70c36231bfe6a74b642..2b9ed9f431a81dbf06cdf85b56335ab72e63687c 100644 (file)
@@ -1284,7 +1284,6 @@ static const struct Curl_ssl Curl_ssl_multi = {
   multissl_init,                     /* init */
   NULL,                              /* cleanup */
   multissl_version,                  /* version */
-  NULL,                              /* check_cxn */
   NULL,                              /* shutdown */
   NULL,                              /* data_pending */
   NULL,                              /* random */
@@ -1825,30 +1824,9 @@ static CURLcode ssl_cf_query(struct Curl_cfilter *cf,
 static bool cf_ssl_is_alive(struct Curl_cfilter *cf, struct Curl_easy *data,
                             bool *input_pending)
 {
-  int result = -1;
   /*
    * This function tries to determine connection status.
-   *
-   * Return codes:
-   *     1 means the connection is still in place
-   *     0 means the connection has been closed
-   *    -1 means the connection status is unknown
    */
-  if(Curl_ssl->check_cxn) {
-    struct cf_call_data save;
-    CF_DATA_SAVE(save, cf, data);
-    result = Curl_ssl->check_cxn(cf, data);
-    CF_DATA_RESTORE(cf, save);
-  }
-  if(result > 0) {
-    *input_pending = TRUE;
-    return TRUE;
-  }
-  if(result == 0) {
-    *input_pending = FALSE;
-    return FALSE;
-  }
-  /* ssl backend does not know */
   return cf->next ?
     cf->next->cft->is_alive(cf->next, data, input_pending) :
     FALSE; /* pessimistic in absence of data */
index 4b205c644360cdeb831b16aeaeab05a9e14d44fb..d388a612a885cbba7b57cf364aaf93cc475fc2f6 100644 (file)
@@ -142,7 +142,6 @@ struct Curl_ssl {
   void (*cleanup)(void);
 
   size_t (*version)(char *buffer, size_t size);
-  int (*check_cxn)(struct Curl_cfilter *cf, struct Curl_easy *data);
   CURLcode (*shut_down)(struct Curl_cfilter *cf, struct Curl_easy *data,
                         bool send_shutdown, bool *done);
   bool (*data_pending)(struct Curl_cfilter *cf,
index 89e1fa20fa9a6ed29ed11bb31beff98b17cef3ec..2ed1bb1fb911ea736889c04309773560192ef286 100644 (file)
@@ -2031,7 +2031,6 @@ const struct Curl_ssl Curl_ssl_wolfssl = {
   wolfssl_init,                    /* init */
   wolfssl_cleanup,                 /* cleanup */
   wolfssl_version,                 /* version */
-  NULL,                            /* check_cxn */
   wolfssl_shutdown,                /* shutdown */
   wolfssl_data_pending,            /* data_pending */
   wolfssl_random,                  /* random */