Skip to content

Instantly share code, notes, and snippets.

@lmiguelmh
lmiguelmh / gist:f60acc8da8e26e8d3eff78dc67f93525
Created November 10, 2017 17:38
Dump of the EF.TokenInfo (path 3f0050155032) from an Oberthur ID-One Cosmo v7 (AuthentIC 3.2.2) smart card
C:\Program Files\OpenSC Project\OpenSC\tools>opensc-explorer.exe -v -m 3F00
OpenSC Explorer version 0.17.0
Using reader with a card: Gemplus USB Smart Card Reader 0
OpenSC [3F00]> cd 5015
OpenSC [3F00/5015]> asn 5032
Printing tags for buffer of length 745
30 Univ: tag 0x10, length 741: SEQUENCE
02 Univ: tag 0x02, length 1: INTEGER [1]
0C Univ: tag 0x0C, length 21: UTF8STRING [Oberthur Technologies]
80 Cntx: tag 0x00, length 6: <raw content> [4F5420415750]
# If you want support for OpenSSL (needed for pkcs15-init tool, software hashing in PKCS#11 library and verification):
# - download and build OpenSSL
# - uncomment the line starting with OPENSSL_DEF
# - set the OPENSSL_INCL_DIR below to your openssl include directory, preceded by "/I"
# - set the OPENSSL_LIB below to your openssl lib file
OPENSSL_DEF= /DENABLE_OPENSSL
!IF "$(OPENSSL_DEF)" == "/DENABLE_OPENSSL"
!IF "$(PLATFORM)" == "x86"
OPENSSL_DIR = C:\OpenSSL-Win32
!ELSE
// color equalization fuuu
int colors = 16;
byte[] r = new byte[colors];
byte[] g = new byte[colors];
byte[] b = new byte[colors];
for (int i = 0; i < colors; i++) {
r[i] = (byte) (i*256/colors & 0xFF);
g[i] = (byte) (i*256/colors & 0xFF);
b[i] = (byte) (i*256/colors & 0xFF);
}