From 0fdb4478bc2f00af5eae8fb8383bc1f995352c46 Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 15 Mar 2010 10:34:18 +0000 Subject: [PATCH] On blank, but otherwise perfectly supported card, we get an error here (with "Unsupported card"). This needs to be improved. This patch changes the "initialization" to "binding", so we at least can tell people: you need to initialized an empty card first. Needs to be improved of course. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4117 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/tools/pkcs15-crypt.c | 2 +- src/tools/pkcs15-init.c | 2 +- src/tools/pkcs15-tool.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/pkcs15-crypt.c b/src/tools/pkcs15-crypt.c index ef1e74d1..033e8165 100644 --- a/src/tools/pkcs15-crypt.c +++ b/src/tools/pkcs15-crypt.c @@ -579,7 +579,7 @@ int main(int argc, char * const argv[]) fprintf(stderr, "Trying to find a PKCS #15 compatible card...\n"); r = sc_pkcs15_bind(card, &p15card); if (r) { - fprintf(stderr, "PKCS #15 initialization failed: %s\n", sc_strerror(r)); + fprintf(stderr, "PKCS #15 binding failed: %s\n", sc_strerror(r)); err = 1; goto end; } diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c index 935d912d..b72d8b46 100644 --- a/src/tools/pkcs15-init.c +++ b/src/tools/pkcs15-init.c @@ -449,7 +449,7 @@ main(int argc, char **argv) r = sc_pkcs15_bind(card, &p15card); if (r) { fprintf(stderr, - "PKCS#15 initialization failed: %s\n", + "PKCS#15 binding failed: %s\n", sc_strerror(r)); break; } diff --git a/src/tools/pkcs15-tool.c b/src/tools/pkcs15-tool.c index 396d35cc..ff9bf05f 100644 --- a/src/tools/pkcs15-tool.c +++ b/src/tools/pkcs15-tool.c @@ -1633,7 +1633,7 @@ int main(int argc, char * const argv[]) fprintf(stderr, "Trying to find a PKCS#15 compatible card...\n"); r = sc_pkcs15_bind(card, &p15card); if (r) { - fprintf(stderr, "PKCS#15 initialization failed: %s\n", sc_strerror(r)); + fprintf(stderr, "PKCS#15 binding failed: %s\n", sc_strerror(r)); err = 1; goto end; }