make update
[openssl.git] / apps / ocsp.c
index 885e68e363349863186aee3266ca5ab243754033..52af592a4a6174f3336d63f3d5aa240f238837f4 100644 (file)
@@ -64,6 +64,7 @@
 #include <openssl/ocsp.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
+#include <openssl/bn.h>
 
 /* Maximum leeway in validity period: default 5 minutes */
 #define MAX_VALIDITY_PERIOD    (5 * 60)
@@ -123,6 +124,7 @@ int MAIN(int argc, char **argv)
        int accept_count = -1;
        int badarg = 0;
        int i;
+       int ignore_err = 0;
        STACK *reqnames = NULL;
        STACK_OF(OCSP_CERTID) *ids = NULL;
 
@@ -182,6 +184,8 @@ int MAIN(int argc, char **argv)
                                }
                        else badarg = 1;
                        }
+               else if (!strcmp(*args, "-ignore_err"))
+                       ignore_err = 1;
                else if (!strcmp(*args, "-noverify"))
                        noverify = 1;
                else if (!strcmp(*args, "-nonce"))
@@ -781,8 +785,10 @@ int MAIN(int argc, char **argv)
 
        if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL)
                {
-               BIO_printf(out, "Responder Error: %s (%ld)\n",
+               BIO_printf(out, "Responder Error: %s (%d)\n",
                                OCSP_response_status_str(i), i);
+               if (ignore_err)
+                       goto redo_accept;
                ret = 0;
                goto end;
                }
@@ -845,7 +851,7 @@ int MAIN(int argc, char **argv)
 
                if(i <= 0)
                        {
-                       BIO_printf(bio_err, "Response Verify Failure\n", i);
+                       BIO_printf(bio_err, "Response Verify Failure\n");
                        ERR_print_errors(bio_err);
                        }
                else