mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 09:51:46 -05:00
gnutls: removed some code when --disable-verbose is configured
This reduces the binary size and fixes a compile warning.
This commit is contained in:
parent
cbae73e1dd
commit
f761da76f6
@ -211,6 +211,7 @@ int Curl_gtls_cleanup(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||||
static void showtime(struct Curl_easy *data,
|
static void showtime(struct Curl_easy *data,
|
||||||
const char *text,
|
const char *text,
|
||||||
time_t stamp)
|
time_t stamp)
|
||||||
@ -234,6 +235,7 @@ static void showtime(struct Curl_easy *data,
|
|||||||
tm->tm_sec);
|
tm->tm_sec);
|
||||||
infof(data, "%s\n", data->state.buffer);
|
infof(data, "%s\n", data->state.buffer);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static gnutls_datum_t load_file(const char *file)
|
static gnutls_datum_t load_file(const char *file)
|
||||||
{
|
{
|
||||||
@ -962,8 +964,6 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
gnutls_datum_t issuerp;
|
gnutls_datum_t issuerp;
|
||||||
char certbuf[256] = ""; /* big enough? */
|
char certbuf[256] = ""; /* big enough? */
|
||||||
size_t size;
|
size_t size;
|
||||||
unsigned int algo;
|
|
||||||
unsigned int bits;
|
|
||||||
time_t certclock;
|
time_t certclock;
|
||||||
const char *ptr;
|
const char *ptr;
|
||||||
struct Curl_easy *data = conn->data;
|
struct Curl_easy *data = conn->data;
|
||||||
@ -974,6 +974,8 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
#endif
|
#endif
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||||
|
unsigned int algo;
|
||||||
|
unsigned int bits;
|
||||||
gnutls_protocol_t version = gnutls_protocol_get_version(session);
|
gnutls_protocol_t version = gnutls_protocol_get_version(session);
|
||||||
#endif
|
#endif
|
||||||
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
|
||||||
@ -1344,6 +1346,7 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_VERBOSE_STRINGS
|
||||||
/* public key algorithm's parameters */
|
/* public key algorithm's parameters */
|
||||||
algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits);
|
algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits);
|
||||||
infof(data, "\t certificate public key: %s\n",
|
infof(data, "\t certificate public key: %s\n",
|
||||||
@ -1368,12 +1371,13 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size);
|
gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size);
|
||||||
infof(data, "\t issuer: %s\n", certbuf);
|
infof(data, "\t issuer: %s\n", certbuf);
|
||||||
|
|
||||||
gnutls_x509_crt_deinit(x509_cert);
|
|
||||||
|
|
||||||
/* compression algorithm (if any) */
|
/* compression algorithm (if any) */
|
||||||
ptr = gnutls_compression_get_name(gnutls_compression_get(session));
|
ptr = gnutls_compression_get_name(gnutls_compression_get(session));
|
||||||
/* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
|
/* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
|
||||||
infof(data, "\t compression: %s\n", ptr);
|
infof(data, "\t compression: %s\n", ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gnutls_x509_crt_deinit(x509_cert);
|
||||||
|
|
||||||
#ifdef HAS_ALPN
|
#ifdef HAS_ALPN
|
||||||
if(conn->bits.tls_enable_alpn) {
|
if(conn->bits.tls_enable_alpn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user