Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issues #879

Closed
wants to merge 2 commits into from
Closed

Fixed issues #879

wants to merge 2 commits into from

Conversation

FeitianSmartcardReader
Copy link
Contributor

  1. Solved multiple epss2003 usage issue
  2. check expats point to prevent memory leak
  3. Add new ATR for entersafe PKI card
  4. declare all variables at the beginning of block
  5. Solved Incorrect PIN raise wrong CKR error, no token flags change

1. Solved multiple epss2003
2. check expats point to prevent memory leak
3. Add new ATR for entersafe PKI card
4. declare all variables at the beginning of block
5. Solved Incorrect PIN raise wrong CKR error, no token flags change
@FeitianSmartcardReader
Copy link
Contributor Author

Solved #871 #731 #730

@@ -106,11 +107,100 @@ typedef struct epass2003_exdata_st {
((unsigned long)x & 0x0000FF00)<< 8 | \
((unsigned long)x & 0x000000FF)<< 24)

#define pin_low_notify(ret) \
printf("Verification failed (remaining tries: %d)\n",ret)
Copy link
Member

Choose a reason for hiding this comment

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

indenting: use tabs instead of spaces

{ 0x6200, SC_ERROR_CARD_CMD_FAILED, "Warning: no information given, non-volatile memory is unchanged" },
{ 0x6281, SC_ERROR_CORRUPTED_DATA, "Part of returned data may be corrupted" },
{ 0x6282, SC_ERROR_FILE_END_REACHED, "End of file/record reached before reading Le bytes" },
{ 0x6283, SC_ERROR_CARD_CMD_FAILED, "Selected file invalidated" },
Copy link
Member

Choose a reason for hiding this comment

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

indenting: use tabs instead of spaces

int i;

/* Handle special cases here */
if (sw1 == 0x6C) {
Copy link
Member

Choose a reason for hiding this comment

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

indenting: use tabs instead of spaces

@@ -106,11 +107,100 @@ typedef struct epass2003_exdata_st {
((unsigned long)x & 0x0000FF00)<< 8 | \
((unsigned long)x & 0x000000FF)<< 24)

#define pin_low_notify(ret) \
printf("Verification failed (remaining tries: %d)\n",ret)
Copy link
Member

Choose a reason for hiding this comment

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

don't use printf. instead use sc_log!

@frankmorgner
Copy link
Member

@velter , @ValenMX, could you please check if this fixes your issues?

1. Using tab instead space
2. instead printf to sc_log
@FeitianSmartcardReader
Copy link
Contributor Author

@frankmorgner the code was confirmed by ValenVM and Velter in #787 and #770

const int err_count = sizeof(epass2003_errors)/sizeof(epass2003_errors[0]);
int i;

/* Handle special cases here */
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, you commit introduces new spaces...

@@ -2493,14 +2493,15 @@ update_secret_key(struct sc_card *card, unsigned char ktype, unsigned char kid,
return r;
}

#if 1
Copy link
Member

Choose a reason for hiding this comment

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

should be removed

@FeitianSmartcardReader
Copy link
Contributor Author

FeitianSmartcardReader commented Oct 10, 2016

I see, will check it, thanks

@frankmorgner
Copy link
Member

I fixed the outstanding changes

@frankmorgner
Copy link
Member

... and pushed them to master

@FeitianSmartcardReader
Copy link
Contributor Author

@frankmorgner Thanks

Jakuje pushed a commit to Jakuje/OpenSC that referenced this pull request Nov 11, 2016
1. Solved multiple epss2003
2. check expats point to prevent memory leak
3. Add new ATR for entersafe PKI card
4. declare all variables at the beginning of block
5. Solved Incorrect PIN raise wrong CKR error, no token flags change

Closes OpenSC#879
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.

None yet

2 participants