Commit Graph

3867 Commits

Author SHA1 Message Date
martin 0d01cb1cd1 Rename p15emu-westcos.c to pkcs15-westcos.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4413 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-11 07:36:01 +00:00
martin 3cfc64ee6b style: // -> /* */
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4412 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-11 07:35:45 +00:00
martin 3d511b8610 MuscleApplet: Check for protocol version to be forward-compatible. Remove some whitespace. Remove support for <1024b keys.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4411 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-10 14:49:54 +00:00
martin 268e6270d8 MuscleApplet: Don't set the file ID as the name of the file. It is redundant and does not look nice.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4410 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-10 09:08:00 +00:00
martin a1c77b96ab Entersafe: cache the presented PIN on personalization, simplify the code a bit.
See http://www.opensc-project.org/pipermail/opensc-devel/2010-June/014312.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4408 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-09 13:53:11 +00:00
martin 14d82f9e4c Documentation: there is no external API, remove the manpage generation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4407 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-09 13:39:28 +00:00
martin 8737ace703 Entersafe: the default profile should have local PIN-s
See http://www.opensc-project.org/pipermail/opensc-devel/2010-June/014310.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4406 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-09 11:18:22 +00:00
martin ce0645d6d1 Fix compilation without OpenSSL
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4404 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-09 10:06:42 +00:00
jps f9daf30bba cardos-tool.c can be now compiled with OpenSSL 0.9.7 (SHA256 checksum verification is replaced by SHA1)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4401 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-08 14:41:49 +00:00
martin 127136caf8 tools: Mac OS X 10.5 uses OpenSSL 0.9.7 which does not include SHA256 support. Fix building for 10.5.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4400 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-08 10:45:07 +00:00
s 06028a7f9e fix:
openssl (lock_dbg_cb): already locked (mode=9, type=30) at eng_list.c:360                                      
openssl (lock_dbg_cb): not locked (mode=10, type=30) at eng_table.c:186\

Thanks to Jan Just Keijser for development and patch
http://www.opensc-project.org/pipermail/opensc-devel/2010-June/014314.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4398 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-05 08:51:37 +00:00
s 7f3f6dec6b fix: 'openssl: double free or corruption' (load gost engine before loading engine_pkcs11 (which loading gost engine))
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4397 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-04 22:23:47 +00:00
martin 073ad7a4c4 Fix #223: implement ctbcs_build_modify_verification_apdu.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4396 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-01 12:28:30 +00:00
martin 6f52711280 CT-API: Fix the mess left from broken [3931] and some pieces from [4118].
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4395 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-01 12:28:23 +00:00
martin 68f12c881d Fix a segfault leftover from r4118
Thanks to Andre Zepezauer for the report and patch.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4391 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-31 16:49:55 +00:00
s a4e3273298 Rutoken S: add 'aid' to profile (for '-init --create-pkcs15 --so-pin 87654321 --so-puk -p rutoken+small')
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4390 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 13:54:54 +00:00
s 15d51479ae fix: SIGSEGV
Program received signal SIGSEGV, Segmentation fault.
0x00007f7d6f29fd55 in free () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f7d6f29fd55 in free () from /lib64/libc.so.6
#1  0x00007f7d703a4128 in sc_update_dir (card=0x17463a0, app=<value optimized out>) at dir.c:306
#2  0x00007f7d7040cb58 in sc_pkcs15init_add_app (card=<value optimized out>, profile=0x1754840,
    args=<value optimized out>) at pkcs15-lib.c:2354



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4389 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 13:52:04 +00:00
s 0f74f69695 fix: memory leak (but see FIXME)
==21111== 1,360 (120 direct, 1,240 indirect) bytes in 1 blocks are definitely lost in loss record 107 of 109
==21111==    at 0x4C24F0D: realloc (vg_replace_malloc.c:476)
==21111==    by 0x409D23: sc_pkcs11_register_mechanism (mechanism.c:44)
==21111==    by 0x410595: pkcs15_bind (framework-pkcs15.c:3160)
==21111==    by 0x4085DD: card_detect (slot.c:214)
==21111==    by 0x408887: initialize_reader (slot.c:114)
==21111==    by 0x404C50: C_Initialize (pkcs11-global.c:247)
==21111==    by 0x4034C9: main
==21111==
==21111== LEAK SUMMARY:
==21111==    definitely lost: 120 bytes in 1 blocks



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4388 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 07:56:34 +00:00
s a91e77187b fix: memory leak - next object missed out to release
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4387 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 07:52:14 +00:00
s c5c649e0ea fix: memory leak
example:

int main()
{
        C_Initialize(NULL);
        C_Finalize(NULL);
        return 0;
}

==4625== 592 (504 direct, 88 indirect) bytes in 1 blocks are definitely lost
in loss record 9 of 10
==4625==    at 0x4C24137: calloc (vg_replace_malloc.c:418)
==4625==    by 0x407FD9: create_slot (slot.c:80)
==4625==    by 0x40452C: C_Initialize (pkcs11-global.c:243)
==4625==    by 0x40342A: main
==4625==
==4625== 4,736 (4,032 direct, 704 indirect) bytes in 8 blocks are definitely
lost in loss record 10 of 10
==4625==    at 0x4C24137: calloc (vg_replace_malloc.c:418)
==4625==    by 0x407FD9: create_slot (slot.c:80)
==4625==    by 0x408102: initialize_reader (slot.c:108)
==4625==    by 0x4044E0: C_Initialize (pkcs11-global.c:247)
==4625==    by 0x40342A: main
==4625==
==4625== LEAK SUMMARY:
==4625==    definitely lost: 4,536 bytes in 9 blocks



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4386 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-30 07:31:31 +00:00
viktor.tarasov 78d6bc4189 pkcs15init: fix undeclared variable
Noted by Jean-Michel, thanks.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4383 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-27 08:12:20 +00:00
viktor.tarasov fff1963931 pkcs15init: do not reuse existing file when storing object data or updating certificate
merged with r4380:4380 of https://www.opensc-project.org/svn/opensc/branches/vtarasov/opensc-sm.trunk



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4382 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-26 14:33:01 +00:00
viktor.tarasov fec213ad2e pkcs11: DER encoded value for CKA_SERIAL_NUMBER
discussed in http://www.opensc-project.org/pipermail/opensc-devel/2010-May/014264.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4375 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-25 08:06:28 +00:00
s 2d3722389d fix: Rutoken S: no need to reserve 5000 bytes for AppDF (pkcs15.profile: size = 5000)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4365 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 19:49:12 +00:00
viktor.tarasov 73c516a7a0 pkcs11: resolve 'endless polling' in C_WaitForSlotEvent()
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013947.html

Tested with Firefox 3.6.3 in WinXP SP3 .




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4363 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 09:18:38 +00:00
viktor.tarasov d9b0d643de libopensc: in sc_pkcs15_verify_pin() if no PIN provided try to use pin pad
It's a complement to the r4361.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4362 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:37:29 +00:00
viktor.tarasov e23756123e pkcs15init: when verifying PIN, if no value supplied, try to use pin pad
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4361 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:26:01 +00:00
viktor.tarasov 99c51c6748 libopensc: do not invalidate card cache in sc_unlock()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4360 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:18:34 +00:00
viktor.tarasov ffc9f8efc6 pkcs11: by default do not lock login
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4359 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:17:53 +00:00
martin 98037b795d MuscleApplet: Detect MuscleApplet specific SW-s; re-organize the source a little.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4350 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 13:37:48 +00:00
martin 290d1cb4d6 Muscle: use MuscleApplet as the name of the card as well as driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4349 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 07:40:02 +00:00
martin bfa340ba51 MuscleApplet: remove useless card detection flagging, don't call the default driver init operation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4348 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-14 07:39:58 +00:00
s 46def8b86c fix: loading openssl engine with GOST algorithms
Thanks to Jan Just Keijser, Martin Paljak, Andreas Jellinghaus, Robert Relyea, Dimitrios Siganos

see:
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013956.html
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013966.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4347 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-13 21:57:28 +00:00
viktor.tarasov ed610517d7 plcs11: set default value for 'lock_login' to 'true' as it' stated by
the commets in opensc.con.in

At the origin there were problem of signing with Feitian card, noted by
Ludovic.

http://www.opensc-project.org/pipermail/opensc-devel/2010-May/014180.html




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4346 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-13 17:47:04 +00:00
viktor.tarasov 39642a5d93 in feitian profile set 'local' flag for the User PIN
so that Feitian card profile will reflect the real card initialisation.

At the origin there were problem of signing with Feitian card, noted by Ludovic.

http://www.opensc-project.org/pipermail/opensc-devel/2010-May/014180.html





git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4345 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-13 17:45:43 +00:00
flc 6f1683d7bd wetcos-tools: add util.c to compile.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4339 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-11 14:40:10 +00:00
flc ed26525e93 update westcos-tools documentation with new options
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4337 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-11 14:35:38 +00:00
flc 5ae92ebcec clean some code and use more opensc standard
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4336 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-11 14:34:39 +00:00
flc a4df57eb4d --wait option don't need argument
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4335 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-11 14:30:15 +00:00
ludovic.rousseau e63d12bc8f replace spaces by tab
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4326 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-10 14:35:43 +00:00
viktor.tarasov 922d7cdc66 add TODO comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4325 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-10 09:18:49 +00:00
flc 0ad7704247 westcos pkcs15 emulate certificat or public key not both
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4310 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-07 12:49:53 +00:00
flc 9e74991250 Add cardmod pcsc protocol detection
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4288 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-05 09:31:44 +00:00
viktor.tarasov 140f3d0d98 liopensc: fix debug message
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4283 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-03 15:44:27 +00:00
viktor.tarasov ac41eba3ac win32: merge the branches/vtarasov/opensc-sm.trunk
update win32 compilation;
Unix style line ending in src/pkcs15init/pkcs15-oberthur.h;
variables declaration issue in src/tools/cardos-tool.c.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4280 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-01 12:15:36 +00:00
viktor.tarasov f505d4f5be pkcs15-init tool: remove blank line after PIN was prompted
Noted by Martin.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4273 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:20:19 +00:00
viktor.tarasov f17ca0fd74 tools: in local 'getpass' procedure getline() is not used any more
Without GNU C extention 'getline()' the same code of the local 'getpass' procedure is used for Mac OS and Linux.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4272 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:20:18 +00:00
viktor.tarasov d5f201bcb5 pkcs15init: in sc_pkcs15init_update_file() take care about file selection errors
Noted by Ludovic.

In sc_pkcs15init_update_file() procedure the file selection errors other then SC_ERROR_FILE_NOT_FOUND were not treated.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4271 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:20:17 +00:00
ludovic.rousseau b6fb4ff84a Change in r4269 is not correct since sc_pkcs1_strip_02_padding() returns
an int and not a size_t
The new code is also simpler


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4270 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:16:27 +00:00
jps 71598ad460 r4208 breaks key unwrap.
pkcs11-tool -tl gives an error and mail can not be anymore decrypted (tested with Thunderbird).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4269 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-27 13:25:17 +00:00