Giter Club home page Giter Club logo

Comments (7)

arges avatar arges commented on June 19, 2024

So I've done a bit more debugging and found out that the following diff makes the smartcard work:
--- a/src/libopensc/types.h
+++ b/src/libopensc/types.h
@@ -169,9 +169,9 @@ struct sc_crt {
#define SC_AC_OP_PIN_RESET 19
#define SC_AC_OP_ACTIVATE 20
#define SC_AC_OP_DEACTIVATE 21
-#define SC_AC_OP_READ 22
-#define SC_AC_OP_UPDATE 23
-#define SC_AC_OP_WRITE 24
+#define SC_AC_OP_READ 0
+#define SC_AC_OP_UPDATE 1
+#define SC_AC_OP_WRITE 3
#define SC_AC_OP_RESIZE 25
#define SC_AC_OP_GENERATE 26
#define SC_AC_OP_CREATE_EF 27

So the commit 1d82e8a changes the AC_OP numbers, and changing them back seemed to fix this regression.

from opensc.

arges avatar arges commented on June 19, 2024

It appears that just the WRITE variable needs to be changed to 3 to make this work.

from opensc.

viktorTarasov avatar viktorTarasov commented on June 19, 2024

OpenSC has changed a lot from 0.12.2 to 0.13.0 .

Would be nice if you could reproduce your problem with the latest master and with maximal debug level.

from opensc.

arges avatar arges commented on June 19, 2024

I've already tested with the latest OpenSC from git as of e8eb4cd (1 month ago), and the problem still exists. I'll get maximal debug output from the latest git when I can and attach it here.

Like I mentioned before I was able to bisect the issue and it seems like changing SC_AC_OP_WRITE from 24 to 3, fixes the issue for this card, so looks like something specific with starcos code.

from opensc.

arges avatar arges commented on June 19, 2024

Log is attached here: https://launchpadlibrarian.net/140033445/opensc_log.txt

from opensc.

frankmorgner avatar frankmorgner commented on June 19, 2024

in 8ed4db7 SC_AC_OP_CREATE and SC_AC_OP_WRITE are defined as 3, which seems like an error. 1d82e8a fixes this in defining SC_AC_OP_WRITE to 24.

It looks like somewhere in pkcs15-init something is written where creation was missing beforehand. I don't have such a card, could you check with yours?

from opensc.

frankmorgner avatar frankmorgner commented on June 19, 2024

Please re-open the issue if it is still relevant or if you have news about possible fixes.

from opensc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.