Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220216230617.8014-1-me@pedroo.net>
Date: Wed, 16 Feb 2022 23:06:17 +0000
From: me@...roo.net
To: musl@...ts.openwall.com
Cc: pelco <me@...roo.net>
Subject: [PATCH] add missing strerror text for key management.

From: pelco <me@...roo.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@...roo.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.