Ignore Makefile.save
[openssl.git] / crypto / x509 / x509_txt.c
index d5fc5839a1008166857275c3cd4f476806adff58..11a3d2012fb3175956626ba2d78ec492af966957 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/x509/x509_txt.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
 #include <sys/types.h>
 
 #include "cryptlib.h"
-#include "lhash.h"
-#include "buffer.h"
-#include "evp.h"
-#include "asn1.h"
-#include "x509.h"
-#include "objects.h"
-#include "pem.h"
+#include <openssl/lhash.h>
+#include <openssl/buffer.h>
+#include <openssl/evp.h>
+#include <openssl/asn1.h>
+#include <openssl/x509.h>
+#include <openssl/objects.h>
 
-char *X509_verify_cert_error_string(n)
-int n;
+const char *X509_verify_cert_error_string(long n)
        {
        static char buf[100];
 
-       switch (n)
+       switch ((int)n)
                {
        case X509_V_OK:
                return("ok");
@@ -105,9 +103,9 @@ int n;
                return("format error in certificate's notBefore field");
        case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
                return("format error in certificate's notAfter field");
-       case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FILED:
+       case X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD:
                return("format error in CRL's lastUpdate field");
-       case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FILED:
+       case X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD:
                return("format error in CRL's nextUpdate field");
        case X509_V_ERR_OUT_OF_MEM:
                return("out of memory");
@@ -121,8 +119,12 @@ int n;
                return("unable to verify the first certificate");
        case X509_V_ERR_CERT_CHAIN_TOO_LONG:
                return("certificate chain too long");
+       case X509_V_ERR_CERT_REVOKED:
+               return("certificate revoked");
+       case X509_V_ERR_APPLICATION_VERIFICATION:
+               return("application verification failure");
        default:
-               sprintf(buf,"error number %d",n);
+               sprintf(buf,"error number %ld",n);
                return(buf);
                }
        }