[gnutls-help] gnutls_certificate_status_t to text

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Fri Mar 30 07:17:18 CEST 2018


Hi,
 The client example in the manual uses such printing:

https://www.gnutls.org/manual/gnutls.html#Legacy-client-example-with-X_002e509-certificate-support

On March 29, 2018 11:02:15 AM UTC, "Petr Špaček" <petr.spacek at nic.cz> wrote:
>
>
>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
>
>_______________________________________________
>Gnutls-help mailing list
>Gnutls-help at lists.gnutls.org
>http://lists.gnupg.org/mailman/listinfo/gnutls-help

-- 
Sent from my mobile. Please excuse my brevity.



More information about the Gnutls-help mailing list