[gnutls-help] gnutls_certificate_status_t to text
Petr Špaček
petr.spacek at nic.cz
Thu Mar 29 13:02:15 CEST 2018
On 29.3.2018 12:17, Jeremy Harris wrote:
> On 29/03/18 10:41, Petr Špaček wrote:
>> is there a recommended way to transform non-zero
>> gnutls_certificate_status_t value returned by
>> gnutls-certificate-verify-peers3 to text, which can be displayed to user?
>
>
> [guile/src/enum-map.i.c]
>
> static const char *
> scm_gnutls_certificate_status_to_c_string (gnutls_certificate_status_t
> c_obj)
> {
> static const struct { gnutls_certificate_status_t value; const char
> *name; } table[] =
> {
> { GNUTLS_CERT_INVALID, "invalid" },
> { GNUTLS_CERT_REVOKED, "revoked" },
> { GNUTLS_CERT_SIGNER_NOT_FOUND, "signer-not-found" },
> { GNUTLS_CERT_SIGNER_NOT_CA, "signer-not-ca" },
> { GNUTLS_CERT_INSECURE_ALGORITHM, "insecure-algorithm" },
> };
Hmm, I was hoping for something more developer-friendly than custom code.
Nikos, could you please API for this to one of further versions?
Thank you!
--
Petr Špaček @ CZ.NIC
More information about the Gnutls-help
mailing list