Commit Graph

1958 Commits

Author SHA1 Message Date
martin 44cf3d06ae MiniDriver: rename cardmod to minidriver in source.
Also change some grammar, whitespace (reported by git) and wording (Opensc->OpenSC) issues.
Add some comments here and there.

See http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016261.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5329 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 07:40:12 +00:00
vtarasov 54fb422831 pkcs15: include EC private/public key types into the pkcs#15 object search procedures
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5322 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 11:30:45 +00:00
andre 383d6e8362 ctx.c: Replaces magic integer -1 with defined constant value.
See [http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/cards.h?rev=5320#L32 cards.h]

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5321 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 10:34:55 +00:00
vtarasov 848180ab50 libopensc: use short debug macros in card.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5319 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 09:20:15 +00:00
vtarasov b614444aae libopensc: use short debug macros in pkcs15.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5318 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 09:18:25 +00:00
vtarasov 5102e4d882 card-piv: 'emulate' MF selection by selection of the PIV applet ...
so that, PIV card can be used with the 'opensc-explorer' interactive tool


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5317 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 08:47:35 +00:00
andre 3169f14b32 libopensc: Removes useless attribute 'file' in 'struct sc_pkcs15_df'
There is no need to carry around that attribute, because it's easy to look up the 'file' as needed. This is done by issuing a single sc_select_file command in sc_pkcs15init_update_any_df (pkcs15-lib.c).

The parameter 'file' of sc_pkcs15_add_df (pkcs15.c) became useless too and was removed in turn.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5316 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 04:09:33 +00:00
vtarasov 86af8eed3d card-pin: make working 'external authenticate' ...
'key-ref' and 'algo' arguments of the piv_general_external_authenticate() function 
were not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5315 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-09 19:26:34 +00:00
vtarasov 004c08b6a0 card-piv: invalid arguments for SC_TEST_RET macro
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5314 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 15:16:47 +00:00
andre 69c846f904 libopensc: Re-defines SC_CARD_FLAG_ONBOARD_KEY_GEN to be local to the file card-flex.c, because that flag is used nowhere else. In principle, this patch only reverts some changes made by r2192.
Relates to #296.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5312 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 13:30:32 +00:00
andre b21eeb46b9 libopensc: Removes unused flag SC_CARD_CAP_RSA_2048.
Relates to [http://www.opensc-project.org/opensc/ticket/296#comment:1 #296].

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5308 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 18:16:40 +00:00
vtarasov be46a660e7 libopensc: export names of the 'get GUID' routines
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5304 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 16:46:38 +00:00
vtarasov f8ba3ea76d libopensc: general routines to get serialized GUID
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5302 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 16:42:23 +00:00
andre 89b975022c opensc.h: Removes unused flag SC_CARD_CAP_EMV.
Relates to [http://www.opensc-project.org/opensc/ticket/296#comment:1 #296].

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5301 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 16:18:56 +00:00
andre 213fa68ea0 card-setcos.c: Fixes misuse of SC_CARD_FLAG_ONBOARD_KEY_GEN. From [http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h?rev=5299#L411 opensc.h]:
#define SC_CARD_FLAG_ONBOARD_KEY_GEN    0x00000001
#define SC_CARD_CAP_APDU_EXT            0x00000001


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5300 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 15:38:22 +00:00
andre ac3a48d7ca pkcs15.h: Fixes type inconsistency, because in [http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h?rev=5190#L148 opensc.h] algo_ref is defined as unsigned int.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5299 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-06 22:46:46 +00:00
andre 93deff0161 dir.c: Avoid warnings:
dir.c:212: warning: comparison between signed and unsigned
dir.c:220: warning: comparison between signed and unsigned


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5298 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-06 15:11:18 +00:00
andre d3215b67df asn1.c: Avoid warnings:
asn1.c:747: warning: comparison between signed and unsigned
asn1.c:785: warning: comparison between signed and unsigned


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5297 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-06 15:06:02 +00:00
martin cd3012f55e Fix #340: ignore pinpad properties of readers known to be broken.
On Mac OS X the HP smart card keyboard claims secure PIN entry support but the PIN is transmitted to host.
Disregard the pinpad flag for this reader. Other readers claiming pinpad support but having problems to follow in this list.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5273 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-29 11:36:45 +00:00
ludovic.rousseau fe630c884f Fix a real bug (and a compiler warning)
pkcs15-oberthur.c: In function 'sc_pkcs15emu_oberthur_add_pubkey':
pkcs15-oberthur.c:585: warning: statement with no effect
pkcs15-oberthur.c: In function 'sc_pkcs15emu_oberthur_add_cert':
pkcs15-oberthur.c:654: warning: statement with no effect


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5269 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 17:17:07 +00:00
ludovic.rousseau b435f6007a Fix compiler warning
pkcs15-itacns.c: In function 'itacns_add_data_files':
pkcs15-itacns.c:478: warning: declaration of 'list_size' shadows a global declaration
../../src/common/simclist.h:497: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5267 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:05:24 +00:00
ludovic.rousseau 8c0dbf4b02 Fix compiler warning
card-iasecc.c: In function 'iasecc_get_serialnr':
card-iasecc.c:2218: warning: declaration of 'ii' shadows a previous local
card-iasecc.c:2165: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5266 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:02:42 +00:00
ludovic.rousseau 0e6b87b135 Fix compiler warning
card-iasecc.c: In function 'iasecc_select_file':
card-iasecc.c:647: warning: declaration of 'rv' shadows a previous local
card-iasecc.c:635: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5265 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:01:45 +00:00
ludovic.rousseau 161678d8a6 Fix compiler warning
card-iasecc.c:1529: warning: declaration of 'ffs' shadows a global declaration
/usr/include/string.h:121: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5264 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:00:56 +00:00
ludovic.rousseau 11ae160d55 Fix compiler warning by commenting dead code
card-authentic.c:510: warning: 'authentic_resize_file' defined but not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5263 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:58:17 +00:00
ludovic.rousseau 577499f80c Fix compiler warning
card-authentic.c: In function 'authentic_chv_verify_pinpad':
card-authentic.c:1255: warning: declaration of 'ffs' shadows a global declaration
/usr/include/string.h:121: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5262 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:57:20 +00:00
ludovic.rousseau 4410ae0397 Fix compiler warning
card-westcos.c: In function 'westcos_init':
card-westcos.c:255: warning: declaration of 'priv_data' shadows a previous local
card-westcos.c:210: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5261 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:55:06 +00:00
ludovic.rousseau 902e4b139a Fix compiler warning by commenting dead code
card-piv.c:179: warning: 'oid_prime256v1' defined but not used
card-piv.c:180: warning: 'oid_secp384r1' defined but not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5260 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:53:15 +00:00
ludovic.rousseau 1f2c8211ad Fix compiler warnings
card-oberthur.c: In function 'auth_pin_verify_pinpad':
card-oberthur.c:1581: warning: declaration of 'ffs' shadows a global declaration
/usr/include/string.h:121: warning: shadowed declaration is here
card-oberthur.c: In function 'auth_pin_reset_oberthur_style':
card-oberthur.c:1802: warning: declaration of 'ffs' shadows a global declaration
/usr/include/string.h:121: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5259 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:51:29 +00:00
ludovic.rousseau f1170e009a Fix compiler warning
reader-pcsc.c: In function 'refresh_attributes':
reader-pcsc.c:339: warning: declaration of 'rv' shadows a previous local
reader-pcsc.c:273: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5258 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:46:51 +00:00
ludovic.rousseau f7f6213d24 Fix compiler warning
reader-pcsc.c: In function 'refresh_attributes':
reader-pcsc.c:337: warning: declaration of 'state' shadows a previous local
reader-pcsc.c:272: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5257 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:45:41 +00:00
ludovic.rousseau 842550ae20 Fix compiler warning
pkcs15-pubkey.c: In function 'sc_pkcs15_pubkey_from_spki_filename':
pkcs15-pubkey.c:944: warning: 'buflen' may be used uninitialized in this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5256 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:43:00 +00:00
ludovic.rousseau 88a07de60d Fix compiler warning
ctx.c: In function 'sc_context_create':
ctx.c:646: warning: implicit declaration of function 'lt_dlinit'
ctx.c:646: warning: nested extern declaration of 'lt_dlinit'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5255 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 15:41:20 +00:00
ludovic.rousseau c1bd559f99 Fix compiler warning
cards.h:221: warning: function declaration isn’t a prototype


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5246 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 14:56:22 +00:00
martin b0b5da2ab6 Fix building CT-API after r5061, noticed by Jenkins autobuild
reader-ctapi.c:255: error: ‘sc_reader_t’ has no member named ‘atr_len’

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5244 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-21 06:54:16 +00:00
ludovic.rousseau 8ef19c4ad2 typo: dont -> don't
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5243 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 14:50:44 +00:00
martin 7406d84415 Fix a typo reported by lintian
I: libopensc3: spelling-error-in-binary ./usr/lib/libopensc.so.3.0.0 enviroment environment

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5239 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 12:19:01 +00:00
martin 7ab9b7f10d Fix a typo reported by lintian
I: libopensc3: spelling-error-in-binary ./usr/lib/libopensc.so.3.0.0 extention extension

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5238 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 12:18:55 +00:00
vtarasov a55f2f098b iso7816: try to read full amount of the requested data ...
actually, if an error 'Wrong Le' happens, the APDU with the reduced size is re-transmitted
(http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/apdu.c#L401) .
iso7816_read_binary() returns this reduced amount of data and do not trying to read the missing part .


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5237 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-15 12:18:51 +00:00
alonbl b8fcfa8a1f openct: Wrong size
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5235 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 20:18:01 +00:00
alonbl 1a19093b42 Make openct compile again
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5234 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 19:45:02 +00:00
vtarasov 39f3c2b7c6 rtecp: in non-extended APDUs the 'Le' value cannot be more then 256 bytes ...
after r5186 the SC_MAX_APDU_BUFFER_SIZE has been increased
and so existing defintion of Le value became invalid.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5233 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:19:07 +00:00
vtarasov a076397671 pkcs15: without AID specified return the first available PKCS#15 application ...
revert accidential commit, thanks to Pierre Ossman.
http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016149.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5232 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:13:38 +00:00
vtarasov b1a1dc245a pkcs15: accept more then one xDF file of the same type ...
partial revert of r4096, thanks to Pierre Ossman
http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016148.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5231 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:09:48 +00:00
vtarasov 27f493e6d8 libopensc: fix debug message
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5230 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:02:50 +00:00
vtarasov a067bf35a3 pkcs15: more of the debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5228 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-13 18:11:07 +00:00
vtarasov d7c0ad71ff ruToken: in non-extended APDUs the 'Le' value cannot be more then 256 bytes ...
in r5186 the SC_MAX_APDU_BUFFER_SIZE has been increased
and so the previous defintion of Le value became invalid.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5225 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-11 17:57:46 +00:00
andre 12df79c14b pkcs15.c: Avoid compiler warning:
pkcs15.c:286: warning: unused variable ‘conf_block’


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5223 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-07 18:10:11 +00:00
andre 3442649b42 pkcs15-pin: Fixing the method of obtaining objects protected by a particular PIN. Now it's in accordance with PKCS15. See [http://www.opensc-project.org/pipermail/opensc-devel/2011-January/015818.html discussion].
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5222 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-07 16:15:41 +00:00
andre 39db526407 pkcs15-piv: Remove unused functionality.
These lines made use of the attribute card->flags which is mostly unused in the whole framework. That attribute becomes nearly obsolete without these lines. See [http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016104.html discussion].

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5221 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-07 16:00:23 +00:00