Skip to content

Instantly share code, notes, and snippets.

Jakub Jelen Jakuje

Block or report user

Report or block Jakuje

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View opensc_idprime2.patch
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;
View openssh_sig_alg_dump.patch
diff --git a/ssh-rsa.c b/ssh-rsa.c
index 6e2bba0d..b82045e2 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -232,6 +232,7 @@ ssh_rsa_verify(const struct sshkey *key,
ret = SSH_ERR_KEY_TYPE_MISMATCH;
goto out;
}
+ debug("Verifying signature with ktype=%s and hash_alg=%d", ktype, hash_alg);
if (sshbuf_get_string(b, &sigblob, &len) != 0) {
View uninitialized_asepcos.log
[opensc-pkcs11] ctx.c:790:sc_context_create: ===================================
[opensc-pkcs11] ctx.c:791:sc_context_create: opensc version: 0.16.0
[opensc-pkcs11] reader-pcsc.c:754:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1 enable_pace=1
[opensc-pkcs11] reader-pcsc.c:1154:pcsc_detect_readers: called
[opensc-pkcs11] reader-pcsc.c:1168:pcsc_detect_readers: Probing PC/SC readers
[opensc-pkcs11] reader-pcsc.c:1196:pcsc_detect_readers: Establish PC/SC context
[opensc-pkcs11] reader-pcsc.c:1243:pcsc_detect_readers: Found new PC/SC reader 'OMNIKEY AG CardMan 3021 00 00'
[opensc-pkcs11] reader-pcsc.c:303:refresh_attributes: OMNIKEY AG CardMan 3021 00 00 check
[opensc-pkcs11] reader-pcsc.c:331:refresh_attributes: current state: 0x00080122
[opensc-pkcs11] reader-pcsc.c:332:refresh_attributes: previous state: 0x00000000
@Jakuje
Jakuje / README.md
Last active Mar 19, 2019
OpenSC test Sign, Verify, Encipher and Decipher from commandline with OpenSSL CLI
View README.md
export PIN=111111
export SIGN_KEY=11
export ENC_KEY=55

Sign/Verify using private key/certificate

  • Create a data to sign

    echo "data to sign (max 100 bytes)" > data
    
View opensc-tool-serial-all.log
0x7fbb8f041700 09:52:11.092 [opensc-tool] ctx.c:664:process_config_file: scconf_parse failed: Unable to open "/usr/local/etc/opensc.conf": No such file or directory
0x7fbb8f041700 09:52:11.092 [opensc-tool] ctx.c:789:sc_context_create: ===================================
0x7fbb8f041700 09:52:11.092 [opensc-tool] ctx.c:790:sc_context_create: opensc version: 0.16.0
0x7fbb8f041700 09:52:11.092 [opensc-tool] reader-pcsc.c:754:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1 enable_pace=1
0x7fbb8f041700 09:52:11.093 [opensc-tool] reader-pcsc.c:1154:pcsc_detect_readers: called
0x7fbb8f041700 09:52:11.093 [opensc-tool] reader-pcsc.c:1168:pcsc_detect_readers: Probing PC/SC readers
0x7fbb8f041700 09:52:11.093 [opensc-tool] reader-pcsc.c:1196:pcsc_detect_readers: Establish PC/SC context
0x7fbb8f041700 09:52:11.102 [opensc-tool] reader-pcsc.c:1243:pcsc_detect_readers: Found new PC/SC reader 'OMNIKEY AG CardMan 3121 00 00'
0x7fbb8f041700 09:52:1
View mcrd_coolkey.log
0x7f1953507700 19:15:57.751 [opensc-pkcs11] ctx.c:790:sc_context_create: ===================================
0x7f1953507700 19:15:57.751 [opensc-pkcs11] ctx.c:791:sc_context_create: opensc version: 0.16.0
0x7f1953507700 19:15:57.752 [opensc-pkcs11] reader-pcsc.c:754:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1 enable_pace=1
0x7f1953507700 19:15:57.752 [opensc-pkcs11] reader-pcsc.c:1154:pcsc_detect_readers: called
0x7f1953507700 19:15:57.752 [opensc-pkcs11] reader-pcsc.c:1168:pcsc_detect_readers: Probing PC/SC readers
0x7f1953507700 19:15:57.752 [opensc-pkcs11] reader-pcsc.c:1196:pcsc_detect_readers: Establish PC/SC context
0x7f1953507700 19:15:57.765 [opensc-pkcs11] reader-pcsc.c:1243:pcsc_detect_readers: Found new PC/SC reader 'OMNIKEY AG CardMan 3121 00 00'
0x7f1953507700 19:15:57.765 [opensc-pkcs11] reader-pcsc.c:303:refresh_attributes: OMNIKEY AG CardMan 3121 00 00 check
0x7f1953507700 19:15:57.765 [opensc-pkcs11] reader-pcsc
View WaitForSlotEvent with (piv, coolkey)
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] pkcs11-global.c:646:C_WaitForSlotEvent: C_WaitForSlotEvent(block=1)
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] slot.c:488:slot_find_changed: called
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] slot.c:359:card_detect_all: Detect all cards
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] slot.c:224:card_detect: OMNIKEY AG CardMan 3121 00 00: Detecting smart card
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] sc.c:271:sc_detect_card_presence: called
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] reader-pcsc.c:397:pcsc_detect_card_presence: called
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] reader-pcsc.c:303:refresh_attributes: OMNIKEY AG CardMan 3121 00 00 check
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] reader-pcsc.c:323:refresh_attributes: returning with: 0 (Success)
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] reader-pcsc.c:402:pcsc_detect_card_presence: returning with: 0 (Success)
0x7f8a6742e700 09:39:20.355 [opensc-pkcs11] sc.c:276:sc_detect_card_presence: returning with: 0
View overwrite_function.js
isOldGeocachingDomain = isGeocachingDomain
function isGeocachingDomain(url) {
if (isOldGeocachingDomain(url)
|| url == "project-gc.com"
|| url == "www.project-gc.com") {
return true;
}
@Jakuje
Jakuje / stylish.geocaching.css
Created Jun 23, 2016
geocaching.com/pocket move button
View stylish.geocaching.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.geocaching.com") {
#ctl00_ContentBody_btnSubmit {
position:absolute;
top:10px;
left:10px
}
}
@Jakuje
Jakuje / update_gpx.sh
Created May 20, 2015
Using xsl transfrom gpx to txt file used by Navit on my webOS phone
View update_gpx.sh
#!/bin/bash
#FILENAME="9897043"
FILENAME=$1
#wget -O ${FILENAME}.gpx "http://www.geocaching.com/pocket/downloadpq.ashx?g=fba142aa-e661-4533-ad6d-3220b900241c&src=web"
[ -f "${FILENAME}.zip" ] && unzip "${FILENAME}.zip"
xsltproc ~/.local/bin/gpx2navit.xsl ${FILENAME}{,-wpts}.gpx > ${FILENAME}_nav.txt
cat ${FILENAME}_nav.txt | novaterm put file:///media/internal/appdata/org.webosinternals.navit/maps/cache.txt
You can’t perform that action at this time.