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:
Pierre Ossman 2019-03-01 11:17:40 +01:00
parent 49caf6e7c3
commit a4bdfcfe76

View File

@ -847,6 +847,7 @@ _utils_cert_get_status_report(gnutls_x509_crt_t cert, unsigned int status,
size -= strlen(buf);
}
#if GNUTLS_VERSION_NUMBER >= 0x030600
if (status & GNUTLS_CERT_PURPOSE_MISMATCH) {
snprintf(buf, sizeof(buf),
" %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);
size -= strlen(buf);
}
#endif
}
static int