[gnutls-help] More specific output when an error occurs

Nikos Mavrogiannopoulos nmav at gnutls.org
Thu Sep 14 08:14:58 CEST 2017


On Wed, Sep 13, 2017 at 11:54 AM, Pascal Withopf <pwithopf at adiscon.com> wrote:
>> On Fri, Sep 8, 2017 at 4:46 PM, Pascal Withopf <pwithopf at adiscon.com>
>> wrote:
>> > At the moment rsyslog is giving the quoted text as error, but it is not
>> > sufficient.
>> > I made the experience, that users want to know more in detail what went
>> > wrong.
>> > The error is generic because it only tells you that something went wrong
>> > in
>> > parsing.
>> > But I would like to add the information What went wrong.
>>
>> That's up to application to report correct errors. rsyslog knows that
>> this is an error at the certificate loading routine, and it's a
>> parsing error. Thus it can display something much more user friendly
>> rather than displaying the gnutls error code in isolation.

> How would a more user friendly output look like in your opinion?
> I'm trying to improve it, but at the moment I only get the error code from
> gnutls_certificate_set_x509_key_file() and don't know what I can do with it.

What is the goal of that message? I suppose you want to instruct the
user to go check it for potential problems. That is, if the error code
is GNUTLS_E_PARSING_ERROR, I'd print "There was an issue parsing the
certificate or private key files, please check for potential errors.".
If it is a GNUTLS_E_FILE_ERROR, then you could print in a similar
message that one of the files cannot be accessed.

regards,
Nikos



More information about the Gnutls-help mailing list