Преглед на файлове

add CRYPT_PK_ASN1_ERROR

Steffen Jaeckel преди 8 години
родител
ревизия
2a78ed31bf
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      src/headers/tomcrypt.h
  2. 1 1
      src/misc/crypt/crypt_constants.c
  3. 1 1
      src/misc/error_to_string.c

+ 1 - 1
src/headers/tomcrypt.h

@@ -67,7 +67,7 @@ enum {
 
 
    CRYPT_OVERFLOW,         /* An overflow of a value was detected/prevented */
    CRYPT_OVERFLOW,         /* An overflow of a value was detected/prevented */
 
 
-   CRYPT_UNUSED1,          /* UNUSED1 */
+   CRYPT_PK_ASN1_ERROR,    /* An error occurred while en- or decoding ASN.1 data */
 
 
    CRYPT_INPUT_TOO_LONG,   /* The input was longer than expected. */
    CRYPT_INPUT_TOO_LONG,   /* The input was longer than expected. */
 
 

+ 1 - 1
src/misc/crypt/crypt_constants.c

@@ -47,7 +47,7 @@ static const crypt_constant _crypt_constants[] = {
     _C_STRINGIFY(CRYPT_FILE_NOTFOUND),
     _C_STRINGIFY(CRYPT_FILE_NOTFOUND),
     _C_STRINGIFY(CRYPT_PK_INVALID_TYPE),
     _C_STRINGIFY(CRYPT_PK_INVALID_TYPE),
     _C_STRINGIFY(CRYPT_OVERFLOW),
     _C_STRINGIFY(CRYPT_OVERFLOW),
-    _C_STRINGIFY(CRYPT_UNUSED1),
+    _C_STRINGIFY(CRYPT_PK_ASN1_ERROR),
     _C_STRINGIFY(CRYPT_INPUT_TOO_LONG),
     _C_STRINGIFY(CRYPT_INPUT_TOO_LONG),
     _C_STRINGIFY(CRYPT_PK_INVALID_SIZE),
     _C_STRINGIFY(CRYPT_PK_INVALID_SIZE),
     _C_STRINGIFY(CRYPT_INVALID_PRIME_SIZE),
     _C_STRINGIFY(CRYPT_INVALID_PRIME_SIZE),

+ 1 - 1
src/misc/error_to_string.c

@@ -46,7 +46,7 @@ static const char * const err_2_str[] =
 
 
    "An overflow of a value was detected/prevented.",
    "An overflow of a value was detected/prevented.",
 
 
-   "UNUSED1.",
+   "An ASN.1 decoding error occurred.",
 
 
    "The input was longer than expected.",
    "The input was longer than expected.",