summaryrefslogtreecommitdiff
path: root/tests/ocsp-basic-response.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ocsp-basic-response.c')
-rw-r--r--tests/ocsp-basic-response.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/ocsp-basic-response.c b/tests/ocsp-basic-response.c
index 701ed53..3a190a8 100644
--- a/tests/ocsp-basic-response.c
+++ b/tests/ocsp-basic-response.c
@@ -1,3 +1,23 @@
+/*
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * This file is part of LIBTASN1.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -36,7 +56,7 @@ main (int argc, char** argv)
exit (1);
}
- fp = fopen(datafile, "r");
+ fp = fopen(datafile, "rb");
if (fp == NULL)
{
fprintf (stderr, "error in %d\n", __LINE__);
@@ -76,7 +96,7 @@ main (int argc, char** argv)
if (etype != ASN1_ETYPE_OCTET_STRING)
{
- fprintf (stderr, "error in %d: The type (%d) doesn't match octet string.\n", __LINE__, etype);
+ fprintf (stderr, "error in %d: The type (%d) doesn't match octet string.\n", __LINE__, (int)etype);
exit (1);
}