Skip to content

Instantly share code, notes, and snippets.

View kasparsd's full-sized avatar

Kaspars Dambis kasparsd

View GitHub Profile
@kasparsd
kasparsd / not-working.log
Last active October 29, 2015 13:53
OpenSC IAS/ECC card matching
0x7fff7b564000 15:34:50.140733193388729 [opensc-tool] reader-pcsc.c:260:pcsc_transmit: reader 'OMNIKEY AG Smart Card Reader'
0x7fff7b564000 15:34:50.697 [opensc-tool] apdu.c:187:sc_apdu_log:
Outgoing APDU data [ 12 bytes] =====================================
00 A4 04 00 07 A0 00 00 01 51 00 00 .........Q..
======================================================================
0x7fff7b564000 15:34:50.4294967993 [opensc-tool] reader-pcsc.c:190:pcsc_internal_transmit: called
0x7fff7b564000 15:34:50.733 [opensc-tool] apdu.c:187:sc_apdu_log:
Incoming APDU data [ 113 bytes] =====================================
6F 6D 84 07 A0 00 00 01 51 00 00 A5 62 73 2F 06 om......Q...bs/.
07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 .*.H..k.`...*.H.
@kasparsd
kasparsd / latvia-id-pkcs15-dump.txt
Created October 29, 2015 20:29
PKCS#15 Dump of Latvia ID
PKCS#15 Card [LATVIA ID]:
Version : 1
Serial number : 010011758593312F
Manufacturer ID: Oberthur Technologies
Last update : 20141113152725Z
Flags : Login required, PRN generation
PIN [User PIN]
Object Flags : [0x0]
Auth ID : 02
@kasparsd
kasparsd / latvia-id-atr-verbose.txt
Last active November 4, 2015 16:07
Verbose output of opensc-tool -a for Latvia ID card
0x7fff77ce5000 17:10:56.140733193388158 [opensc-tool] sc.c:251:sc_detect_card_presence: called
0x7fff77ce5000 17:10:56.140733193388158 [opensc-tool] reader-pcsc.c:384:pcsc_detect_card_presence: called
0x7fff77ce5000 17:10:56.126 [opensc-tool] reader-pcsc.c:294:refresh_attributes: ACS ACR122U PICC Interface check
0x7fff77ce5000 17:10:56.127 [opensc-tool] reader-pcsc.c:313:refresh_attributes: returning with: 0 (Success)
0x7fff77ce5000 17:10:56.140733193388159 [opensc-tool] reader-pcsc.c:389:pcsc_detect_card_presence: returning with: 0 (Success)
0x7fff77ce5000 17:10:56.127 [opensc-tool] sc.c:256:sc_detect_card_presence: returning with: 0 (Success)
0x7fff77ce5000 17:10:56.127 [opensc-tool] sc.c:251:sc_detect_card_presence: called
0x7fff77ce5000 17:10:56.140733193388159 [opensc-tool] reader-pcsc.c:384:pcsc_detect_card_presence: called
0x7fff77ce5000 17:10:56.127 [opensc-tool] reader-pcsc.c:294:refresh_attributes: OMNIKEY AG Smart Card Reader check
0x7fff77ce5000 17:10:56.128 [opensc-tool] reader-pcsc.c:313:refresh

Keybase proof

I hereby claim:

  • I am kasparsd on github.
  • I am kaspars (https://keybase.io/kaspars) on keybase.
  • I have a public key whose fingerprint is A134 BA02 60D4 3F8E ACC8 89D9 94F1 3532 A319 EA5D

To claim this, I am signing this object:

@kasparsd
kasparsd / icp.js
Last active November 17, 2015 23:02
_GPL.icp_perms = {
t: ["block_display", "adult", "bank", "internal", "legal", "pops_only", "provider", "technical", "toolbar", "google", "gov", "military", "block_pops"],
p: {
22555: {
b: [0]
},
a652c: {
a: 1,
b: [1, 2, 3, 4, 5, 6, 7, 8, 9]
},
@kasparsd
kasparsd / mke2fs.conf
Last active November 21, 2015 21:24
WD MyCloud EX2 RAID1 disk format
[defaults]
base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
[fs_types]
ext3 = {
@kasparsd
kasparsd / pgp-publish.sh
Created November 21, 2015 23:34
Copy your PGP public key via SSH to your server
#!/bin/bash
# Stream your PGP public key via SSH to pgp.txt on your server
gpg --export -a | ssh user@example.com 'cat > ~/pgp.txt'
@kasparsd
kasparsd / pkcs15-tool-read-cert-auth.log
Last active November 25, 2015 14:13
Latvia ID pkcs15-tool read public key and cert
$ pkcs15-tool --read-certificate 56de1e2a32da45d3ce69c6078bffea646a947405 -vvvvv
0x7fff7565b000 16:12:54.4294967800 [pkcs15-tool] sc.c:195:sc_detect_card_presence: called
0x7fff7565b000 16:12:54.140733193388537 [pkcs15-tool] reader-pcsc.c:403:pcsc_detect_card_presence: called
0x7fff7565b000 16:12:54.505 [pkcs15-tool] reader-pcsc.c:284:refresh_attributes: OMNIKEY AG Smart Card Reader check
0x7fff7565b000 16:12:54.4294967802 [pkcs15-tool] reader-pcsc.c:340:refresh_attributes: current state: 0x00000022
0x7fff7565b000 16:12:54.4294967802 [pkcs15-tool] reader-pcsc.c:341:refresh_attributes: previous state: 0x00000122
0x7fff7565b000 16:12:54.4294967802 [pkcs15-tool] reader-pcsc.c:395:refresh_attributes: card present
0x7fff7565b000 16:12:54.140733193388538 [pkcs15-tool] reader-pcsc.c:408:pcsc_detect_card_presence: returning with: 1
0x7fff7565b000 16:12:54.140733193388538 [pkcs15-tool] sc.c:200:sc_detect_card_presence: returning with: 1
@kasparsd
kasparsd / token-init.log
Created November 25, 2015 14:19
EstEID Tokend with Latvia ID
2015-11-25 16:18:43.886 main() [esteid.cpp:21] main starting with 4 arguments
2015-11-25 16:18:43.899 EstEIDToken() [EstEIDToken.cpp:84] new EstEIDToken()
2015-11-25 16:18:43.899 probe() [EstEIDToken.cpp:95] _
2015-11-25 16:18:43.899 probe() [EstEIDToken.cpp:96] _ __ _ __ ___ | |__ ___
2015-11-25 16:18:43.900 probe() [EstEIDToken.cpp:97] | '_ \| '__/ _ \| '_ \ / _ \
2015-11-25 16:18:43.900 probe() [EstEIDToken.cpp:98] | |_) | | | (_) | |_) | __/
2015-11-25 16:18:43.900 probe() [EstEIDToken.cpp:99] | .__/|_| \___/|_.__/ \___|
2015-11-25 16:18:43.900 probe() [EstEIDToken.cpp:100] |_|
2015-11-25 16:18:43.900 probe() [EstEIDToken.cpp:108] current ATR: '3BDD18008131FE45904C41545649412D65494490008C'
2015-11-25 16:18:43.901 _connectAndBeginTransaction() [EstEIDToken.cpp:672] Connecting using reader: OMNIKEY AG Smart Card Reader - current state: 0x10, event state: 0x7FFF00000022
@kasparsd
kasparsd / links.php
Created December 1, 2015 11:30
Basic WordPress Links (Blogroll) Shortcode