diff options
author | David Benjamin <davidben@google.com> | 2016-03-15 00:13:54 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-03-15 19:02:12 +0300 |
commit | a2f2bc3a4062d755644adf0f6dca79903638a283 (patch) | |
tree | d86c45a28d8fb87cbb6057da5d36a8137ea10be2 /crypto/err | |
parent | a5177cb319f5ed5cb28f72bd564b4d6d6d355975 (diff) |
Align with upstream's error strings, take two.
I messed up a few of these.
ASN1_R_UNSUPPORTED_ALGORITHM doesn't exist. X509_R_UNSUPPORTED_ALGORITHM does
exist as part of X509_PUBKEY_set, but the SPKI parser doesn't emit this. (I
don't mind the legacy code having really weird errors, but since EVP is now
limited to things we like, let's try to keep that clean.) To avoid churn in
Conscrypt, we'll keep defining X509_R_UNSUPPORTED_ALGORITHM, but not actually
do anything with it anymore. Conscrypt was already aware of
EVP_R_UNSUPPORTED_ALGORITHM, so this should be fine. (I don't expect
EVP_R_UNSUPPORTED_ALGORITHM to go away. The SPKI parsers we like live in EVP
now.)
A few other ASN1_R_* values didn't quite match upstream, so make those match
again. Finally, I got some of the rsa_pss.c values wrong. Each of those
corresponds to an (overly specific) RSA_R_* value in upstream. However, those
were gone in BoringSSL since even the initial commit. We placed the RSA <-> EVP
glue in crypto/evp (so crypto/rsa wouldn't depend on crypto/evp) while upstream
placed them in crypto/rsa.
Since no one seemed to notice the loss of RSA_R_INVALID_SALT_LENGTH, let's undo
all the cross-module errors inserted in crypto/rsa. Instead, since that kind of
specificity is not useful, funnel it all into X509_R_INVALID_PSS_PARAMETERS
(formerly EVP_R_INVALID_PSS_PARAMETERS, formerly RSA_R_INVALID_PSS_PARAMETERS).
Reset the error codes for all affected modules.
(That our error code story means error codes are not stable across this kind of
refactoring is kind of a problem. Hopefully this will be the last of it.)
Change-Id: Ibfb3a0ac340bfc777bc7de6980ef3ddf0a8c84bc
Reviewed-on: https://boringssl-review.googlesource.com/7458
Reviewed-by: Emily Stark (Dunn) <estark@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/asn1.errordata | 166 | ||||
-rw-r--r-- | crypto/err/rsa.errordata | 95 | ||||
-rw-r--r-- | crypto/err/x509.errordata | 44 |
3 files changed, 152 insertions, 153 deletions
diff --git a/crypto/err/asn1.errordata b/crypto/err/asn1.errordata index ec8ea533..c304b2ca 100644 --- a/crypto/err/asn1.errordata +++ b/crypto/err/asn1.errordata @@ -6,87 +6,87 @@ ASN1,104,BMPSTRING_IS_WRONG_LENGTH ASN1,105,BN_LIB ASN1,106,BOOLEAN_IS_WRONG_LENGTH ASN1,107,BUFFER_TOO_SMALL -ASN1,190,CONTEXT_NOT_INITIALISED -ASN1,108,DECODE_ERROR -ASN1,109,DEPTH_EXCEEDED -ASN1,110,ENCODE_ERROR -ASN1,111,ERROR_GETTING_TIME -ASN1,112,EXPECTING_AN_ASN1_SEQUENCE -ASN1,113,EXPECTING_AN_INTEGER -ASN1,114,EXPECTING_AN_OBJECT -ASN1,115,EXPECTING_A_BOOLEAN -ASN1,116,EXPECTING_A_TIME -ASN1,117,EXPLICIT_LENGTH_MISMATCH -ASN1,118,EXPLICIT_TAG_NOT_CONSTRUCTED -ASN1,119,FIELD_MISSING -ASN1,120,FIRST_NUM_TOO_LARGE -ASN1,121,HEADER_TOO_LONG -ASN1,122,ILLEGAL_BITSTRING_FORMAT -ASN1,123,ILLEGAL_BOOLEAN -ASN1,124,ILLEGAL_CHARACTERS -ASN1,125,ILLEGAL_FORMAT -ASN1,126,ILLEGAL_HEX -ASN1,127,ILLEGAL_IMPLICIT_TAG -ASN1,128,ILLEGAL_INTEGER -ASN1,129,ILLEGAL_NESTED_TAGGING -ASN1,130,ILLEGAL_NULL -ASN1,131,ILLEGAL_NULL_VALUE -ASN1,132,ILLEGAL_OBJECT -ASN1,133,ILLEGAL_OPTIONAL_ANY -ASN1,134,ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE -ASN1,135,ILLEGAL_TAGGED_ANY -ASN1,136,ILLEGAL_TIME_VALUE -ASN1,137,INTEGER_NOT_ASCII_FORMAT -ASN1,138,INTEGER_TOO_LARGE_FOR_LONG -ASN1,139,INVALID_BIT_STRING_BITS_LEFT -ASN1,140,INVALID_BMPSTRING_LENGTH -ASN1,141,INVALID_DIGIT -ASN1,142,INVALID_MODIFIER -ASN1,143,INVALID_NUMBER -ASN1,144,INVALID_OBJECT_ENCODING -ASN1,145,INVALID_SEPARATOR -ASN1,146,INVALID_TIME_FORMAT -ASN1,147,INVALID_UNIVERSALSTRING_LENGTH -ASN1,148,INVALID_UTF8STRING -ASN1,149,LIST_ERROR -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,187,UNKNOWN_MESSAGE_DIGEST_ALGORITHM -ASN1,188,UNKNOWN_SIGNATURE_ALGORITHM -ASN1,181,UNKNOWN_TAG -ASN1,191,UNSUPPORTED_ALGORITHM -ASN1,182,UNSUPPORTED_ANY_DEFINED_BY_TYPE -ASN1,183,UNSUPPORTED_PUBLIC_KEY_TYPE -ASN1,184,UNSUPPORTED_TYPE +ASN1,108,CONTEXT_NOT_INITIALISED +ASN1,109,DECODE_ERROR +ASN1,110,DEPTH_EXCEEDED +ASN1,111,DIGEST_AND_KEY_TYPE_NOT_SUPPORTED +ASN1,112,ENCODE_ERROR +ASN1,113,ERROR_GETTING_TIME +ASN1,114,EXPECTING_AN_ASN1_SEQUENCE +ASN1,115,EXPECTING_AN_INTEGER +ASN1,116,EXPECTING_AN_OBJECT +ASN1,117,EXPECTING_A_BOOLEAN +ASN1,118,EXPECTING_A_TIME +ASN1,119,EXPLICIT_LENGTH_MISMATCH +ASN1,120,EXPLICIT_TAG_NOT_CONSTRUCTED +ASN1,121,FIELD_MISSING +ASN1,122,FIRST_NUM_TOO_LARGE +ASN1,123,HEADER_TOO_LONG +ASN1,124,ILLEGAL_BITSTRING_FORMAT +ASN1,125,ILLEGAL_BOOLEAN +ASN1,126,ILLEGAL_CHARACTERS +ASN1,127,ILLEGAL_FORMAT +ASN1,128,ILLEGAL_HEX +ASN1,129,ILLEGAL_IMPLICIT_TAG +ASN1,130,ILLEGAL_INTEGER +ASN1,131,ILLEGAL_NESTED_TAGGING +ASN1,132,ILLEGAL_NULL +ASN1,133,ILLEGAL_NULL_VALUE +ASN1,134,ILLEGAL_OBJECT +ASN1,135,ILLEGAL_OPTIONAL_ANY +ASN1,136,ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE +ASN1,137,ILLEGAL_TAGGED_ANY +ASN1,138,ILLEGAL_TIME_VALUE +ASN1,139,INTEGER_NOT_ASCII_FORMAT +ASN1,140,INTEGER_TOO_LARGE_FOR_LONG +ASN1,141,INVALID_BIT_STRING_BITS_LEFT +ASN1,142,INVALID_BMPSTRING_LENGTH +ASN1,143,INVALID_DIGIT +ASN1,144,INVALID_MODIFIER +ASN1,145,INVALID_NUMBER +ASN1,146,INVALID_OBJECT_ENCODING +ASN1,147,INVALID_SEPARATOR +ASN1,148,INVALID_TIME_FORMAT +ASN1,149,INVALID_UNIVERSALSTRING_LENGTH +ASN1,150,INVALID_UTF8STRING +ASN1,151,LIST_ERROR +ASN1,152,MISSING_ASN1_EOS +ASN1,153,MISSING_EOC +ASN1,154,MISSING_SECOND_NUMBER +ASN1,155,MISSING_VALUE +ASN1,156,MSTRING_NOT_UNIVERSAL +ASN1,157,MSTRING_WRONG_TAG +ASN1,158,NESTED_ASN1_ERROR +ASN1,159,NESTED_ASN1_STRING +ASN1,160,NON_HEX_CHARACTERS +ASN1,161,NOT_ASCII_FORMAT +ASN1,162,NOT_ENOUGH_DATA +ASN1,163,NO_MATCHING_CHOICE_TYPE +ASN1,164,NULL_IS_WRONG_LENGTH +ASN1,165,OBJECT_NOT_ASCII_FORMAT +ASN1,166,ODD_NUMBER_OF_CHARS +ASN1,167,SECOND_NUMBER_TOO_LARGE +ASN1,168,SEQUENCE_LENGTH_MISMATCH +ASN1,169,SEQUENCE_NOT_CONSTRUCTED +ASN1,170,SEQUENCE_OR_SET_NEEDS_CONFIG +ASN1,171,SHORT_LINE +ASN1,172,STREAMING_NOT_SUPPORTED +ASN1,173,STRING_TOO_LONG +ASN1,174,STRING_TOO_SHORT +ASN1,175,TAG_VALUE_TOO_HIGH +ASN1,176,TIME_NOT_ASCII_FORMAT +ASN1,177,TOO_LONG +ASN1,178,TYPE_NOT_CONSTRUCTED +ASN1,179,TYPE_NOT_PRIMITIVE +ASN1,180,UNEXPECTED_EOC +ASN1,181,UNIVERSALSTRING_IS_WRONG_LENGTH +ASN1,182,UNKNOWN_FORMAT +ASN1,183,UNKNOWN_MESSAGE_DIGEST_ALGORITHM +ASN1,184,UNKNOWN_SIGNATURE_ALGORITHM +ASN1,185,UNKNOWN_TAG +ASN1,186,UNSUPPORTED_ANY_DEFINED_BY_TYPE +ASN1,187,UNSUPPORTED_PUBLIC_KEY_TYPE +ASN1,188,UNSUPPORTED_TYPE ASN1,189,WRONG_PUBLIC_KEY_TYPE -ASN1,185,WRONG_TAG -ASN1,186,WRONG_TYPE +ASN1,190,WRONG_TAG +ASN1,191,WRONG_TYPE diff --git a/crypto/err/rsa.errordata b/crypto/err/rsa.errordata index 4a5272da..62d286cc 100644 --- a/crypto/err/rsa.errordata +++ b/crypto/err/rsa.errordata @@ -1,49 +1,46 @@ -RSA,143,BAD_ENCODING -RSA,100,BAD_E_VALUE -RSA,101,BAD_FIXED_HEADER_DECRYPT -RSA,102,BAD_PAD_BYTE_COUNT -RSA,103,BAD_RSA_PARAMETERS -RSA,104,BAD_SIGNATURE -RSA,145,BAD_VERSION -RSA,105,BLOCK_TYPE_IS_NOT_01 -RSA,106,BN_NOT_INITIALIZED -RSA,142,CANNOT_RECOVER_MULTI_PRIME_KEY -RSA,107,CRT_PARAMS_ALREADY_GIVEN -RSA,108,CRT_VALUES_INCORRECT -RSA,109,DATA_LEN_NOT_EQUAL_TO_MOD_LEN -RSA,110,DATA_TOO_LARGE -RSA,111,DATA_TOO_LARGE_FOR_KEY_SIZE -RSA,112,DATA_TOO_LARGE_FOR_MODULUS -RSA,113,DATA_TOO_SMALL -RSA,114,DATA_TOO_SMALL_FOR_KEY_SIZE -RSA,115,DIGEST_TOO_BIG_FOR_RSA_KEY -RSA,116,D_E_NOT_CONGRUENT_TO_1 -RSA,117,EMPTY_PUBLIC_KEY -RSA,144,ENCODE_ERROR -RSA,118,FIRST_OCTET_INVALID -RSA,119,INCONSISTENT_SET_OF_CRT_VALUES -RSA,120,INTERNAL_ERROR -RSA,121,INVALID_MESSAGE_LENGTH -RSA,146,INVALID_PSS_PARAMETERS -RSA,147,INVALID_SALT_LENGTH -RSA,148,INVALID_TRAILER -RSA,122,KEY_SIZE_TOO_SMALL -RSA,123,LAST_OCTET_INVALID -RSA,124,MODULUS_TOO_LARGE -RSA,141,MUST_HAVE_AT_LEAST_TWO_PRIMES -RSA,125,NO_PUBLIC_EXPONENT -RSA,126,NULL_BEFORE_BLOCK_MISSING -RSA,127,N_NOT_EQUAL_P_Q -RSA,128,OAEP_DECODING_ERROR -RSA,129,ONLY_ONE_OF_P_Q_GIVEN -RSA,130,OUTPUT_BUFFER_TOO_SMALL -RSA,131,PADDING_CHECK_FAILED -RSA,132,PKCS_DECODING_ERROR -RSA,133,SLEN_CHECK_FAILED -RSA,134,SLEN_RECOVERY_FAILED -RSA,135,TOO_LONG -RSA,136,TOO_MANY_ITERATIONS -RSA,137,UNKNOWN_ALGORITHM_TYPE -RSA,138,UNKNOWN_PADDING_TYPE -RSA,139,VALUE_MISSING -RSA,140,WRONG_SIGNATURE_LENGTH +RSA,100,BAD_ENCODING +RSA,101,BAD_E_VALUE +RSA,102,BAD_FIXED_HEADER_DECRYPT +RSA,103,BAD_PAD_BYTE_COUNT +RSA,104,BAD_RSA_PARAMETERS +RSA,105,BAD_SIGNATURE +RSA,106,BAD_VERSION +RSA,107,BLOCK_TYPE_IS_NOT_01 +RSA,108,BN_NOT_INITIALIZED +RSA,109,CANNOT_RECOVER_MULTI_PRIME_KEY +RSA,110,CRT_PARAMS_ALREADY_GIVEN +RSA,111,CRT_VALUES_INCORRECT +RSA,112,DATA_LEN_NOT_EQUAL_TO_MOD_LEN +RSA,113,DATA_TOO_LARGE +RSA,114,DATA_TOO_LARGE_FOR_KEY_SIZE +RSA,115,DATA_TOO_LARGE_FOR_MODULUS +RSA,116,DATA_TOO_SMALL +RSA,117,DATA_TOO_SMALL_FOR_KEY_SIZE +RSA,118,DIGEST_TOO_BIG_FOR_RSA_KEY +RSA,119,D_E_NOT_CONGRUENT_TO_1 +RSA,120,EMPTY_PUBLIC_KEY +RSA,121,ENCODE_ERROR +RSA,122,FIRST_OCTET_INVALID +RSA,123,INCONSISTENT_SET_OF_CRT_VALUES +RSA,124,INTERNAL_ERROR +RSA,125,INVALID_MESSAGE_LENGTH +RSA,126,KEY_SIZE_TOO_SMALL +RSA,127,LAST_OCTET_INVALID +RSA,128,MODULUS_TOO_LARGE +RSA,129,MUST_HAVE_AT_LEAST_TWO_PRIMES +RSA,130,NO_PUBLIC_EXPONENT +RSA,131,NULL_BEFORE_BLOCK_MISSING +RSA,132,N_NOT_EQUAL_P_Q +RSA,133,OAEP_DECODING_ERROR +RSA,134,ONLY_ONE_OF_P_Q_GIVEN +RSA,135,OUTPUT_BUFFER_TOO_SMALL +RSA,136,PADDING_CHECK_FAILED +RSA,137,PKCS_DECODING_ERROR +RSA,138,SLEN_CHECK_FAILED +RSA,139,SLEN_RECOVERY_FAILED +RSA,140,TOO_LONG +RSA,141,TOO_MANY_ITERATIONS +RSA,142,UNKNOWN_ALGORITHM_TYPE +RSA,143,UNKNOWN_PADDING_TYPE +RSA,144,VALUE_MISSING +RSA,145,WRONG_SIGNATURE_LENGTH diff --git a/crypto/err/x509.errordata b/crypto/err/x509.errordata index 412a351c..a1d49b71 100644 --- a/crypto/err/x509.errordata +++ b/crypto/err/x509.errordata @@ -10,24 +10,26 @@ X509,108,IDP_MISMATCH X509,109,INVALID_BIT_STRING_BITS_LEFT X509,110,INVALID_DIRECTORY X509,111,INVALID_FIELD_NAME -X509,112,INVALID_TRUST -X509,113,ISSUER_MISMATCH -X509,114,KEY_TYPE_MISMATCH -X509,115,KEY_VALUES_MISMATCH -X509,116,LOADING_CERT_DIR -X509,117,LOADING_DEFAULTS -X509,118,NEWER_CRL_NOT_NEWER -X509,119,NOT_PKCS7_SIGNED_DATA -X509,120,NO_CERTIFICATES_INCLUDED -X509,121,NO_CERT_SET_FOR_US_TO_VERIFY -X509,122,NO_CRLS_INCLUDED -X509,123,NO_CRL_NUMBER -X509,124,PUBLIC_KEY_DECODE_ERROR -X509,125,PUBLIC_KEY_ENCODE_ERROR -X509,126,SHOULD_RETRY -X509,127,UNKNOWN_KEY_TYPE -X509,128,UNKNOWN_NID -X509,129,UNKNOWN_PURPOSE_ID -X509,130,UNKNOWN_TRUST_ID -X509,131,WRONG_LOOKUP_TYPE -X509,132,WRONG_TYPE +X509,112,INVALID_PSS_PARAMETERS +X509,113,INVALID_TRUST +X509,114,ISSUER_MISMATCH +X509,115,KEY_TYPE_MISMATCH +X509,116,KEY_VALUES_MISMATCH +X509,117,LOADING_CERT_DIR +X509,118,LOADING_DEFAULTS +X509,119,NEWER_CRL_NOT_NEWER +X509,120,NOT_PKCS7_SIGNED_DATA +X509,121,NO_CERTIFICATES_INCLUDED +X509,122,NO_CERT_SET_FOR_US_TO_VERIFY +X509,123,NO_CRLS_INCLUDED +X509,124,NO_CRL_NUMBER +X509,125,PUBLIC_KEY_DECODE_ERROR +X509,126,PUBLIC_KEY_ENCODE_ERROR +X509,127,SHOULD_RETRY +X509,128,UNKNOWN_KEY_TYPE +X509,129,UNKNOWN_NID +X509,130,UNKNOWN_PURPOSE_ID +X509,131,UNKNOWN_TRUST_ID +X509,132,UNSUPPORTED_ALGORITHM +X509,133,WRONG_LOOKUP_TYPE +X509,134,WRONG_TYPE |