summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-16 10:52:11 +0200
committerSimon Josefsson <simon@josefsson.org>2008-10-28 08:08:43 +0100
commit25808948f769e7b26ebd3f8e4c9e345eeed9080f (patch)
tree5938ad85455fcdc304645bbf1a5ed4221965badd
parent9ece108bfd7ceedaac6cfe0f202f1526bcb6d8ef (diff)
downloadgnutls-25808948f769e7b26ebd3f8e4c9e345eeed9080f.tar.gz
Remove cdk_strerror, unused and uses non-thread safe strerror.
-rw-r--r--lib/opencdk/main.c49
-rw-r--r--lib/opencdk/opencdk.h3
2 files changed, 0 insertions, 52 deletions
diff --git a/lib/opencdk/main.c b/lib/opencdk/main.c
index 8d504f765a..8b9124d636 100644
--- a/lib/opencdk/main.c
+++ b/lib/opencdk/main.c
@@ -62,55 +62,6 @@ static cdk_log_fnc_t log_handler = NULL;
static void *log_handler_value = NULL;
static int log_level = CDK_LOG_NONE;
-
-/**
- * cdk_strerror:
- * @ec: the error number
- *
- * Return an error text for the given id.
- **/
-const char*
-cdk_strerror (int ec)
-{
- static char buf[20];
-
- switch (ec)
- {
- case CDK_EOF: return "End Of File";
- case CDK_Success: return "No error";
- case CDK_General_Error: return "General error";
- case CDK_File_Error: return strerror (errno);
- case CDK_Bad_Sig: return "Bad signature";
- case CDK_Inv_Packet: return "Invalid packet";
- case CDK_Inv_Algo: return "Invalid algorithm";
- case CDK_Not_Implemented: return "This is not implemented yet";
- case CDK_Armor_Error: return "ASCII armor error";
- case CDK_Armor_CRC_Error: return "ASCII armored damaged (CRC error)";
- case CDK_MPI_Error: return "Invalid or missformed MPI";
- case CDK_Inv_Value: return "Invalid parameter or value";
- case CDK_Error_No_Key: return "No key available or not found";
- case CDK_Chksum_Error: return "Check for key does not match";
- case CDK_Time_Conflict: return "Time conflict";
- case CDK_Zlib_Error: return "ZLIB error";
- case CDK_Weak_Key: return "Weak key was detected";
- case CDK_Out_Of_Core: return "Out of core!!";
- case CDK_Wrong_Seckey: return "Wrong secret key";
- case CDK_Wrong_Format: return "Data has wrong format";
- case CDK_Bad_MDC: return "Manipulated MDC detected";
- case CDK_Inv_Mode: return "Invalid mode";
- case CDK_Error_No_Keyring: return "No keyring available";
- case CDK_Inv_Packet_Ver: return "Invalid version for packet";
- case CDK_Too_Short: return "Buffer or object is too short";
- case CDK_Unusable_Key: return "Unusable public key";
- case CDK_No_Data: return "No data";
- case CDK_No_Passphrase: return "No passphrase supplied";
- case CDK_Network_Error: return "A network error occurred";
- default: sprintf (buf, "ec=%d", ec); return buf;
- }
- return NULL;
-}
-
-
static void
out_of_core (size_t n)
{
diff --git a/lib/opencdk/opencdk.h b/lib/opencdk/opencdk.h
index df5ea06d76..3413eeaf03 100644
--- a/lib/opencdk/opencdk.h
+++ b/lib/opencdk/opencdk.h
@@ -596,9 +596,6 @@ void cdk_set_log_level (int lvl);
/* Set a custom log handler which is used for logging. */
void cdk_set_log_handler (cdk_log_fnc_t logfnc, void *opaque);
-/* Return a human readable error description of the given error coe. */
-const char* cdk_strerror (int ec);
-
/* Allow the user to set custom hooks for memory allocation.
If this function is not used, the standard allocation functions
will be used. Extra care must be taken for the 'secure' alloc