]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gskit: remove unused function set_callback
authorDaniel Gustafsson <daniel@yesql.se>
Sun, 1 May 2022 20:59:25 +0000 (22:59 +0200)
committerDaniel Gustafsson <daniel@yesql.se>
Sun, 1 May 2022 20:59:25 +0000 (22:59 +0200)
This function has been unused since the initial commit of the GSKit
backend in 0eba02fd4.  The motivation for the code was getting the
whole certificate chain: the only place where the latter is available
is as a callback parameter.  Unfortunately it is not possible to pass
a user pointer to this callback, which precludes the possibility to
associate the cert chain with a data/conn structure.

For further information, search for pgsk_cert_validation_callback on:
https://www.ibm.com/docs/api/v1/content/ssw_ibm_i_71/apis/gsk_attribute_set_callback.htm

As the upstream library never added a parameter like that to the API,
we give up the wait and remove the dead code.

Closes: #8782
Reviewed-by: Patrick Monnerat <patrick@monnerat.net>
lib/vtls/gskit.c

index 9b5fbe4dd628f1332e6190d6b2cf5687cdd06340..43456172a39bebace2ef5a90df64e5dfaac5b0ca 100644 (file)
@@ -293,27 +293,6 @@ static CURLcode set_numeric(struct Curl_easy *data,
 }
 
 
-static CURLcode set_callback(struct Curl_easy *data,
-                             gsk_handle h, GSK_CALLBACK_ID id, void *info)
-{
-  char buffer[STRERROR_LEN];
-  int rc = gsk_attribute_set_callback(h, id, info);
-
-  switch(rc) {
-  case GSK_OK:
-    return CURLE_OK;
-  case GSK_ERROR_IO:
-    failf(data, "gsk_attribute_set_callback() I/O error: %s",
-          Curl_strerror(errno, buffer, sizeof(buffer)));
-    break;
-  default:
-    failf(data, "gsk_attribute_set_callback(): %s", gsk_strerror(rc));
-    break;
-  }
-  return CURLE_SSL_CONNECT_ERROR;
-}
-
-
 static CURLcode set_ciphers(struct Curl_easy *data,
                             gsk_handle h, unsigned int *protoflags)
 {