Don't check certificate purpose on older GnuTLS
The feature was added in 3.6.0, so avoid compilation errors if building with an older GnuTLS.
This commit is contained in:
parent
49caf6e7c3
commit
a4bdfcfe76
2
utils.c
2
utils.c
@ -847,6 +847,7 @@ _utils_cert_get_status_report(gnutls_x509_crt_t cert, unsigned int status,
|
|||||||
size -= strlen(buf);
|
size -= strlen(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GNUTLS_VERSION_NUMBER >= 0x030600
|
||||||
if (status & GNUTLS_CERT_PURPOSE_MISMATCH) {
|
if (status & GNUTLS_CERT_PURPOSE_MISMATCH) {
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
" %d. The certificate or an intermediate does not match the\n"
|
" %d. The certificate or an intermediate does not match the\n"
|
||||||
@ -854,6 +855,7 @@ _utils_cert_get_status_report(gnutls_x509_crt_t cert, unsigned int status,
|
|||||||
strncat(out, buf, size);
|
strncat(out, buf, size);
|
||||||
size -= strlen(buf);
|
size -= strlen(buf);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user