diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_txt.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_txt.c | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509/x509_txt.c b/src/lib/libcrypto/x509/x509_txt.c index 408d1c277c..4f83db8ba2 100644 --- a/src/lib/libcrypto/x509/x509_txt.c +++ b/src/lib/libcrypto/x509/x509_txt.c | |||
| @@ -59,19 +59,16 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <time.h> | 60 | #include <time.h> |
| 61 | #include <errno.h> | 61 | #include <errno.h> |
| 62 | #include <sys/types.h> | ||
| 63 | 62 | ||
| 64 | #include "cryptlib.h" | 63 | #include "cryptlib.h" |
| 65 | #include "lhash.h" | 64 | #include <openssl/lhash.h> |
| 66 | #include "buffer.h" | 65 | #include <openssl/buffer.h> |
| 67 | #include "evp.h" | 66 | #include <openssl/evp.h> |
| 68 | #include "asn1.h" | 67 | #include <openssl/asn1.h> |
| 69 | #include "x509.h" | 68 | #include <openssl/x509.h> |
| 70 | #include "objects.h" | 69 | #include <openssl/objects.h> |
| 71 | #include "pem.h" | ||
| 72 | 70 | ||
| 73 | char *X509_verify_cert_error_string(n) | 71 | const char *X509_verify_cert_error_string(long n) |
| 74 | long n; | ||
| 75 | { | 72 | { |
| 76 | static char buf[100]; | 73 | static char buf[100]; |
| 77 | 74 | ||
| @@ -86,7 +83,7 @@ long n; | |||
| 86 | case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: | 83 | case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: |
| 87 | return("unable to decrypt certificate's signature"); | 84 | return("unable to decrypt certificate's signature"); |
| 88 | case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: | 85 | case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: |
| 89 | return("unable to decrypt CRL's's signature"); | 86 | return("unable to decrypt CRL's signature"); |
| 90 | case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: | 87 | case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: |
| 91 | return("unable to decode issuer public key"); | 88 | return("unable to decode issuer public key"); |
| 92 | case X509_V_ERR_CERT_SIGNATURE_FAILURE: | 89 | case X509_V_ERR_CERT_SIGNATURE_FAILURE: |
| @@ -98,7 +95,7 @@ long n; | |||
| 98 | case X509_V_ERR_CRL_NOT_YET_VALID: | 95 | case X509_V_ERR_CRL_NOT_YET_VALID: |
| 99 | return("CRL is not yet valid"); | 96 | return("CRL is not yet valid"); |
| 100 | case X509_V_ERR_CERT_HAS_EXPIRED: | 97 | case X509_V_ERR_CERT_HAS_EXPIRED: |
| 101 | return("Certificate has expired"); | 98 | return("certificate has expired"); |
| 102 | case X509_V_ERR_CRL_HAS_EXPIRED: | 99 | case X509_V_ERR_CRL_HAS_EXPIRED: |
| 103 | return("CRL has expired"); | 100 | return("CRL has expired"); |
| 104 | case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: | 101 | case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: |
| @@ -121,8 +118,35 @@ long n; | |||
| 121 | return("unable to verify the first certificate"); | 118 | return("unable to verify the first certificate"); |
| 122 | case X509_V_ERR_CERT_CHAIN_TOO_LONG: | 119 | case X509_V_ERR_CERT_CHAIN_TOO_LONG: |
| 123 | return("certificate chain too long"); | 120 | return("certificate chain too long"); |
| 121 | case X509_V_ERR_CERT_REVOKED: | ||
| 122 | return("certificate revoked"); | ||
| 123 | case X509_V_ERR_INVALID_CA: | ||
| 124 | return ("invalid CA certificate"); | ||
| 125 | case X509_V_ERR_PATH_LENGTH_EXCEEDED: | ||
| 126 | return ("path length constraint exceeded"); | ||
| 127 | case X509_V_ERR_INVALID_PURPOSE: | ||
| 128 | return ("unsupported certificate purpose"); | ||
| 129 | case X509_V_ERR_CERT_UNTRUSTED: | ||
| 130 | return ("certificate not trusted"); | ||
| 131 | case X509_V_ERR_CERT_REJECTED: | ||
| 132 | return ("certificate rejected"); | ||
| 124 | case X509_V_ERR_APPLICATION_VERIFICATION: | 133 | case X509_V_ERR_APPLICATION_VERIFICATION: |
| 125 | return("application verification failure"); | 134 | return("application verification failure"); |
| 135 | case X509_V_ERR_SUBJECT_ISSUER_MISMATCH: | ||
| 136 | return("subject issuer mismatch"); | ||
| 137 | case X509_V_ERR_AKID_SKID_MISMATCH: | ||
| 138 | return("authority and subject key identifier mismatch"); | ||
| 139 | case X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH: | ||
| 140 | return("authority and issuer serial number mismatch"); | ||
| 141 | case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: | ||
| 142 | return("key usage does not include certificate signing"); | ||
| 143 | |||
| 144 | case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: | ||
| 145 | return("unable to get CRL issuer certificate"); | ||
| 146 | |||
| 147 | case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: | ||
| 148 | return("unhandled critical extension"); | ||
| 149 | |||
| 126 | default: | 150 | default: |
| 127 | sprintf(buf,"error number %ld",n); | 151 | sprintf(buf,"error number %ld",n); |
| 128 | return(buf); | 152 | return(buf); |
