Skip to content

Conversation

@frankmorgner
Copy link
Member

Fixes #2461

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

Copy link
Member

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to squash the fixup commits before merging the changes or are we fine merging it as it is?

Some cards don't accept selection from MF (P1=08), but only relative
selection (P1=02). This breaks the default implementation of
sc_enum_apps() for those cards. Use a default EF.DIR for detection and
initializing the card's apps.
…_sfid

fixes ignoring 6282 due to automatic retry of reading the requested
number of bytes in sc_read_binary
@frankmorgner
Copy link
Member Author

Do you want to squash the fixup commits before merging the changes or are we fine merging it as it is?

Done. The only change I was not able to verify is whether or not 043a7b0 is the correct fix to the strict aliasing problem...

@Jakuje
Copy link
Member

Jakuje commented Dec 20, 2021

Do you want to squash the fixup commits before merging the changes or are we fine merging it as it is?

Done. The only change I was not able to verify is whether or not 043a7b0 is the correct fix to the strict aliasing problem...

I think it is correct. These are very similar changes I did in 2fa6700 when I was tackling this issue in the rest of the code. But I do not build the openpace so I probably did not hit this issue.

Did you try with -Wstrict-aliasing=2 in CFLAGS? I think this was enough to trigger the warning/error (added now into --enable-strict in configure.ac with 544dcc6.

@Jakuje Jakuje merged commit 7dc966b into OpenSC:master Jan 6, 2022
@frankmorgner
Copy link
Member Author

Sorry for the late feedback. No, I wasn't able to see the warnings for the unmodified code with gcc 10.3.0 and the above flags. Could we make this strict build part of the CI process?

@Jakuje
Copy link
Member

Jakuje commented Jan 6, 2022

np. I was adding the -Wstrict-aliasing=2 in the above mentioned commit, but the linux builds do not use openpace so that parts are not executed. It should be executed on OSX though. I see the flags used there, but I am not sure what gcc/clang/compiler is used there and whether it supports this warnings correctly.

The simplest would probably be to add one more target to linux with building also openpace (It is not in the current ubuntu version in GH).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.22.0] npa card not detected

2 participants