mailing list of musl libc
 help / color / mirror / code / Atom feed
From: me@pedroo.net
To: musl@lists.openwall.com
Cc: pelco <me@pedroo.net>
Subject: [musl] [PATCH] add missing strerror text for key management.
Date: Wed, 16 Feb 2022 23:06:17 +0000	[thread overview]
Message-ID: <20220216230617.8014-1-me@pedroo.net> (raw)

From: pelco <me@pedroo.net>

These error code messages are useful when dealing with public-private
keys and client-server applications.

I have been working on client applications that use libcurl to
communicate with a server. Usually, to access the APIs, clients have
to provide a secret key that the server can revoke or reject
(e.g., HTTP 401). Furthermore, we use OpenSSL to generate private keys
and x509 certificates and periodically check for their expiration time.
It would be nice to log the correct text message instead of "No error
information" when using strerror.

Signed-off-by: pelco <me@pedroo.net>
---
 src/errno/__strerror.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/errno/__strerror.h b/src/errno/__strerror.h
index 2d992da5..14925907 100644
--- a/src/errno/__strerror.h
+++ b/src/errno/__strerror.h
@@ -102,3 +102,7 @@ E(EDQUOT,       "Quota exceeded")
 E(ENOMEDIUM,    "No medium found")
 E(EMEDIUMTYPE,  "Wrong medium type")
 E(EMULTIHOP,    "Multihop attempted")
+E(ENOKEY,       "Required key not available")
+E(EKEYEXPIRED,  "Key has expired")
+E(EKEYREVOKED,  "Key has been revoked")
+E(EKEYREJECTED, "Key was rejected by service")
-- 
2.17.1


                 reply	other threads:[~2022-02-16 23:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220216230617.8014-1-me@pedroo.net \
    --to=me@pedroo.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).