Remove ASN1_R_MALLOC_FAILURE.

There was a TODO to remove it once asn1_mac.h was trimmed. This has now
happened. Remove it and reset error codes for crypto/asn1.

Change-Id: Iaf2f3e75741914415372939471b135618910f95d
Reviewed-on: https://boringssl-review.googlesource.com/6761
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-12-12 18:30:26 -05:00 committed by Adam Langley
parent b965c63acb
commit 70ab223490
3 changed files with 74 additions and 80 deletions

View File

@ -64,10 +64,6 @@
#include <openssl/mem.h>
/* Used in asn1_mac.h.
* TODO(davidben): Remove this once asn1_mac.h is gone or trimmed. */
OPENSSL_DECLARE_ERROR_REASON(ASN1, MALLOC_FAILURE);
/* Cross-module errors from crypto/x509/i2d_pr.c */
OPENSSL_DECLARE_ERROR_REASON(ASN1, UNSUPPORTED_PUBLIC_KEY_TYPE);

View File

@ -48,41 +48,40 @@ ASN1,146,INVALID_TIME_FORMAT
ASN1,147,INVALID_UNIVERSALSTRING_LENGTH
ASN1,148,INVALID_UTF8STRING
ASN1,149,LIST_ERROR
ASN1,150,MALLOC_FAILURE
ASN1,151,MISSING_ASN1_EOS
ASN1,152,MISSING_EOC
ASN1,153,MISSING_SECOND_NUMBER
ASN1,154,MISSING_VALUE
ASN1,155,MSTRING_NOT_UNIVERSAL
ASN1,156,MSTRING_WRONG_TAG
ASN1,157,NESTED_ASN1_ERROR
ASN1,158,NESTED_ASN1_STRING
ASN1,159,NON_HEX_CHARACTERS
ASN1,160,NOT_ASCII_FORMAT
ASN1,161,NOT_ENOUGH_DATA
ASN1,162,NO_MATCHING_CHOICE_TYPE
ASN1,163,NULL_IS_WRONG_LENGTH
ASN1,164,OBJECT_NOT_ASCII_FORMAT
ASN1,165,ODD_NUMBER_OF_CHARS
ASN1,166,SECOND_NUMBER_TOO_LARGE
ASN1,167,SEQUENCE_LENGTH_MISMATCH
ASN1,168,SEQUENCE_NOT_CONSTRUCTED
ASN1,169,SEQUENCE_OR_SET_NEEDS_CONFIG
ASN1,170,SHORT_LINE
ASN1,171,STREAMING_NOT_SUPPORTED
ASN1,172,STRING_TOO_LONG
ASN1,173,STRING_TOO_SHORT
ASN1,174,TAG_VALUE_TOO_HIGH
ASN1,175,TIME_NOT_ASCII_FORMAT
ASN1,176,TOO_LONG
ASN1,177,TYPE_NOT_CONSTRUCTED
ASN1,178,TYPE_NOT_PRIMITIVE
ASN1,179,UNEXPECTED_EOC
ASN1,180,UNIVERSALSTRING_IS_WRONG_LENGTH
ASN1,181,UNKNOWN_FORMAT
ASN1,182,UNKNOWN_TAG
ASN1,183,UNSUPPORTED_ANY_DEFINED_BY_TYPE
ASN1,184,UNSUPPORTED_PUBLIC_KEY_TYPE
ASN1,185,UNSUPPORTED_TYPE
ASN1,186,WRONG_TAG
ASN1,187,WRONG_TYPE
ASN1,150,MISSING_ASN1_EOS
ASN1,151,MISSING_EOC
ASN1,152,MISSING_SECOND_NUMBER
ASN1,153,MISSING_VALUE
ASN1,154,MSTRING_NOT_UNIVERSAL
ASN1,155,MSTRING_WRONG_TAG
ASN1,156,NESTED_ASN1_ERROR
ASN1,157,NESTED_ASN1_STRING
ASN1,158,NON_HEX_CHARACTERS
ASN1,159,NOT_ASCII_FORMAT
ASN1,160,NOT_ENOUGH_DATA
ASN1,161,NO_MATCHING_CHOICE_TYPE
ASN1,162,NULL_IS_WRONG_LENGTH
ASN1,163,OBJECT_NOT_ASCII_FORMAT
ASN1,164,ODD_NUMBER_OF_CHARS
ASN1,165,SECOND_NUMBER_TOO_LARGE
ASN1,166,SEQUENCE_LENGTH_MISMATCH
ASN1,167,SEQUENCE_NOT_CONSTRUCTED
ASN1,168,SEQUENCE_OR_SET_NEEDS_CONFIG
ASN1,169,SHORT_LINE
ASN1,170,STREAMING_NOT_SUPPORTED
ASN1,171,STRING_TOO_LONG
ASN1,172,STRING_TOO_SHORT
ASN1,173,TAG_VALUE_TOO_HIGH
ASN1,174,TIME_NOT_ASCII_FORMAT
ASN1,175,TOO_LONG
ASN1,176,TYPE_NOT_CONSTRUCTED
ASN1,177,TYPE_NOT_PRIMITIVE
ASN1,178,UNEXPECTED_EOC
ASN1,179,UNIVERSALSTRING_IS_WRONG_LENGTH
ASN1,180,UNKNOWN_FORMAT
ASN1,181,UNKNOWN_TAG
ASN1,182,UNSUPPORTED_ANY_DEFINED_BY_TYPE
ASN1,183,UNSUPPORTED_PUBLIC_KEY_TYPE
ASN1,184,UNSUPPORTED_TYPE
ASN1,185,WRONG_TAG
ASN1,186,WRONG_TYPE

View File

@ -1126,43 +1126,42 @@ OPENSSL_EXPORT int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, asn1_ps_f
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 147
#define ASN1_R_INVALID_UTF8STRING 148
#define ASN1_R_LIST_ERROR 149
#define ASN1_R_MALLOC_FAILURE 150
#define ASN1_R_MISSING_ASN1_EOS 151
#define ASN1_R_MISSING_EOC 152
#define ASN1_R_MISSING_SECOND_NUMBER 153
#define ASN1_R_MISSING_VALUE 154
#define ASN1_R_MSTRING_NOT_UNIVERSAL 155
#define ASN1_R_MSTRING_WRONG_TAG 156
#define ASN1_R_NESTED_ASN1_ERROR 157
#define ASN1_R_NESTED_ASN1_STRING 158
#define ASN1_R_NON_HEX_CHARACTERS 159
#define ASN1_R_NOT_ASCII_FORMAT 160
#define ASN1_R_NOT_ENOUGH_DATA 161
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 162
#define ASN1_R_NULL_IS_WRONG_LENGTH 163
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 164
#define ASN1_R_ODD_NUMBER_OF_CHARS 165
#define ASN1_R_SECOND_NUMBER_TOO_LARGE 166
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 167
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 168
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 169
#define ASN1_R_SHORT_LINE 170
#define ASN1_R_STREAMING_NOT_SUPPORTED 171
#define ASN1_R_STRING_TOO_LONG 172
#define ASN1_R_STRING_TOO_SHORT 173
#define ASN1_R_TAG_VALUE_TOO_HIGH 174
#define ASN1_R_TIME_NOT_ASCII_FORMAT 175
#define ASN1_R_TOO_LONG 176
#define ASN1_R_TYPE_NOT_CONSTRUCTED 177
#define ASN1_R_TYPE_NOT_PRIMITIVE 178
#define ASN1_R_UNEXPECTED_EOC 179
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 180
#define ASN1_R_UNKNOWN_FORMAT 181
#define ASN1_R_UNKNOWN_TAG 182
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 183
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 184
#define ASN1_R_UNSUPPORTED_TYPE 185
#define ASN1_R_WRONG_TAG 186
#define ASN1_R_WRONG_TYPE 187
#define ASN1_R_MISSING_ASN1_EOS 150
#define ASN1_R_MISSING_EOC 151
#define ASN1_R_MISSING_SECOND_NUMBER 152
#define ASN1_R_MISSING_VALUE 153
#define ASN1_R_MSTRING_NOT_UNIVERSAL 154
#define ASN1_R_MSTRING_WRONG_TAG 155
#define ASN1_R_NESTED_ASN1_ERROR 156
#define ASN1_R_NESTED_ASN1_STRING 157
#define ASN1_R_NON_HEX_CHARACTERS 158
#define ASN1_R_NOT_ASCII_FORMAT 159
#define ASN1_R_NOT_ENOUGH_DATA 160
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 161
#define ASN1_R_NULL_IS_WRONG_LENGTH 162
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 163
#define ASN1_R_ODD_NUMBER_OF_CHARS 164
#define ASN1_R_SECOND_NUMBER_TOO_LARGE 165
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 166
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 167
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 168
#define ASN1_R_SHORT_LINE 169
#define ASN1_R_STREAMING_NOT_SUPPORTED 170
#define ASN1_R_STRING_TOO_LONG 171
#define ASN1_R_STRING_TOO_SHORT 172
#define ASN1_R_TAG_VALUE_TOO_HIGH 173
#define ASN1_R_TIME_NOT_ASCII_FORMAT 174
#define ASN1_R_TOO_LONG 175
#define ASN1_R_TYPE_NOT_CONSTRUCTED 176
#define ASN1_R_TYPE_NOT_PRIMITIVE 177
#define ASN1_R_UNEXPECTED_EOC 178
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 179
#define ASN1_R_UNKNOWN_FORMAT 180
#define ASN1_R_UNKNOWN_TAG 181
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 182
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 183
#define ASN1_R_UNSUPPORTED_TYPE 184
#define ASN1_R_WRONG_TAG 185
#define ASN1_R_WRONG_TYPE 186
#endif