viktor.tarasov
2db473a160
libopensc: export 'sc_card_find_rsa_alg'
...
Following proposal of Andre Zepezauer, see
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014699.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4683 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:16:54 +00:00
viktor.tarasov
0fe106e53a
libopensc: in a supplement to r4668
...
Use 'max_recv_size' when building APDU for 'select file'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4682 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-04 20:08:52 +00:00
ep
223d5e1bb3
Fix signedness issues in pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4681 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:47 +00:00
ep
31e6602835
Remove unused variables and constants from pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4680 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:45 +00:00
ep
f70d4acf07
Squelch warning about unused se_num argument in itacns_set_security_env(),
...
as the driver is computing the right argument from the security environment
data.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4679 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:38 +00:00
ep
8697b4c04b
Fix signedness warnings in card-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4678 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:36 +00:00
ep
fbf1d621cb
Remove unused give_random operation
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4677 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:34 +00:00
ep
f5ef30bdd7
Pass SFI as an appropriately-sized number
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4676 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:31 +00:00
martin
49577941d6
Fixup for #102 : also in command help.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4675 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 18:23:49 +00:00
martin
b99d420a9e
manpages: #102 : --change-pin also works for a PUK code.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4674 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 18:21:14 +00:00
martin
2d32947de4
Style: // -> /**/
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4673 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 13:39:01 +00:00
martin
4697cc386b
libpkcs11: Print error messages from PKCS#11 module loading
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4672 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 13:38:56 +00:00
viktor.tarasov
9acc8c44af
pkcs11: #250 : update slot PIN flags when verifying slot's auth object
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4671 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 09:19:27 +00:00
martin
241d3b5d86
libopensc: improve max_send/recv_size related code comments.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4670 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:39 +00:00
martin
59a389757e
opensc.conf: Better comment for max_send/recv_size meaning and default values.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4669 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:35 +00:00
martin
07ab2a2871
Ticket #226 : Initial changes as noted by reporter
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4668 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:24 +00:00
martin
27ed902ce0
Add a FIXME for keys>2048b
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4667 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:46:37 +00:00
martin
b04a1ef9f0
EstEID: small fixes for working with a modified max_send/recv_size
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4666 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:46:31 +00:00
martin
befff1b0d4
libopensc: PIN usage counter is decreased every time it is sent to the card, no matter what the card replies (should probably reply with success)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4665 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:43 +00:00
martin
5e3f7b10d0
Whitespace fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4664 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:37 +00:00
martin
15b6f29013
Whitespace fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4663 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:32 +00:00
martin
8c9666d631
pkcs11: C_SeedRandom is not implemented by OpenSC nor most smart cards, nor does it fit well into PKCS#15 concept.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4662 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:26 +00:00
martin
12a1e9d49b
pkcs15: don't override TokenInfo PRNG flag. pkcs11: announce CKF_RNG if the card driver supports it, bypassing PKCS#15.
...
GET CHALLENGE and RNG don't match 1:1 anyway.
Thanks to Andre Zepezauer for noticing this.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4661 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 06:23:17 +00:00
martin
fc4dff1d12
Debian #451155 : Document pkcs15-init --update-certificate/-U in man page.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4660 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-31 01:24:53 +00:00
martin
8d3a1bcd1f
libopensc: remove the "etoken" alias for "cardos" cards.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4659 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-31 01:24:53 +00:00
viktor.tarasov
0285264af5
#73 : pkcs15-tool: when changing PIN, print message if no PIN value supplied
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4658 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-30 16:37:15 +00:00
martin
1bd7e5d2f5
MacInstaller: Add .bundle generation capability from SCA. Thanks to Jean-Pierre Szikora for the reminder.
...
Adobe Acrobat is one program that requires the .bundle format.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4657 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-27 09:39:24 +00:00
martin
b4f9ac456a
pkcs15-init: fix leftover from [4646]
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4656 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-27 09:28:42 +00:00
martin
a7191a9540
Revert CardOS change from Italian CNS patch [4627].
...
Limiting Le for CNS should be done in pkcs15-itacns.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4655 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-27 08:24:39 +00:00
s
ed589feda7
add ATR for Rutoken ECP (DS)
...
Thanks to Aktiv Co. Kirill Mescheryakov for the patch.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4654 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 19:24:23 +00:00
martin
c5d18635ef
build: add installer files and a small script to build a win32 installer from build project binaries.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4653 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 12:57:47 +00:00
martin
cd01ad0936
pkcs15init: On Windows, get the profile directory from registry instead of configuration file.
...
This allows the installation directory for non-dll files to be anywhere on the system.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4652 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 12:51:55 +00:00
martin
543f2faf2b
Update NEWS for 0.12.0
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4651 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 09:09:28 +00:00
martin
4cbe69413b
Add build script for Mac OS X. Uses github copies of SVN for source.
...
Includes:
Add static engine_pkcs11.so to the 10.6 installer (#246 )
Patch from Mart Randala: add a nice background image and readme file and license file.
Patch from João Poupas: fix a typo and also work with docbook-xsl from macports.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4650 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 08:44:32 +00:00
martin
5f518a96be
Update OpenSC.tokend related default config file entries.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4649 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 08:40:54 +00:00
martin
a3d02dd63c
CT-API, PC/SC: truncating atr_len makes no sense.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4648 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 08:32:42 +00:00
martin
4f03502b60
pkcs11: check PKCS#11 function parameters for obvious errors and return CKR_ARGUMENTS_BAD early without locking the module.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4647 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 14:47:14 +00:00
martin
9a63e03e9a
pkcs11/pkcs15-init: remove automagic software key generation. Remove software based secret key handling from PKCS#11.
...
Support for importing cleartext keys is left untouched, but all transparent key generation by either opensc-pkcs11.so or pkcs15-init is removed, to make the operation with cleartext keys visible to the user and his explicit wish.
OpenSC is a PKCS#11 library for accessing keys protected by a smart card. Key material in software is not protected by smart cards and can leave a false sense of security to the user.
http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013877.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4646 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 14:47:07 +00:00
martin
1f73d32e40
libopensc: Remove unused internal SC_ERROR_EXTRACTABLE_KEY and correct relevant comments (native != extractable)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4645 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 10:32:26 +00:00
martin
98255b109a
libopensc: Fix SC_ERROR defines and messages: remove unused error defines, fix the internal value of some PKCS#15 related errors.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4644 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 10:32:21 +00:00
martin
2b1a8b5828
build: don't check for unused functions and headers.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4643 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 10:32:17 +00:00
martin
c235f93cff
EstEID: sc_format_path sets SC_PATH_TYPE_PATH by default
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4642 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 09:34:30 +00:00
ep
6474853217
Support reading record files by SFI
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4641 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:59 +00:00
ep
cba47b33bf
Only free current_file if it is set
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4640 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:56 +00:00
ep
5990d26f80
If a FCI features tag 84h, then the file is a DF
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4639 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:53 +00:00
ep
fd396a0546
Refactored the "select the file referenced by current_path; die on error" idiom in opensc-explorer.
...
This version, additionally, skips this step entirely if there is no current_path; this is useful when starting with --mf "".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4638 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-20 22:51:42 +00:00
ep
4e726bd09b
Fix and document opensc-explorer's new -m, --mf option
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4637 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-20 22:51:39 +00:00
ludovic.rousseau
f47416d60e
Do not cast the return value of malloc(3) and calloc(3)
...
From http://en.wikipedia.org/wiki/Malloc#Casting_and_type_safety
" Casting and type safety
malloc returns a void pointer (void *), which indicates that it is a
pointer to a region of unknown data type. One may "cast" (see type
conversion) this pointer to a specific type, as in
int *ptr = (int*)malloc(10 * sizeof (int));
When using C, this is considered bad practice; it is redundant under the
C standard. Moreover, putting in a cast may mask failure to include the
header stdlib.h, in which the prototype for malloc is found. In the
absence of a prototype for malloc, the C compiler will assume that
malloc returns an int, and will issue a warning in a context such as the
above, provided the error is not masked by a cast. On certain
architectures and data models (such as LP64 on 64 bit systems, where
long and pointers are 64 bit and int is 32 bit), this error can actually
result in undefined behavior, as the implicitly declared malloc returns
a 32 bit value whereas the actually defined function returns a 64 bit
value. Depending on calling conventions and memory layout, this may
result in stack smashing.
The returned pointer need not be explicitly cast to a more specific
pointer type, since ANSI C defines an implicit conversion between the
void pointer type and other pointers to objects. An explicit cast of
malloc's return value is sometimes performed because malloc originally
returned a char *, but this cast is unnecessary in standard C
code.[4][5] Omitting the cast, however, creates an incompatibility with
C++, which does require it.
The lack of a specific pointer type returned from malloc is type-unsafe
behaviour: malloc allocates based on byte count but not on type. This
distinguishes it from the C++ new operator that returns a pointer whose
type relies on the operand. (see C Type Safety). "
See also
http://www.opensc-project.org/pipermail/opensc-devel/2010-August/014586.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4636 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 15:08:51 +00:00
ep
d37dd91b63
Use strlcpy(3), strlcat(3) in pkcs15-itacns.c
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4635 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:30 +00:00
ep
b279287701
strlcat(3) implementation
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4634 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:26 +00:00