]> www.average.org Git - pam_pcsc_cr.git/commitdiff
rename test chalresp
authorEugene Crosser <Eugene.Crosser@ru.ibm.com>
Thu, 31 Oct 2013 11:19:18 +0000 (15:19 +0400)
committerEugene Crosser <Eugene.Crosser@ru.ibm.com>
Thu, 31 Oct 2013 11:19:18 +0000 (15:19 +0400)
Makefile.am
test_chalresp.c [new file with mode: 0644]
test_cr.c [deleted file]

index c2b8529fc244d26038e1d64d3c6391101ec545a0..05241a328372188c2554c0ab36191978b4868054 100644 (file)
@@ -15,10 +15,10 @@ lib_LTLIBRARIES = pam_pcsc_cr.la
 pam_pcsc_cr_la_LDFLAGS = -module -avoid-version
 pam_pcsc_cr_la_LIBADD = libpcsc_cr.la
 
-check_PROGRAMS = test_crypto test_cr
+check_PROGRAMS = test_crypto test_chalresp
 test_crypto_LDADD = libpcsc_cr.la
-test_cr_LDADD = libpcsc_cr.la
+test_chalresp_LDADD = libpcsc_cr.la
 
 EXTRA_DIST = autogen.sh
 
-TESTS = test_crypto test_cr
+TESTS = test_crypto test_chalresp
diff --git a/test_chalresp.c b/test_chalresp.c
new file mode 100644 (file)
index 0000000..43991d1
--- /dev/null
@@ -0,0 +1,47 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include "pcsc_cr.h"
+
+unsigned char chal[] = {
+0x0f,0x65,0xd1,0x3a,0xfe,0xcb,0xc4,0xb9,0x52,0xb1,0x60,0xcf,0xe8,0x55,0x6a,0xdd,0xfb,0xef,0xf6,0x55,0x83,0x4c,0x8d,0xea,0x38,0xea,0x3b,0x26,0xf7,0x0a,0xe8,0x0d,0x31,0x38,0xee,0x16,0x5d,0xab,0x8b,0x7f,0xf0,0x1b,0xe3,0xbe,0xd8,0x4b,0x6e,0x44,0x42,0x8d,0x0f,0xc1,0x3b,0x23,0xea,0xfe,0xc0,0x68,0xc1,0x0f,0x60,0x6c,0xf4};
+
+static void usage(const char const *cmd)
+{
+       fprintf(stderr, "usage: %s [-o backend:name=value] ...\n", cmd);
+}
+
+int main(int argc, char *argv[])
+{
+       unsigned char rbuf[20];
+       int rsize = sizeof(rbuf);
+       int i;
+       long rc;
+       int c;
+
+       while ((c = getopt(argc, argv, "ho:")) != -1) switch (c) {
+       case 'h':
+               usage(argv[0]);
+               exit(0);
+       case 'o':
+               if (pcsc_option(optarg)) {
+                       fprintf(stderr, "Option \"%s\" bad\n", optarg);
+                       exit(1);
+               }
+               break;
+       default:
+               usage(argv[0]);
+               exit(1);
+       }
+
+       memset(rbuf, 0xFE, sizeof(rbuf));
+       rc = pcsc_cr(chal, sizeof(chal), rbuf, &rsize);
+       printf("rc=%ld (%s) rsize=%d:", rc, pcsc_errstr(rc), rsize);
+       for (i = 0; i < rsize; i++) printf(" %02x", rbuf[i]);
+       printf("\n");
+       return rc;
+}
diff --git a/test_cr.c b/test_cr.c
deleted file mode 100644 (file)
index 43991d1..0000000
--- a/test_cr.c
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include "pcsc_cr.h"
-
-unsigned char chal[] = {
-0x0f,0x65,0xd1,0x3a,0xfe,0xcb,0xc4,0xb9,0x52,0xb1,0x60,0xcf,0xe8,0x55,0x6a,0xdd,0xfb,0xef,0xf6,0x55,0x83,0x4c,0x8d,0xea,0x38,0xea,0x3b,0x26,0xf7,0x0a,0xe8,0x0d,0x31,0x38,0xee,0x16,0x5d,0xab,0x8b,0x7f,0xf0,0x1b,0xe3,0xbe,0xd8,0x4b,0x6e,0x44,0x42,0x8d,0x0f,0xc1,0x3b,0x23,0xea,0xfe,0xc0,0x68,0xc1,0x0f,0x60,0x6c,0xf4};
-
-static void usage(const char const *cmd)
-{
-       fprintf(stderr, "usage: %s [-o backend:name=value] ...\n", cmd);
-}
-
-int main(int argc, char *argv[])
-{
-       unsigned char rbuf[20];
-       int rsize = sizeof(rbuf);
-       int i;
-       long rc;
-       int c;
-
-       while ((c = getopt(argc, argv, "ho:")) != -1) switch (c) {
-       case 'h':
-               usage(argv[0]);
-               exit(0);
-       case 'o':
-               if (pcsc_option(optarg)) {
-                       fprintf(stderr, "Option \"%s\" bad\n", optarg);
-                       exit(1);
-               }
-               break;
-       default:
-               usage(argv[0]);
-               exit(1);
-       }
-
-       memset(rbuf, 0xFE, sizeof(rbuf));
-       rc = pcsc_cr(chal, sizeof(chal), rbuf, &rsize);
-       printf("rc=%ld (%s) rsize=%d:", rc, pcsc_errstr(rc), rsize);
-       for (i = 0; i < rsize; i++) printf(" %02x", rbuf[i]);
-       printf("\n");
-       return rc;
-}