Commit Graph

4769 Commits

Author SHA1 Message Date
martin be5456d3ca opensc-tool: make list_algorithms() table driven
Use easily extensible tables instead of explicit coding to display
algorithm names and options in list_algorithms.

Leverage the new tables to add more RSA hashes.

Signed-off-by: Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5367 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:11 +00:00
martin e5a133d00c Fix a crash on Windows, where pkcs15-tool -E would always crash in sc_pkcs15_free_card()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5366 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:06 +00:00
martin 4f768fcdc5 WindowsInstaller: Fix warning CNDL1069 about deprecated attribute
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5365 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:01 +00:00
martin 404d84ae48 WindowsInstaller: Fix Wix warning:
Z:\opensc\win32\OpenSC.wxs(22) : warning CNDL1121 : Package/@InstallerVersion must be 200 or greater for a 64-bit package.
The value will be changed to 200. Please specify a value of 200 or greater in order to eliminate this warning.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5364 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:50:52 +00:00
andre 6409755bea pkcs11-tool.c: Avoid warning:
pkcs11-tool.c:2000: warning: comparison between signed and unsigned


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5363 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 09:18:12 +00:00
andre 261d5269e5 pkcs15-init.h: Avoid warning:
pkcs15-init.c:1473: warning: assignment discards qualifiers from pointer target type

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5362 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 09:12:17 +00:00
andre 90ffef6dc9 asn1.c: Check boundaries __before__ accessing memory.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5361 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-18 12:29:47 +00:00
martin c0c0882a1e WindowsInstaller: split the UpgradeCode for x86 and x64, so that both versions could be installed in parallel on x64
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5360 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-18 10:01:32 +00:00
martin 007d27feeb Introduce sc_ctx_log_to_file to set the debug file of libopensc.
On Windows every DLL has their own file descriptor table, thus specifying
-v from any of the OpenSC tools resulted in a crash when the tool tried to override
ctx->debug_file with stderr.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5359 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-18 10:01:27 +00:00
martin 1c244f8644 WindowsInstaller: fix "parallel installs"
Before this change, installing a new MSI would create a new OpenSC entry in "Add/Remove programs".
Now correctly a single instance exists and a seamless upgrade can be done.

Make the URL-s for support information more specific and add the OpenSC icon to the programs list.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5358 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-18 09:29:15 +00:00
vtarasov 8de6b57882 pkcs15init: different possible kinds of EC generate key parameters ...
named curve, oid and der


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5357 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 18:48:12 +00:00
vtarasov ef1726e782 pkcs11: process the EC key generation type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5356 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 18:45:27 +00:00
vtarasov caf3789439 asn1: in encode-object-id procedure do not stop on zero -- it's a valid value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5355 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 18:39:01 +00:00
martin 4072b2bc0d WindowsInstaller: fix x86 build after r5351
error CNDL0150 : Undefined preprocessor variable '$(var.PlatformProgramFilesFolder)'.
NMAKE : fatal error U1077: '"C:\Program Files\Windows Installer XML v3.6\bin\candle.exe"' : return code '0x96'

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5354 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 16:58:09 +00:00
martin b0c200c885 WindowsInstaller: Always use a canonical name for OpenSC related registry entries.
This fixes the 64bit build looking for registry keys under "OpenSC (64 bit)" which is the name of the package.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5353 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 16:12:03 +00:00
martin 15d6ecddc6 WindowsInstaller: One more fix for x64 installer: opensc.conf
c:\jenkins\workspace\OpenSC_win64_nightly\win32\OpenSC.wxs(61) : error LGHT0204 : ICE80: This 32BitComponent opensc.conf uses 64BitDirectory INSTALLDIR
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Windows Installer XML v3.6\bin\light.exe"' : return code '0xcc'

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5352 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 13:18:11 +00:00
martin 5ccfeddf46 WindowsInstaller: Add win64 flag even to platform-independent files.
* Install to "System64Folder" on x64

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5351 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 13:05:47 +00:00
martin 82258b01f7 WindowsInstaller: fix typo, causing the x86 installer to claim to be x64
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5350 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-17 12:50:30 +00:00
vtarasov 2202614fdc pkcs15init setcos: no need of card specific 'delete-object' callback ...
there is nothing specific inside and it's never called by pkcs15init


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5349 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-16 17:57:49 +00:00
vtarasov 28ccae7918 card-piv: store serial number into the 'serialnr' member of sc_card structure ...
... when serial number was asked for the first time.
Then return the stored value for the every next request of serial number.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5348 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-16 17:35:56 +00:00
martin e2aac209d2 WindowsInstaller: amend r5345, Win64 is a property of a Component, not File
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5347 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-16 14:25:21 +00:00
martin 3e20fab565 Add back removed product name
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5346 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-16 14:14:56 +00:00
martin af098605d7 WindowsInstaller: set Win64 flag for binaries when building for win64 and use the right program files folder.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5345 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-16 14:10:07 +00:00
vtarasov d673e5f109 pkcs15init myEID: in profile increase size of xDF files, also ...
during initialization add the all xxDF to the ODF


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5344 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 17:11:38 +00:00
vtarasov 614e9fa566 pkcs15init: sipmlify the 'delete-object' callaback prototype ...
now it takes 'sc_pkcs15_object' argument instead of two arguments - object's type and object's data.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5343 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:50:04 +00:00
vtarasov 3aae1d39c2 framework-pkcs15: minor coding style issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5342 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:35:29 +00:00
vtarasov fb97d8b4b4 pkcs15-tool: print title and size of the EC public keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5341 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:34:22 +00:00
vtarasov 99fac2685a piv-tool: increase receive buffer for the 'send-apdu' command
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5340 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:33:18 +00:00
dengert 461721cf6d PIV piv_get_uid to derive a better guid from the
FASCN or the GUID so that most of the uniquness
is maintained. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5339 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-14 16:51:25 +00:00
alonbl 9ca350f409 Use check target for tests
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5338 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 21:58:04 +00:00
vtarasov 49da421ac0 pkcs15init: prepare pkcs15-lib for the EC key type ...
use keygen consistency procedure to return the EC key size;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5337 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 18:08:18 +00:00
vtarasov 7b6cf4219e pkcs15init: when deleting object, do not try to select object file without valid path
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5336 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 17:59:59 +00:00
vtarasov 622570a28e pkcs15-init tool: in keygen parameters use 'curve' name without leading separators
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5335 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 17:55:20 +00:00
vtarasov d611dcc9ed piv-tool: add containers discovery
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5334 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 17:51:08 +00:00
vtarasov 6705e2506b pkcs15init: remove useless function, use OpenSC standard convention for return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5333 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 13:23:05 +00:00
vtarasov 2fecaa73bd pkcs15init: introduce EC key generation parameters
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5332 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 11:36:40 +00:00
martin cdf88a895b WindowsInstaller: amend r5329, object name is not the target name.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5331 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 07:49:07 +00:00
martin 7c17247446 WindowsInstaller: enable zlib by default.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5330 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 07:48:53 +00:00
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
martin 577ccdbf26 Fix #337 rutoken-tool is obsolete and can be removed, thus no manpage is needed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5328 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 14:42:55 +00:00
martin 639ca655b6 WindowsInstaller: Correct support for x64 builds
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5327 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 14:42:48 +00:00
vtarasov 771aeb32af pkcs15-tool: print EC key label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5326 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 13:07:34 +00:00
vtarasov e8f6a3e407 pkcs11-tool: now it's possible to show only the objects of a given type ...
when 'type' option is used with the 'list-objects' actions


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5325 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 13:00:57 +00:00
vtarasov b85e1a798f piv-tool: new action to print the key slots properties
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5324 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 12:02:47 +00:00
vtarasov eb7bc552b1 piv: no 'usepin' authentication mode in PIV tools
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5323 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 11:55:00 +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 f1dec64630 piv-tool: in 'send-apdu' command increase size of response buffer ...
'GET DATA' apdu can return the code 'data still available'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5320 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 20:08:09 +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