Commit Graph

4120 Commits

Author SHA1 Message Date
martin 6fc7e62f20 conf: correct comments about OpenSC.tokend score meaning and default value.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4889 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:34:54 +00:00
martin acb54b965f typo: remove double semicolon which prevents compilation with Visual Studio.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4888 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 08:51:25 +00:00
martin c4a9ab6732 WindowsInstaller: overwrite files with same version to allow nightly builds; replace and delete blocked files on a reboot.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4887 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 08:51:17 +00:00
andre 636b0c1d27 framework-pkcs15: Do not populate the unwrap capability, because the corresponding function C_UnwrapKey isn't implemented.
http://www.opensc-project.org/opensc/browser/trunk/src/pkcs11/pkcs11-object.c?rev=4885#L969

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4886 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 00:58:12 +00:00
andre fd11c909bd pkcs11-tool: Completing the output of "Mechanism Information Flags".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4885 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 23:46:12 +00:00
andre 146041fcee pkcs11-tool: Correcting the behaviour in the case where C_SignUpdate fails. Quotation from PKCS#11:
"A call to C_SignUpdate which results in an error terminates the current signature operation."

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4884 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 22:16:50 +00:00
andre b63a601666 pkcs11-tool: Use attributes MODULUS and PUBLIC_EXPONENT instead of VALUE to retrieve RSA-Public-Key. The first two attributes are valid whereas the latter is not.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4883 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 18:09:30 +00:00
ludovic.rousseau cf92133cef Update from SimCList version 1.5
http://mij.oltrelinux.com/devel/simclist/


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4882 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-26 12:57:53 +00:00
andre 0eb404b2e6 pkcs11-display.c: more detailed less verbose output of CK_ATTRIBUTE lists
http://www.opensc-project.org/pipermail/opensc-devel/2010-November/015321.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4881 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-25 00:20:21 +00:00
dengert 09131a4e9f Fix support for CKU_ALWAYS_AUTHENTICATE and CKU_CONTEXT_SPECIFIC
spy segfaulted if CKU_CONTEXT_SPECIFIC was used,
pkcs11-session was reseting the userType before calling 
framework.  Framework will now see CKU_CONTEXT_SPECIFIC
and use slot->login_user to determine which PIN was used
to create the original session, and will send the PIN
to the card. It does not treats CKU_CONTEXT_SPECIFIC 
as a full login, only a reassertion of the PIN. 



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4880 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-24 20:28:30 +00:00
ludovic.rousseau c9ad140394 sc_pkcs15emu_postponed_load is no more defined
Compilation fails on Mac OS X (but not on GNU/Linux):
Undefined symbols:
  "_sc_pkcs15emu_postponed_load", referenced from:
   -exported_symbol[s_list] command line option
ld: symbol(s) not found


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4879 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-20 09:30:26 +00:00
andre 821f4fef6d card.c: Fixes the overriding of max_x_size limitations. In the result, the limitations of cards are adjusted to fit the limitations imposed by the configured reader.
ctx.c: Lookup conf_block of reader_driver by short_name

Fixes #269

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4878 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-19 18:09:04 +00:00
andre 5a183a8dc7 framework-pkcs15.c: new logic to discover objects that were hidden before PIN verification
pkcs15.c: object search continues with normal processing, even if enumeration of some files failed
pkcs15.h: obsolete prototype removed
pkcs15-syn.c: now obsolete function sc_pkcs15emu_postponed_load removed

fixes: #266

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4877 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 23:31:08 +00:00
andre 0ad6771346 {{{more verbose messages for debug in:__sc_pkcs15_search_objectssc_pkcs15_parse_dfsc_pkcs15_read_file}}}
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4876 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 18:47:42 +00:00
andre bcef13cfd2 In login() the flag CKF_LOGIN_REQUIRED is now ignored. This makes the behaviour of login() more predictable. If parameter --login is specified on the command line, then C_Login() is always called.fixes #220
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4875 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 14:56:26 +00:00
dengert d1aa716bec Move decoding of subjectPubkeyInfo from pkcs15-cert.c
to pkcs15-pubkey.c and call the new sc_pkcs15_pubkey_from_spki.
Add sc_pkcs15_pubkey_from_spki_filename to allow a file to 
contain the subjectPubkeyInfo, which will be used the the PIV 
driver when EC is implemented. The format of the file, is the
same as an X509 certificate subjectPublicKeyInfo and what 
OpenSSL calls an EVP_PKEY, which includes the algorithm,
any parameters and the public key. 
 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4874 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 17:05:40 +00:00
martin c6eb9d3d92 PC/SC: move protocol (T=0/T=1) selection to reader-pcsc.c, where it is used.
Also, check fot the required protocol before connecting to the card and use the forced prtocol instead of re-connecting.

See http://lists.drizzle.com/pipermail/muscle/2010-November/008671.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4873 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 12:37:22 +00:00
martin 5e909df85d Amend r4871: prevent mingw32 from including an incompatible getopt version.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4872 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 12:29:15 +00:00
martin ab6511cb63 Trac #264: fix mingw32 build with mingw32-runtime versions <= 3.13
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4871 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-08 11:17:09 +00:00
ludovic.rousseau 2e9c72ec5e Use 'const char *' instead of 'char *' for static strings and avoids a
lot of "discards qualifiers from pointer target type" warnings


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4870 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 18:07:04 +00:00
ludovic.rousseau 96deb9d4d4 Use 'const char *' instead of 'char *' for static strings and avoids a
lot of "discards qualifiers from pointer target type" warnings


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4869 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 18:05:21 +00:00
ludovic.rousseau c64cb12f2f pkcs15-tcos.c: In function ‘insert_pin’:
pkcs15-tcos.c:216: warning: declaration of ‘r’ shadows a previous local
pkcs15-tcos.c:194: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4868 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:07:13 +00:00
ludovic.rousseau 07ccc3965e pkcs15-tool.c: In function ‘verify_pin’:
pkcs15-tool.c:976: warning: declaration of ‘r’ shadows a previous local
pkcs15-tool.c:972: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4867 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:05:32 +00:00
ludovic.rousseau 8dd3b98b1d pkcs15-tool.c:150: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:151: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:152: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:153: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:154: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:155: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:156: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:157: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:158: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:159: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:160: warning: initialization discards qualifiers from pointer target type


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4866 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:04:04 +00:00
ludovic.rousseau 3c12d20bfa piv-tool.c: In function ‘gen_key’:
piv-tool.c:292: warning: declaration of ‘newkey’ shadows a global declaration
piv-tool.c:97: warning: shadowed declaration is here
piv-tool.c: At top level:
piv-tool.c:97: warning: ‘newkey’ defined but not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4865 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:01:17 +00:00
ludovic.rousseau 9c433a9cce pkcs11-object.c: In function ‘C_DigestInit’:
pkcs11-object.c:455: warning: label ‘out’ defined but not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4864 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:00:09 +00:00
ludovic.rousseau 2a4cdd4d57 pkcs15-pteid.c: In function ‘sc_pkcs15emu_pteid_init’:
pkcs15-pteid.c:56: warning: ‘buf’ may be used uninitialized in this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4863 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:58:33 +00:00
ludovic.rousseau 512be83138 ctx.c: In function ‘sc_ctx_detect_readers’:
ctx.c:548: warning: ‘r’ may be used uninitialized in this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4862 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:57:05 +00:00
ludovic.rousseau 3ac5bb4ba1 Declare internal functions as static and fix compiler warnings
card-itacns.c:90: warning: no previous prototype for ‘itacns_match_cns_card’
card-itacns.c:125: warning: no previous prototype for ‘itacns_match_cie_card’
card-itacns.c:146: warning: no previous prototype for ‘itacns_match_card’


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4861 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:54:57 +00:00
ludovic.rousseau f841b88e06 opensc-explorer.c:89: warning: function declaration isn’t a prototype
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4860 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:53:11 +00:00
ludovic.rousseau 3aea304a8e sc_do_log_va(): fix compiler warning
log.c:87: warning: format ‘%03ld’ expects type ‘long int’, but argument
8 has type ‘int’


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4859 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:50:41 +00:00
ludovic.rousseau 98fdeaa0b6 C_LoadModule(): Fix compiler warning
libpkcs11.c:58: warning: format ‘%lx’ expects type ‘long unsigned int’,
but argument 3 has type ‘int’


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4858 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:49:00 +00:00
ludovic.rousseau 6f5f29eee9 Revert revision 4853 because of a regression when initialing cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4857 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 13:03:46 +00:00
ludovic.rousseau 70ead491fc sc_pkcs15init_read_info(): do not use affectation and test in the same
line of code but use two different lines so the code is easier to read.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4854 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-02 08:02:13 +00:00
ludovic.rousseau 93f5e24e13 sc_pkcs15init_read_info(): do not call sc_pkcs15init_parse_info() if
sc_select_file() failed.

Thanks to Andre Zepezauer for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2010-November/015216.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4853 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-02 07:59:46 +00:00
dengert 641ea4eddd Fix compile warning message.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4852 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-01 15:44:17 +00:00
martin 8af1b60afd PC/SC: temporarily disable blocking C_WaitForSlotEvent until a checked version for pcsc-lite 1.5.3-1.6.4 exists.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4835 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 13:33:50 +00:00
martin df639efd89 EstonianEid: revert to old behavior and have the T=0 forcing.
Some cards have incorrect ATR-s and can cause troubles if pcsc-lite by default tries to set T=1 by default.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4834 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 13:11:13 +00:00
martin 8156095b46 FIXME: Don't issue SCardCancel unless the environment is known not to hang (part 1)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4833 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 09:44:22 +00:00
martin 31b0a05aaf EstonianEid: document more ATR-s in opensc.conf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4832 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 05:30:09 +00:00
dengert bd93b97674 Additianl changes to r4805 which made cert->pubkey a pointer to sc_pkcs15_pubkey_t
Thanks to Andre Zepezauer for pointing out most of these. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4828 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-25 20:58:02 +00:00
s 150d26d51e fix: opensc-tool: invalid output of access control for EF (add to r4509)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4826 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-23 06:54:56 +00:00
martin 6648255cb0 EstonianEid: add a broken EstEID ATR to the Micardo driver. Don't force a protocol for EstEID cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4825 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-22 15:48:04 +00:00
martin 50f4ba5ad0 build: detect xsl-stylesheet location for latest opensuse.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4824 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-21 13:53:58 +00:00
alonbl ed81328db6 detect man by xslstylesheetsdir too
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4823 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-21 12:17:51 +00:00
alonbl 8ebde203ee bug#262 - force xsl-stylesheets when using man/doc
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4822 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-21 04:28:01 +00:00
martin df2d7d1dd1 EstEID: remove incorrect ATR matching. A reset is required as there is no way simpler way to identify a broken card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4821 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 15:04:31 +00:00
martin fa0e236881 Missed these from r4818
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4820 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 12:33:07 +00:00
martin f7000a93c1 EstEID: add workarond for a buggy card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4819 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 08:48:56 +00:00
martin 6a750e6cc0 tools: -v sets ctx->debug only if set more than once. -vv also makes the debug go to stderr.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4818 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 07:53:19 +00:00