From 08503a02f5612cfab79d415797e0418bc9ffaae9 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 31 Mar 2017 15:12:12 +0200 Subject: [PATCH] update error codes This closes #180 --- src/headers/tomcrypt.h | 9 ++++++--- src/misc/error_to_string.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/headers/tomcrypt.h b/src/headers/tomcrypt.h index 6f661c7..40584e7 100644 --- a/src/headers/tomcrypt.h +++ b/src/headers/tomcrypt.h @@ -55,9 +55,12 @@ enum { CRYPT_FILE_NOTFOUND, /* File Not Found */ CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */ - CRYPT_OVERFLOW, /* An overflow of a value was prevented */ - CRYPT_PK_DUP, /* Duplicate key already in key ring */ - CRYPT_PK_NOT_FOUND, /* Key not found in keyring */ + + CRYPT_OVERFLOW, /* An overflow of a value was detected/prevented */ + + CRYPT_UNUSED1, /* UNUSED1 */ + CRYPT_UNUSED2, /* UNUSED2 */ + CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */ CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */ diff --git a/src/misc/error_to_string.c b/src/misc/error_to_string.c index 2ca1492..c3d0872 100644 --- a/src/misc/error_to_string.c +++ b/src/misc/error_to_string.c @@ -45,9 +45,12 @@ static const char * const err_2_str[] = "File Not Found", "Invalid PK type.", - "Invalid PK system.", - "Duplicate PK key found on keyring.", - "Key not found in keyring.", + + "An overflow of a value was detected/prevented.", + + "UNUSED1.", + "UNUSED2.", + "Invalid sized parameter.", "Invalid size for prime.",