2 // MonoBtlsX509Error.cs
5 // Martin Baulig <martin.baulig@xamarin.com>
7 // Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30 // Keep in sync with x509_vfy.h
31 enum MonoBtlsX509Error
34 /* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */
36 UNABLE_TO_GET_ISSUER_CERT = 2,
37 UNABLE_TO_GET_CRL = 3,
38 UNABLE_TO_DECRYPT_CERT_SIGNATURE = 4,
39 UNABLE_TO_DECRYPT_CRL_SIGNATURE = 5,
40 UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY = 6,
41 CERT_SIGNATURE_FAILURE = 7,
42 CRL_SIGNATURE_FAILURE = 8,
43 CERT_NOT_YET_VALID = 9,
44 CERT_HAS_EXPIRED = 10,
45 CRL_NOT_YET_VALID = 11,
47 ERROR_IN_CERT_NOT_BEFORE_FIELD = 13,
48 ERROR_IN_CERT_NOT_AFTER_FIELD = 14,
49 ERROR_IN_CRL_LAST_UPDATE_FIELD = 15,
50 ERROR_IN_CRL_NEXT_UPDATE_FIELD = 16,
52 DEPTH_ZERO_SELF_SIGNED_CERT = 18,
53 SELF_SIGNED_CERT_IN_CHAIN = 19,
54 UNABLE_TO_GET_ISSUER_CERT_LOCALLY = 20,
55 UNABLE_TO_VERIFY_LEAF_SIGNATURE = 21,
56 CERT_CHAIN_TOO_LONG = 22,
59 PATH_LENGTH_EXCEEDED = 25,
63 /* These are 'informational' when looking for issuer cert */
64 SUBJECT_ISSUER_MISMATCH = 29,
65 AKID_SKID_MISMATCH = 30,
66 AKID_ISSUER_SERIAL_MISMATCH = 31,
67 KEYUSAGE_NO_CERTSIGN = 32,
69 UNABLE_TO_GET_CRL_ISSUER = 33,
70 UNHANDLED_CRITICAL_EXTENSION = 34,
71 KEYUSAGE_NO_CRL_SIGN = 35,
72 UNHANDLED_CRITICAL_CRL_EXTENSION = 36,
74 PROXY_PATH_LENGTH_EXCEEDED = 38,
75 KEYUSAGE_NO_DIGITAL_SIGNATURE = 39,
76 PROXY_CERTIFICATES_NOT_ALLOWED = 40,
78 INVALID_EXTENSION = 41,
79 INVALID_POLICY_EXTENSION = 42,
80 NO_EXPLICIT_POLICY = 43,
81 DIFFERENT_CRL_SCOPE = 44,
82 UNSUPPORTED_EXTENSION_FEATURE = 45,
84 UNNESTED_RESOURCE = 46,
86 PERMITTED_VIOLATION = 47,
87 EXCLUDED_VIOLATION = 48,
89 UNSUPPORTED_CONSTRAINT_TYPE = 51,
90 UNSUPPORTED_CONSTRAINT_SYNTAX = 52,
91 UNSUPPORTED_NAME_SYNTAX = 53,
92 CRL_PATH_VALIDATION_ERROR = 54,
94 /* Suite B mode algorithm violation */
95 SUITE_B_INVALID_VERSION = 56,
96 SUITE_B_INVALID_ALGORITHM = 57,
97 SUITE_B_INVALID_CURVE = 58,
98 SUITE_B_INVALID_SIGNATURE_ALGORITHM = 59,
99 SUITE_B_LOS_NOT_ALLOWED = 60,
100 SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 = 61,
102 /* Host, email and IP check errors */
103 HOSTNAME_MISMATCH = 62,
105 IP_ADDRESS_MISMATCH = 64,
107 /* The application is not happy */
108 APPLICATION_VERIFICATION = 50