martin
684e9b20ba
Convert newlines to unix style, remove compiler warnings.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3826 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:10:44 +00:00
s
5dc6a35aa8
mix tab/space character [3822]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3825 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:53:22 +00:00
martin
3ea5bb7987
Merge [3804:3822/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3824 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:45:21 +00:00
jps
4f316b2f2a
patch to improve wesctos pkcs15init, submitted by Francois Leblanc
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3823 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:12:31 +00:00
jps
babc99bf58
To enable keygeneration in Firefox and opensc-pksc11.so when using smartcards that require different keybobjects for signing and encryption (CardOS)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3822 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-12 16:03:51 +00:00
viktor.tarasov
a06c8ef67f
set default ID style to 'native'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3821 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-11 20:18:41 +00:00
viktor.tarasov
1df1bbb0c8
Intrinsic ID: after Aleksey Samsonov's code revision:
...
- memory leaks after 'memory allocation' and other errors;
- coding style;
- simplify code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3820 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-11 18:47:14 +00:00
martin
15b1ba0cd7
Fix two bugs, noticed by Mats Andersson
...
http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012817.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3819 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-11 08:42:24 +00:00
viktor.tarasov
4dc884574e
Intrinsic ID for the cryptographic objects:
...
with the new pkcs15 profile option 'pkcs15-id-style'
the method to calculate the unique object ID for the cryptographic
objects 'private key', 'public key' and 'certificate x509'
can be choosen from the followings:
- actually existing one byte ID: 0x45 + 'number of existing object of given type';
- 'Mozilla style': SHA1(rsa.modulus) or SHA(dsa.pub);
- 'rfc2459': 'Subject Key Identifier'.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3818 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 18:51:24 +00:00
viktor.tarasov
81cc9d605f
free card applications when erasing card
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3817 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 16:25:58 +00:00
s
3603a22917
fix: probable endless loop
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3816 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 15:07:40 +00:00
s
9c9e21e9cc
add support for GOSTR3410 keys
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3815 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 14:42:29 +00:00
s
16d9d8ff43
pkcs15-tool.c:71: warning: comma at end of enumerator list
...
pkcs15-tool.c: In function 'print_pin_info':
pkcs15-tool.c:911: warning: comparison of unsigned expression >= 0 is always true
pkcs15-tool.c: In function 'test_update':
pkcs15-tool.c:1254: warning: comparison between signed and unsigned
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3814 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 12:55:55 +00:00
s
ed93bfa548
corrected option_help according to options
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3813 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 12:38:09 +00:00
martin
36f26b6357
Do not duplicate reader name in private structure.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3812 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 10:05:51 +00:00
s
e06b054369
add support for uaToken S
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3811 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-09 14:14:00 +00:00
viktor.tarasov
a0acb90b48
Oberthur card driver: useless assignments
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3810 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-07 21:04:53 +00:00
viktor.tarasov
435862ee1e
suppress errors when verifying PIN status
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3809 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-07 20:45:16 +00:00
viktor.tarasov
8681d963ab
Oberthur pkcs15init: update Oberthur's 'token info' file
...
when initializing token or creating user PIN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3808 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-07 19:38:15 +00:00
viktor.tarasov
004f23f102
Oberthur card driver: new style for PIN commands;
...
allow verifying of the PIN status;
when verifying SOPIN, try firstly the local one.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3807 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-07 10:26:20 +00:00
viktor.tarasov
76f3cfd79c
invalid e-mail address
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3806 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-06 10:06:40 +00:00
viktor.tarasov
51e15b8fb4
For the Oberthur IdOne AuthentIC card: make possible
...
to initialize the card with the PIN unblocking style
of the Oberthur's native middleware.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3805 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-06 10:00:31 +00:00
martin
450e1fc5ae
Merge [3794:3803/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3804 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-05 18:27:56 +00:00
viktor.tarasov
275c7f930e
remove useless code
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3803 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-02 18:25:30 +00:00
ludovic.rousseau
704f59ad5c
Enable PCSC by default. Use --disable-pcsc if you do not want it.
...
See http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012755.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3802 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-02 10:52:39 +00:00
ludovic.rousseau
4101b6c451
Do not use an absolute path for the default PCSC provider.
...
Just use "libpcsclite.so.1" instead so the library can be either in /lib
(Ubuntu) or /usr/lib (Debian) for example.
See http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012755.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3801 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-02 10:43:06 +00:00
s
2885691a10
fix potential memory leak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3800 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-01 14:11:41 +00:00
s
f8c6e28bac
fix memory leak and read after free
...
Example code:
int main()
{
...
r = C_Initialize(NULL);
assert(r == CKR_OK);
r = C_GetSlotList(CK_TRUE, NULL_PTR, &slot_cnt);
assert(r == CKR_OK);
assert(slot_cnt >= 1);
r = C_GetSlotList(TRUE, &slot, &slot_cnt);
assert(r == CKR_OK);
r = C_OpenSession(slot, CKF_SERIAL_SESSION | CKF_RW_SESSION, 0, 0, &hndl_session);
assert(r == CKR_OK);
assert(hndl_session != CK_INVALID_HANDLE);
r = C_Login(hndl_session, CKU_USER, pin, sizeof(pin));
assert(r == CKR_OK);
r = C_CreateObject(hndl_session, data_tmpl,
sizeof(data_tmpl)/sizeof(data_tmpl[0]), &hndl);
assert(r == CKR_OK);
r = C_DestroyObject(hndl_session, hndl);
assert(r == CKR_OK);
r = C_GenerateKeyPair(hndl_session, &rsa_genkp_mech, rsa_pbkey_tmpl,
sizeof(rsa_pbkey_tmpl)/sizeof(rsa_pbkey_tmpl[0]), rsa_prkey_tmpl,
sizeof(rsa_prkey_tmpl)/sizeof(rsa_prkey_tmpl[0]),
&hndl_pb, &hndl_pr);
assert(r == CKR_OK);
r = C_Finalize(NULL);
assert(r == CKR_OK);
return 0;
}
==20626== Invalid read of size 4
==20626== at 0x41036B: pkcs15_add_object (framework-pkcs15.c:679)
==20626== by 0x410B27: pkcs15_gen_keypair (framework-pkcs15.c:1761)
==20626== by 0x40980D: C_GenerateKeyPair (pkcs11-object.c:869)
==20626== by 0x4078CD: main (pkcs11_1.c:71)
==20626== Address 0x632d3e0 is 0 bytes inside a block of size 584 free'd
==20626== at 0x4C24A28: free (vg_replace_malloc.c:325)
==20626== by 0x4E5452B: sc_pkcs15init_delete_object (pkcs15-lib.c:2903)
==20626== by 0x41243B: pkcs15_dobj_destroy (framework-pkcs15.c:2721)
==20626== by 0x40AD91: C_DestroyObject (pkcs11-object.c:96)
==20626== by 0x407871: main (pkcs11_1.c:68)
==20626==
==20626== 80 bytes in 1 blocks are definitely lost in loss record 76 of 148
==20626== at 0x4C24137: calloc (vg_replace_malloc.c:418)
==20626== by 0x40E383: __pkcs15_create_object (framework-pkcs15.c:250)
==20626== by 0x40E45C: __pkcs15_create_data_object (framework-pkcs15.c:439)
==20626== by 0x41164C: pkcs15_create_data (framework-pkcs15.c:1441)
==20626== by 0x411760: pkcs15_create_object (framework-pkcs15.c:1490)
==20626== by 0x409A35: C_CreateObject (pkcs11-object.c:53)
==20626== by 0x40783A: main (pkcs11_1.c:65)
==20626==
==20626== LEAK SUMMARY:
==20626== definitely lost: 80 bytes in 1 blocks
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3799 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-01 13:55:52 +00:00
s
3a5db68158
fix memory leak
...
Example code:
int main() {
...
C_Initialize(NULL);
C_Finalize(NULL);
return 0;
}
==3312== 176 bytes in 1 blocks are definitely lost in loss record 109 of 146
==3312== at 0x4C24137: calloc (vg_replace_malloc.c:418)
==3312== by 0x4117B8: pkcs15_init_slot (framework-pkcs15.c:716)
==3312== by 0x41307F: pkcs15_create_slot (framework-pkcs15.c:761)
==3312== by 0x413263: pkcs15_create_tokens (framework-pkcs15.c:849)
==3312== by 0x40BB9B: card_detect (slot.c:149)
==3312== by 0x40BCF9: __card_detect_all (slot.c:167)
==3312== by 0x4083F7: C_Initialize (pkcs11-global.c:229)
==3312== by 0x4076BD: main (pkcs11_1.c:27)
==3312==
==3312== 528 bytes in 1 blocks are definitely lost in loss record 139 of 146
==3312== at 0x4C24137: calloc (vg_replace_malloc.c:418)
==3312== by 0x41365B: pkcs15_bind (framework-pkcs15.c:167)
==3312== by 0x40BB43: card_detect (slot.c:139)
==3312== by 0x40BCF9: __card_detect_all (slot.c:167)
==3312== by 0x4083F7: C_Initialize (pkcs11-global.c:229)
==3312== by 0x4076BD: main (pkcs11_1.c:27)
==3312==
==3312== LEAK SUMMARY:
==3312== definitely lost: 704 bytes in 2 blocks
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3798 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-01 13:50:45 +00:00
s
83b7a9788d
trunk is now post release
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3797 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-01 13:45:56 +00:00
martin
30ab50600b
Merged [3783:3794/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3795 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-25 20:22:11 +00:00
aj
a8d8262d6d
we created a -rc2 for openssl 1.0.0 support too.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3794 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-24 06:38:06 +00:00
s
1ecd64ed93
fix: compile with openssl-1.0 beta3
...
http://www.opensc-project.org/pipermail/opensc-devel/2009-October/012702.html
Thanks to Kalev Lember
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3791 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-23 18:16:59 +00:00
aj
425c0ccb69
Prepare release candidate.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3789 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-23 13:09:48 +00:00
aj
12213dee5c
Improved myeid driver (by Aventra)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3788 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-23 13:08:32 +00:00
ludovic.rousseau
6cd345d316
Default PCSC provider is libpcsclite.so.1 instead of libpcsclite.so
...
See Debian bug #511344
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3787 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-23 12:12:40 +00:00
aj
5926c08c91
Cleanup westcos driver to remove warnings - by François Leblanc.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3786 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 18:28:25 +00:00
martin
56fb57603b
Merge [3758:3783/trunk]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3785 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 09:18:16 +00:00
martin
95a5ab0654
Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
...
Data objects and PKCS#15 init are left broken currently.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
aj
268755c4d6
latest changes.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3783 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-21 09:23:26 +00:00
aj
8746d02329
rewrite code to support openssl 0.9.7 so rsa variable is properly set.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3782 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-21 09:08:22 +00:00
aj
e2848c7094
Make opensc / westcos driver compile with openssl 0.9.7:
...
It tests the version of openssl and uses the old RSA_gererate_key
if older the 0.9.8. By Douglas E. Engert.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3781 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-21 07:27:19 +00:00
aj
59c9a8eae0
remove the variable not initialized error for "tag",
...
and to fix another error when loading a 3des key when
the string passed to sc_hex_to_bin is not terminated.
By Douglas E. Engert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3780 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-21 07:24:58 +00:00
aj
b2df781e8d
Fix warnings in muscle code - by João Poupino.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3779 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-21 07:22:56 +00:00
aj
2446c46459
next release could be 0.11.11, trunk is "-svn" preview.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3778 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-20 12:27:26 +00:00
aj
03bc256594
Create new release 0.11.10
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3776 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-20 12:25:16 +00:00
s
7fa19788e2
fix misprint
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3775 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-13 14:20:03 +00:00
martin
4196e9f156
PC/SC: Log enabled options.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3774 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-13 08:29:29 +00:00
martin
615b181471
Revert [3752]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3773 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-12 09:26:05 +00:00
martin
02ea9d7388
Fix windows/nmake build
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3772 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-09 13:03:23 +00:00