From: Daniel Gustafsson Date: Sun, 1 May 2022 20:59:25 +0000 (+0200) Subject: gskit: remove unused function set_callback X-Git-Tag: curl-7_83_1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79939ec18a4de4592911ea31bb1969a1a0d2e588;p=thirdparty%2Fcurl.git 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 --- 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) {