Package: opensc Version: 0.11.4-5+lenny1 Severity: important When I run pkcs15-tool --read-public-key command it terminates with segmentation fault.
mrkooll ~ > pkcs15-tool --list-keys Private RSA Key [Private Key] Com. Flags : 3 Usage : [0x20C], sign, signRecover, nonRepudiation Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract, local ModLength : 1024 Key ref : 16 Native : yes Path : 3f005015 Auth ID : 01 ID : 45 Private RSA Key [Private Key] Com. Flags : 3 Usage : [0x22], decrypt, unwrap Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract, local ModLength : 1024 Key ref : 17 Native : yes Path : 3f005015 Auth ID : 01 ID : 46 Private RSA Key [Private Key] Com. Flags : 3 Usage : [0x20C], sign, signRecover, nonRepudiation Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract, local ModLength : 1024 Key ref : 18 Native : yes Path : 3f005015 Auth ID : 01 ID : 47 I need public key 47 mrkooll ~ > pkcs15-tool --read-public-key 46 -o mykey.pub [pkcs15-tool] asn1.c:1369:asn1_encode_entry: encoding of ASN.1 object 'key' failed: Out of memory [pkcs15-tool] asn1.c:1369:asn1_encode_entry: encoding of ASN.1 object 'publicKey' failed: Out of memory Error encoding PEM key: Out of memory Debug log: mrkooll ~ > pkcs15-tool -vv --read-public-key 46 -o mykey.pub [pkcs15-tool] sc.c:196:sc_detect_card_presence: called [pkcs15-tool] reader-openct.c:204:openct_reader_detect_card_presence: called [pkcs15-tool] sc.c:201:sc_detect_card_presence: returning with: 1 Connecting to card in reader Aladdin eToken PRO... [pkcs15-tool] card.c:110:sc_connect_card: called [pkcs15-tool] reader-openct.c:228:openct_reader_connect: called [pkcs15-tool] card-cardos.c:79:cardos_match_card: checking cardos version ... [pkcs15-tool] reader-openct.c:420:openct_reader_lock: called [pkcs15-tool] reader-openct.c:445:openct_reader_unlock: called [pkcs15-tool] card-cardos.c:94:cardos_match_card: found cardos m4.01 [pkcs15-tool] card.c:221:sc_connect_card: card info: CardOS M4, 1002, 0x0 [pkcs15-tool] card.c:222:sc_connect_card: returning with: 0 Using card driver Siemens CardOS. [pkcs15-tool] reader-openct.c:420:openct_reader_lock: called Trying to find a PKCS#15 compatible card... [pkcs15-tool] pkcs15.c:706:sc_pkcs15_bind: called [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f002f00 [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f005015 [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f0050155031 [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 [pkcs15-tool] pkcs15.c:623:sc_pkcs15_bind_internal: The following DFs were found: [pkcs15-tool] pkcs15.c:633:sc_pkcs15_bind_internal: DF type 8, path 3f0050154401, index 0, count -1 [pkcs15-tool] pkcs15.c:633:sc_pkcs15_bind_internal: DF type 0, path 3f0050154402, index 0, count -1 [pkcs15-tool] pkcs15.c:633:sc_pkcs15_bind_internal: DF type 4, path 3f0050154404, index 0, count -1 [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f0050155032 [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 Found Maksym Tiurin eToken! [pkcs15-tool] pkcs15.c:1599:sc_pkcs15_read_file: called, path=3f0050154404, index=0, count=-1 [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f0050154404 [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 Reading certificate with ID '46' [pkcs15-tool] pkcs15-cert.c:115:sc_pkcs15_read_certificate: called [pkcs15-tool] pkcs15.c:1599:sc_pkcs15_read_file: called, path=3f005015314a, index=0, count=-1 [pkcs15-tool] card.c:532:sc_select_file: called; type=2, path=3f005015314a [pkcs15-tool] card-cardos.c:427:cardos_select_file: called [pkcs15-tool] card-cardos.c:431:cardos_select_file: returning with: 0 [pkcs15-tool] card.c:554:sc_select_file: returning with: 0 [pkcs15-tool] asn1.c:1369:asn1_encode_entry: encoding of ASN.1 object 'key' failed: Out of memory [pkcs15-tool] asn1.c:1369:asn1_encode_entry: encoding of ASN.1 object 'publicKey' failed: Out of memory Error encoding PEM key: Out of memory *** glibc detected *** pkcs15-tool: munmap_chunk(): invalid pointer: 0x00007fff31313558 *** ======= Backtrace: ========= /lib/libc.so.6[0x7f8028168948] pkcs15-tool[0x4039ca] pkcs15-tool[0x404bb5] /lib/libc.so.6(__libc_start_main+0xe6)[0x7f80281131a6] pkcs15-tool[0x4020d9] ======= Memory map: ======== 00400000-00409000 r-xp 00000000 fd:00 151298 /usr/bin/pkcs15-tool 00608000-00609000 rw-p 00008000 fd:00 151298 /usr/bin/pkcs15-tool 025d8000-025f9000 rw-p 025d8000 00:00 0 [heap] 7f8020000000-7f8020021000 rw-p 7f8020000000 00:00 0 7f8020021000-7f8024000000 ---p 7f8020021000 00:00 0 7f80274b9000-7f80274cf000 r-xp 00000000 08:01 77995 /lib/libgcc_s.so.1 7f80274cf000-7f80276cf000 ---p 00016000 08:01 77995 /lib/libgcc_s.so.1 7f80276cf000-7f80276d0000 rw-p 00016000 08:01 77995 /lib/libgcc_s.so.1 7f80276d0000-7f80276d2000 r-xp 00000000 08:01 78539 /lib/libdl-2.7.so 7f80276d2000-7f80278d2000 ---p 00002000 08:01 78539 /lib/libdl-2.7.so 7f80278d2000-7f80278d4000 rw-p 00002000 08:01 78539 /lib/libdl-2.7.so 7f80278d4000-7f80278db000 r-xp 00000000 fd:00 16549 /usr/lib/libltdl.so.3.1.6 7f80278db000-7f8027ada000 ---p 00007000 fd:00 16549 /usr/lib/libltdl.so.3.1.6 7f8027ada000-7f8027adb000 rw-p 00006000 fd:00 16549 /usr/lib/libltdl.so.3.1.6 7f8027adb000-7f8027ae5000 r-xp 00000000 fd:00 16468 /usr/lib/libpcsclite.so.1.0.0 7f8027ae5000-7f8027ce4000 ---p 0000a000 fd:00 16468 /usr/lib/libpcsclite.so.1.0.0 7f8027ce4000-7f8027ce5000 rw-p 00009000 fd:00 16468 /usr/lib/libpcsclite.so.1.0.0 7f8027ce5000-7f8027ce6000 rw-p 7f8027ce5000 00:00 0 7f8027ce6000-7f8027cee000 r-xp 00000000 fd:00 16462 /usr/lib/libopenct.so.1.0.0 7f8027cee000-7f8027eee000 ---p 00008000 fd:00 16462 /usr/lib/libopenct.so.1.0.0 7f8027eee000-7f8027eef000 rw-p 00008000 fd:00 16462 /usr/lib/libopenct.so.1.0.0 7f8027eef000-7f8027ef4000 r-xp 00000000 fd:00 24277 /usr/lib/libscconf.so.2.0.0 7f8027ef4000-7f80280f4000 ---p 00005000 fd:00 24277 /usr/lib/libscconf.so.2.0.0 7f80280f4000-7f80280f5000 rw-p 00005000 fd:00 24277 /usr/lib/libscconf.so.2.0.0 7f80280f5000-7f802823f000 r-xp 00000000 08:01 78381 /lib/libc-2.7.so 7f802823f000-7f802843e000 ---p 0014a000 08:01 78381 /lib/libc-2.7.so 7f802843e000-7f8028441000 r--p 00149000 08:01 78381 /lib/libc-2.7.so 7f8028441000-7f8028443000 rw-p 0014c000 08:01 78381 /lib/libc-2.7.so 7f8028443000-7f8028448000 rw-p 7f8028443000 00:00 0 7f8028448000-7f802845e000 r-xp 00000000 fd:00 18309 /usr/lib/libz.so.1.2.3.3 7f802845e000-7f802865e000 ---p 00016000 fd:00 18309 /usr/lib/libz.so.1.2.3.3 7f802865e000-7f802865f000 rw-p 00016000 fd:00 18309 /usr/lib/libz.so.1.2.3.3 7f802865f000-7f8028675000 r-xp 00000000 08:01 78356 /lib/libpthread-2.7.so 7f8028675000-7f8028875000 ---p 00016000 08:01 78356 /lib/libpthread-2.7.so 7f8028875000-7f8028877000 rw-p 00016000 08:01 78356 /lib/libpthread-2.7.so 7f8028877000-7f802887b000 rw-p 7f8028877000 00:00 0 7f802887b000-7f80289ed000 r-xp 00000000 fd:00 19218 /usr/lib/libcrypto.so.0.9.8 7f80289ed000-7f8028bec000 ---p 00172000 fd:00 19218 /usr/lib/libcrypto.so.0.9.8 7f8028bec000-7f8028c12000 rw-p 00171000 fd[1] 30230 abort pkcs15-tool -vv --read-public-key 46 -o mykey.pub -- System Information: Debian Release: 5.0.2 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/2 CPU cores) Locale: LANG=ru_UA.UTF-8, LC_CTYPE=ru_UA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages opensc depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii libltdl3 1.5.26-4 A system independent dlopen wrappe ii libopensc2 0.11.4-5+lenny1 SmartCard library with support for ii libssl0.9.8 0.9.8g-15+lenny1 SSL shared libraries ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime opensc recommends no packages. opensc suggests no packages. -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org