From 79939ec18a4de4592911ea31bb1969a1a0d2e588 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Sun, 1 May 2022 22:59:25 +0200 Subject: [PATCH] gskit: remove unused function set_callback 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 --- lib/vtls/gskit.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index 9b5fbe4dd6..43456172a3 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -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) { -- 2.47.3