Saturday, October 15. 2016
Starting to play with DNIe 3.0 and OpenSC
Comments
Display comments as
(Linear | Threaded)
Hola,
yo conseguí que me funcionase el DNI 2.0 en una linux gentoo. Actualmente tengo un DNI 3.0 y también acceso a uno de 2.0.
Si me mandases el código fuente de tu opensc parcheado creó que conseguría compilarlo y hacer que funcionase.
Atentamente,
Albert
yo conseguí que me funcionase el DNI 2.0 en una linux gentoo. Actualmente tengo un DNI 3.0 y también acceso a uno de 2.0.
Si me mandases el código fuente de tu opensc parcheado creó que conseguría compilarlo y hacer que funcionase.
Atentamente,
Albert
Me gustaría que probaras lo último quy hay en opensc con el 2.0:
git clone https://github.com/rickyepoderi/OpenSC.git
./bootstrap
./configure --enable-dnie-ui --prefix=/donde/quieras
./pkcs11-tool -d XXXXXXXXXXXXXX -s
Más info aquí:
http://blogs.nologin.es/rickyepoderi/index.php?/archives/122-Useful-links-and-commands-when-collaborating-in-GitHub.html
git clone https://github.com/rickyepoderi/OpenSC.git
./bootstrap
./configure --enable-dnie-ui --prefix=/donde/quieras
./pkcs11-tool -d XXXXXXXXXXXXXX -s
Más info aquí:
http://blogs.nologin.es/rickyepoderi/index.php?/archives/122-Useful-links-and-commands-when-collaborating-in-GitHub.html
Lo intentaré probar estos días, que tengo el viejo por aquí...Lo intenté, pero mis muros fueron estos:
} else if ((0xff & from->le) > 0) {
y
//provider->status.session.state = CWA_SM_INPROGRESS;
¡Eres una máquina! Gracias por el curro.
} else if ((0xff & from->le) > 0) {
y
//provider->status.session.state = CWA_SM_INPROGRESS;
¡Eres una máquina! Gracias por el curro.
Hola Miguel,
Lo primero a saber es porque falla lo del getResponse. Luego hay varias cosas que las hice demasiado rápido solo para ver si funcionaba. Hay que cambiar varias cosas. Pero lo dicho, hasta que no sepamos porque falla lo del getResponse es tontería seguir. Si queréis mandarme un mail mejor lo tenéis pinchando en el enlace de autor en el menú.
Lo primero a saber es porque falla lo del getResponse. Luego hay varias cosas que las hice demasiado rápido solo para ver si funcionaba. Hay que cambiar varias cosas. Pero lo dicho, hasta que no sepamos porque falla lo del getResponse es tontería seguir. Si queréis mandarme un mail mejor lo tenéis pinchando en el enlace de autor en el menú.
Miguel has confirmed that current OpenSC implementation of the DNIe is working for 2.0. Therefore something else is happening here. I'll try to move the changes commented in the entry to the current branch and I'll test it again. Let's see if something more is discovered.
DNI 2.0
./pkcs11-tool -l -O
Using slot 0 with a present token (0x0)
error: PKCS11 function C_Login failed: rv = CKR_ARGUMENTS_BAD (0x7)
Aborting.
mestres@tux ~/dni30/bin $ dnie-tool -V
bash: dnie-tool: command not found
mestres@tux ~/dni30/bin $ ./dnie-tool -V
Using reader with a card: C3PO LTC31 v2 (00509883) 00 00
DNIe Version: DNIe 01.13 B11 H 4C34 EXP 1-((4.2-5))
DNI 3.0
mestres@tux ~/dni30/bin $ ./pkcs11-tool -l -O
Using slot 0 with a present token (0x0)
Segmentation fault
mestres@tux ~/dni30/bin $ ./dnie-tool -V
Using reader with a card: C3PO LTC31 v2 (00509883) 00 00
Failed to connect to card: Card is invalid or cannot be handled
Error: Cannot connect with card
./pkcs11-tool -l -O
Using slot 0 with a present token (0x0)
error: PKCS11 function C_Login failed: rv = CKR_ARGUMENTS_BAD (0x7)
Aborting.
mestres@tux ~/dni30/bin $ dnie-tool -V
bash: dnie-tool: command not found
mestres@tux ~/dni30/bin $ ./dnie-tool -V
Using reader with a card: C3PO LTC31 v2 (00509883) 00 00
DNIe Version: DNIe 01.13 B11 H 4C34 EXP 1-((4.2-5))
DNI 3.0
mestres@tux ~/dni30/bin $ ./pkcs11-tool -l -O
Using slot 0 with a present token (0x0)
Segmentation fault
mestres@tux ~/dni30/bin $ ./dnie-tool -V
Using reader with a card: C3PO LTC31 v2 (00509883) 00 00
Failed to connect to card: Card is invalid or cannot be handled
Error: Cannot connect with card
mestres@tux ~ $ git clone https://github.com/rickyepoderi/OpenSC.git
Cloning into 'OpenSC'...
remote: Counting objects: 41124, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 41124 (delta 4), reused 0 (delta 0), pack-reused 41110
Receiving objects: 100% (41124/41124), 10.19 MiB | 4.61 MiB/s, done.
Resolving deltas: 100% (33032/33032), done.
Checking connectivity... done.
mestres@tux ~ $ cd OpenSC/
mestres@tux ~/OpenSC $ ./bootstrap
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force -I m4
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --force
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoreconf-2.69: running: automake --add-missing --copy --force-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by
Cloning into 'OpenSC'...
remote: Counting objects: 41124, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 41124 (delta 4), reused 0 (delta 0), pack-reused 41110
Receiving objects: 100% (41124/41124), 10.19 MiB | 4.61 MiB/s, done.
Resolving deltas: 100% (33032/33032), done.
Checking connectivity... done.
mestres@tux ~ $ cd OpenSC/
mestres@tux ~/OpenSC $ ./bootstrap
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force -I m4
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
autoreconf-2.69: running: /usr/bin/autoconf-2.69 --force
autoreconf-2.69: running: /usr/bin/autoheader-2.69 --force
autoreconf-2.69: running: automake --add-missing --copy --force-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by
Hi Albert,
After the clone please change to dnie30 branch
git clone https://github.com/rickyepoderi/OpenSC.git
cd OpenSC
git checkout dnie30
./bootstrap
./configure -prefix=...
make
make install
After the clone please change to dnie30 branch
git clone https://github.com/rickyepoderi/OpenSC.git
cd OpenSC
git checkout dnie30
./bootstrap
./configure -prefix=...
make
make install
Comments