Skip to content

Instantly share code, notes, and snippets.

@Jakuje
Created September 27, 2019 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jakuje/c9f6b87df9882bed7d11787a9e6165c2 to your computer and use it in GitHub Desktop.
Save Jakuje/c9f6b87df9882bed7d11787a9e6165c2 to your computer and use it in GitHub Desktop.
diff --git a/src/libopensc/card-idprime.c b/src/libopensc/card-idprime.c
index 7f71b789..57fe8b8f 100644
--- a/src/libopensc/card-idprime.c
+++ b/src/libopensc/card-idprime.c
@@ -188,7 +188,7 @@ static int idprime_process_index(sc_card_t *card, idprime_private_data_t *priv,
&& start[7] == 0x30) {
new_object.fd++;
/* The key reference is one bigger than the value found here for some reason */
- new_object.key_reference = start[8] + 1;
+ new_object.key_reference = 0x11;
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Found certificate with fd=%d",
new_object.fd);
idprime_add_object_to_list(&priv->pki_list, &new_object);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment