[pkg-opensc-commit] [libp11] 14/33: Workaround for an OpenSC object ID bug
Eric Dorland
eric at moszumanska.debian.org
Mon Sep 19 02:11:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit a3ca1875011b3073d1c2e5066b5472d23ba5f8ac
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date: Fri Jul 22 21:03:19 2016 +0200
Workaround for an OpenSC object ID bug
Recent versions of OpenSC truncate object IDs starting with 0x00.
This commit changes the object ID used in libp11 test suite,
so it is unaffected by this OpenSC bug.
A corresponding test should be added to OpenSC to help fixing
the root cause.
---
tests/rsa-common.sh | 6 +++---
tests/rsa-evp-sign.softhsm | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/rsa-common.sh b/tests/rsa-common.sh
index 34ee8ef..ba1faf5 100755
--- a/tests/rsa-common.sh
+++ b/tests/rsa-common.sh
@@ -94,17 +94,17 @@ PUK=1234
init_card $PIN $PUK
# generate key in token
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/rsa-prvkey.der -y privkey >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 01020304 -a server-key -l -w ${srcdir}/rsa-prvkey.der -y privkey >/dev/null
if test $? != 0;then
exit 1;
fi
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/rsa-pubkey.der -y pubkey >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 01020304 -a server-key -l -w ${srcdir}/rsa-pubkey.der -y pubkey >/dev/null
if test $? != 0;then
exit 1;
fi
-pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 00010203 -a server-key -l -w ${srcdir}/rsa-cert.der -y cert >/dev/null
+pkcs11-tool -p $PIN --module $ADDITIONAL_PARAM -d 01020304 -a server-key -l -w ${srcdir}/rsa-cert.der -y cert >/dev/null
if test $? != 0;then
exit 1;
fi
diff --git a/tests/rsa-evp-sign.softhsm b/tests/rsa-evp-sign.softhsm
index 2455a8f..4d60c83 100755
--- a/tests/rsa-evp-sign.softhsm
+++ b/tests/rsa-evp-sign.softhsm
@@ -25,8 +25,8 @@ outdir="output.$$"
sed -e "s|@MODULE_PATH@|${ADDITIONAL_PARAM}|g" -e "s|@ENGINE_PATH@|../src/.libs/pkcs11.so|g" <"${srcdir}/engines.cnf.in" >"${outdir}/engines.cnf"
export OPENSSL_ENGINES="../src/.libs/"
-PRIVATE_KEY="pkcs11:token=libp11-test;id=%00%01%02%03;object=server-key;type=private;pin-value=1234"
-PUBLIC_KEY="pkcs11:token=libp11-test;id=%00%01%02%03;object=server-key;type=public;pin-value=1234"
+PRIVATE_KEY="pkcs11:token=libp11-test;id=%01%02%03%04;object=server-key;type=private;pin-value=1234"
+PUBLIC_KEY="pkcs11:token=libp11-test;id=%01%02%03%04;object=server-key;type=public;pin-value=1234"
./evp-sign ctrl false "${outdir}/engines.cnf" ${PRIVATE_KEY} ${PUBLIC_KEY} ${ADDITIONAL_PARAM}
if test $? != 0;then
@@ -58,7 +58,7 @@ if test $? != 0;then
exit 1;
fi
-./evp-sign default 1234 "${outdir}/engines.cnf" "id_00010203" "id_00010203" ${ADDITIONAL_PARAM}
+./evp-sign default 1234 "${outdir}/engines.cnf" "id_01020304" "id_01020304" ${ADDITIONAL_PARAM}
if test $? != 0;then
echo "Basic PKCS #11 test with legacy name #2 failed"
exit 1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list