Commit Graph

236 Commits

Author SHA1 Message Date
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 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
ludovic.rousseau 04154504a1 Fix compiler warning
pkcs15-init.c: In function 'verify_pin':
pkcs15-init.c:2840: warning: declaration of 'r' shadows a previous local
pkcs15-init.c:2836: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5268 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:12:21 +00:00
martin db66f69658 Fix a typo reported by lintian
I: opensc: spelling-error-in-binary ./usr/bin/pkcs15-init dont don't

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5241 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 12:19:11 +00:00
vtarasov 4c183b2b38 pkcs15init: function to finalize profile when binding to the application of the multi-application PKCS#15 card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5100 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:28:44 +00:00
vtarasov 4c57c899b3 pkcs15init: add 'aid' argument to prototype of sc_pkcs15init_erase_card() ...
used to indicate application to erase


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5086 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 16:50:30 +00:00
vtarasov b9e25370ab tools: use 'aid' as the name of option to specify the on-card PKCS#15 application
; update documentation;
; debug messages;
; cleanup the authentic card profile.
 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5050 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-06 14:39:19 +00:00
vtarasov 4d81ffcea6 pkcs15-tool: new 'bind-to-aid' argument ...
to indicate application to bind when more then one on-card application detected


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5046 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 15:22:12 +00:00
vtarasov f2924672d8 pkcs15: add 'aid' parameter to the prototype of the 'bind' functions ...
prepare for the multi-application support


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5041 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:21:04 +00:00
martin 50f99a20f8 libopensc: move TokenInfo fields from sc_pkcs15_card_t to a separate structure.
Thanks to Andre Zepezauer for the patch.

See http://www.opensc-project.org/pipermail/opensc-devel/2010-September/015076.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4788 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-05 15:44:58 +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 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
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
martin 002843c140 pkcs15-init: fix help text ordering (Ludolf Holzheid)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4595 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-26 11:17:57 +00:00
viktor.tarasov ae14336221 pkcs15init: create frame to implement card specific 'sanity check' procedure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4508 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-02 14:26:29 +00:00
martin bcc4500f24 pkcs15-init: only override --verbose to ctx->debug if it was set on command line.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4423 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-16 21:04:36 +00:00
martin d40da986db Revert "pkcs15-init tool: with the new option 'use-default-debug-settings' the debug settings from opensc.conf are used"
This reverts commit b7d492fbae.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4422 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-16 15:08:14 +00:00
viktor.tarasov f505d4f5be pkcs15-init tool: remove blank line after PIN was prompted
Noted by Martin.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4273 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-28 09:20:19 +00:00
viktor.tarasov b7d492fbae pkcs15-init tool: with the new option 'use-default-debug-settings' the debug settings from opensc.conf are used
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4258 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-19 12:13:16 +00:00
viktor.tarasov 07c98da3a8 pkcs15-init: #101: use PIN object's label in the PIN prompt
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4254 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 16:01:13 +00:00
viktor.tarasov 3c813ce57b pkcs15-init tool: use Ctrl-C sensible 'getpass'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4252 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-18 09:45:44 +00:00
martin a20fa13922 pkcs15-init: remove dead code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4233 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-13 11:29:50 +00:00
martin 379519e84e Revert r4191 "Fix logic in pkcs15-tool/pkcs15-init -v"
This reverts commit a61f619296.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4206 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-02 13:11:07 +00:00
martin d1d47d44c5 Fix #198: set correct access flags to private keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4193 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-01 14:16:43 +00:00
martin cd83821502 Don't use sc_debug in src/tools/*, use fprintf(stderr) instead.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4192 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-01 14:16:23 +00:00
martin a61f619296 Fix logic in pkcs15-tool/pkcs15-init -v
Only override ctx->debug if -v given.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4191 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-01 13:44:02 +00:00
martin 8323182d4a Remove leftover from r4113, allow easy side-by-side comparison
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4189 c6295689-39f2-0310-b995-f0e70906c6a9
2010-04-01 10:14:22 +00:00
ludovic.rousseau 30b7888c34 Remove unused variables. Fix warning: unused variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4157 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-28 11:43:17 +00:00
viktor.tarasov e214ba206c pkcs15init: emulation API
Four method are added to the 'sc_pkcs15init_operations':
emu_update_dir		-- create or not the DIR file;
emu_update_any_df	-- update the non-pkcs15 descriptors that are equivalents to pkcs15 xDF files;
emu_update_tokeninfo	-- update analog of tokenInfo;
emu_write_info		-- to not create OPENSC-INFO file;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4128 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-18 09:10:51 +00:00
viktor.tarasov e0f39c529c pkcs15-init tool: make possible pin verification immidiately after card was binded
It's implemented for the card with emulated pkcs#15 and protected private object attributes.

Update to man pages is comming soon.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4126 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-17 18:16:27 +00:00
aj 6545b42c02 cleanup of the debug code:
* reduce to a few, supported functions.
* change all functions to take the debug level as parameter.
* use symbolic names for the debug levels.
* fix tools to pass "verbose"/"opt_debug" as ctx->debug.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4118 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 12:17:13 +00:00
aj 0fdb4478bc On blank, but otherwise perfectly supported card, we get an error here
(with "Unsupported card"). This needs to be improved.

This patch changes the "initialization" to "binding", so we at least
can tell people: you need to initialized an empty card first.
Needs to be improved of course.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4117 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 10:34:18 +00:00
aj 02768fb5dc remove "split-key" option and emulat sign for sign,decrypt keys with padding
and decrypt() for cardos.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4113 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:52:51 +00:00
martin 72a9d8e58f pkcs15-init: sign key usage shortcut does not expand to non-repudiation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4106 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-11 11:23:47 +00:00
aj d22a2483c0 Header file cleanup.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
viktor.tarasov 535131adda pkcs15init: instead of static keycache use the pincache as a content of the pkcs15 AUTH object
Tested with cards:
CardOS v4.3B;
SetCOS 4.4.1B;
Oberthur;
Cryptoflex 16k, 32k e-gate, 32k e-gate token;
GPK 8K;
Athena;
Aventra;
Fetian;
Rainbow 3000 (STARCOS SPK 2.3)




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4058 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 18:24:41 +00:00
martin ba4b02e098 pkcs15-init: don't suggest using --erase-card with --create-pkcs15 in help message.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4053 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-21 09:09:33 +00:00
viktor.tarasov 0330993a61 pkcs15-init tool: simplify 'pristine' test - it's ok if MF, DIR or PKCS15-AppDF is not selectable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4014 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-11 12:14:03 +00:00
aj de05af6632 fold ui.c/h into pkcs15-init.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3994 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:33:33 +00:00
aj b113b90000 remove ui code from library.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3992 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-04 06:19:52 +00:00
aj 72d5ebb79c make erase incompatible with all other actions.
thus we don't need to worry about if the pin/so-pin was passed
for the old structures (before erase) or the new ones (if used
with create).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3966 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-30 19:25:22 +00:00
viktor.tarasov 8aa2128423 pkcs15-init tool: don't ask for PUK value when creating PIN with 'unblock-disabled' in flags
- prepare pkcs15-init tool for creating a pkcs15 PinObject for PUK.




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3948 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-27 17:38:43 +00:00
viktor.tarasov 4662812e93 pkcs15-init tool: when importing bunch of certificates, break after the first error
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3938 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 15:53:29 +00:00
viktor.tarasov 97d5b3e6e7 sorry, commit by error; reverting back to r3935
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3937 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 15:30:33 +00:00
viktor.tarasov 6e9c7e5619 pkcs15-init tool: when importing bunch of certificate, break after the first errorsrc/tools/pkcs15-init.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3936 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-25 15:11:35 +00:00
martin 5a0cc50123 tools: remove slots; implement change in sc_disconnect_card(); convert util_connect_card()/--wait to support the changes in r3931
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3933 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:29:47 +00:00
viktor.tarasov 54ee99d486 pkcs15init: use pinpad
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3917 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-17 21:08:13 +00:00
viktor.tarasov 39ca6b156f pkcs15-init tool: delete both key parts when deleting splitted key
Splitted key is stored as the two private keys with the same ID.
(It's not conform to PKCS#15, but tolerated by OpenSC.)
Previously used 'sc_pkcs15_find_prkey_by_id()' is not appropriated to the case of splitted key.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3900 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-03 18:26:46 +00:00
s 5320ca6fd1 Corrected GOSTR3410 public key structure
Working now with GOST R 34.10:
$ pkcs15-init --store-private-key key --key-usage sign,decrypt --auth-id 2 --id 1 --pin "12345678"
$ pkcs15-init --store-certificate my_cert --id 1 --pin "12345678"

But have problem: no CKA_GOSTR3410_PARAMS by retrieve pub_key from certificate, if pub_key object was removed (see parse_x509_cert, asn1_decode_gostr3410_params)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3859 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-19 15:41:03 +00:00
martin df20fe72e1 merge [3823:3844/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3845 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 19:01:21 +00:00
martin 0eac0fb14c Fix #58: properly document "pkcs15-init -T"
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3841 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 12:25:18 +00:00
martin d672fde449 Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
alonbl 8828faeccf Allow delete data objects by specifying application-name and label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3608 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 21:28:53 +00:00
ludovic.rousseau 91177e51ec Use size_t instead of int when needed, plus some other minor changes
Patch bug.1 included in Ticket #176


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3510 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-05 13:00:01 +00:00
alonbl 0a809dd5cb Complete rewrite of OpenSC build system.
1.  Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2.  Ability to explicitly disable and enable dependencies of the package.
3.  openct, pcsc and nsplugins features are disabled by default.
4.  Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5.  --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6.  Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7.  Add--enable-doc configuration option, allow installing documentation into target.
8.  Add --disable-man configuration option, allow msys mingw32 users to
    build from svn without extra dependencies.
9.  Add export files to each library in order to export only required symbols.
    Windows native build may use these files instead of scanning objects' symbols.
10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the
    same source files in different places.
12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.

Alon Bar-Lev

svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw

_M   .
D    configure.in
_M   src
_M   src/openssh
M    src/openssh/Makefile.am
_M   src/tools
M    src/tools/rutoken-tool.c
M    src/tools/opensc-tool.c
M    src/tools/cardos-info.c
M    src/tools/pkcs15-crypt.c
M    src/tools/pkcs15-init.c
M    src/tools/piv-tool.c
M    src/tools/netkey-tool.c
M    src/tools/eidenv.c
M    src/tools/cryptoflex-tool.c
M    src/tools/util.c
M    src/tools/pkcs11-tool.c
M    src/tools/pkcs15-tool.c
M    src/tools/util.h
M    src/tools/opensc-explorer.c
M    src/tools/Makefile.am
_M   src/pkcs11
M    src/pkcs11/pkcs11-global.c
M    src/pkcs11/framework-pkcs15.c
M    src/pkcs11/mechanism.c
M    src/pkcs11/pkcs11-display.c
M    src/pkcs11/pkcs11-object.c
A    src/pkcs11/opensc-pkcs11.exports
M    src/pkcs11/sc-pkcs11.h
M    src/pkcs11/pkcs11-spy.c
M    src/pkcs11/openssl.c
M    src/pkcs11/Makefile.am
A    src/pkcs11/pkcs11-spy.exports
_M   src/tests
_M   src/tests/regression
M    src/tests/regression/Makefile.am
M    src/tests/sc-test.c
M    src/tests/pintest.c
M    src/tests/Makefile.am
_M   src/include
_M   src/include/opensc
M    src/include/opensc/Makefile.am
A    src/include/opensc/svnignore
M    src/include/Makefile.am
_M   src/signer
_M   src/signer/npinclude
M    src/signer/npinclude/Makefile.am
M    src/signer/Makefile.am
A    src/signer/signer.exports
_M   src/common
A    src/common/compat_dummy.c
D    src/common/getopt.txt
D    src/common/strlcpy.c
D    src/common/LICENSE
A    src/common/compat_getopt.txt
A    src/common/compat_strlcpy.c
A    src/common/LICENSE.compat_getopt
A    src/common/compat_getopt.c
D    src/common/strlcpy.h
D    src/common/ChangeLog
D    src/common/getpass.c
D    src/common/my_getopt.c
A    src/common/compat_strlcpy.h
A    src/common/compat_getpass.c
A    src/common/compat_getopt.h
A    src/common/ChangeLog.compat_getopt
D    src/common/README.strlcpy
D    src/common/my_getopt.h
A    src/common/compat_getpass.h
A    src/common/README.compat_strlcpy
D    src/common/strlcpy.3
A    src/common/README.compat_getopt
D    src/common/getopt.3
D    src/common/README.my_getopt
A    src/common/compat_strlcpy.3
A    src/common/compat_getopt.3
M    src/common/Makefile.am
M    src/Makefile.am
_M   src/pkcs15init
M    src/pkcs15init/pkcs15-oberthur.c
M    src/pkcs15init/profile.c
M    src/pkcs15init/pkcs15-lib.c
M    src/pkcs15init/pkcs15-rutoken.c
A    src/pkcs15init/pkcs15init.exports
M    src/pkcs15init/pkcs15-gpk.c
M    src/pkcs15init/Makefile.am
_M   src/scconf
M    src/scconf/Makefile.am
M    src/scconf/parse.c
A    src/scconf/scconf.exports
_M   src/libopensc
M    src/libopensc/card-rutoken.c
M    src/libopensc/compression.c
M    src/libopensc/sc.c
M    src/libopensc/card-piv.c
M    src/libopensc/pkcs15-openpgp.c
M    src/libopensc/pkcs15-postecert.c
M    src/libopensc/pkcs15-tcos.c
M    src/libopensc/opensc-config.in
M    src/libopensc/reader-pcsc.c
A    src/libopensc/internal-winscard.h
M    src/libopensc/ctx.c
A    src/libopensc/libopensc.exports
M    src/libopensc/pkcs15-piv.c
M    src/libopensc/pkcs15-infocamere.c
M    src/libopensc/internal.h
M    src/libopensc/pkcs15-actalis.c
M    src/libopensc/pkcs15-starcert.c
M    src/libopensc/card-oberthur.c
M    src/libopensc/pkcs15-atrust-acos.c
M    src/libopensc/p15card-helper.c
D    src/libopensc/part10.h
M    src/libopensc/ui.c
M    src/libopensc/card-gpk.c
M    src/libopensc/pkcs15-wrap.c
M    src/libopensc/pkcs15-gemsafeGPK.c
M    src/libopensc/log.c
M    src/libopensc/pkcs15-esteid.c
M    src/libopensc/pkcs15-prkey-rutoken.c
M    src/libopensc/log.h
M    src/libopensc/Makefile.am
M    src/libopensc/reader-openct.c
_M   aclocal
M    aclocal/Makefile.am
_M   win32
M    win32/Makefile.am
A    win32/versioninfo.rc.in
A    win32/ltrc.inc
A    configure.ac
_M   doc
_M   doc/tools
M    doc/tools/pkcs15-profile.xml
D    doc/changelog.sh
D    doc/export-wiki.xsl
_M   doc/api
_M   doc/api/file
M    doc/api/man.xsl
_M   doc/api/asn1
_M   doc/api/apps
_M   doc/api/init
_M   doc/api/types
_M   doc/api/card
M    doc/api/html.xsl
_M   doc/api/misc
_M   doc/api/util
M    doc/Makefile.am
D    doc/export-wiki.sh
AM   doc/nonpersistent
A    doc/nonpersistent/export-wiki.xsl
A    doc/nonpersistent/Makefile.am
A    doc/nonpersistent/export-wiki.sh
A    doc/nonpersistent/svn2cl.xsl
D    doc/generate-man.sh
D    doc/svn2cl.xsl
M    Makefile.am
A    svnignore
_M   etc
M    etc/opensc.conf.in
M    etc/Makefile.am
D    man
_M   solaris
M    solaris/Makefile



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3405 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 16:06:59 +00:00
alonbl 741330ba19 Allow specifying application name for data objects at pkcs15-init.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3403 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 15:00:04 +00:00
aj c6a54578fc use static without inline - the compiler can optimize the function as
inline or not, whatever it prefers. "static inline" is not supported by
the visual studio c compiler.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3210 c6295689-39f2-0310-b995-f0e70906c6a9
2007-07-09 14:52:03 +00:00
aj cea32a8016 make app_name, options and option_help static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3192 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-29 13:19:19 +00:00
aj 4ca4eba365 silence more warnings by gcc/sparse.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3189 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:58:38 +00:00
ludovic.rousseau be309330e5 do not use global variables app_name, options and option_help so they
can be static


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3188 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:46:08 +00:00
aj b0bc6df80c fix more warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3187 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 13:38:16 +00:00
ludovic.rousseau 126593aa01 - use strlcpy() instead of strncpy() to always have a terminating
NUL-byte

- use sizeof(field) instead of SC_PKCS15_MAX_LABEL_SIZE-1 or equivalent as
  the 3rd argument of strlcpy()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2993 c6295689-39f2-0310-b995-f0e70906c6a9
2006-07-12 08:12:38 +00:00
aj 56082ee3a0 initialize with NULL, so the later check for NULL will work.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2928 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:16:48 +00:00
nils 25e5c95dde use sc_context_create instead of sc_establish_context
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2833 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-07 20:14:43 +00:00
sth f674204d63 Add possibility to change pkcs15 attributes (currently only the label)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2803 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-03 16:24:54 +00:00
aj 131842c80b make code easier by removing match variable.
check if cert was returned != NULL.
free cert if there is some error.
set variables to NULL after being freed,
to avoid potential double free bugs.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2705 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:29:54 +00:00
sth a3e1bc8f4f Let --assert-pristine work for Setcos 4.4 cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2679 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-31 19:31:45 +00:00
nils 47ee84e72d add functions
void sc_ctx_suppress_errors_on(sc_context_t *ctx);
	void sc_ctx_suppress_errors_off(sc_context_t *ctx);
to turn on/off error suppression (to avoid accessing
sc_context_t directly) and use it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2671 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:08:06 +00:00
nils fa65fbf285 summary: - add new function sc_format_oid to libopensc
- cleanup libopensc api


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2670 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 18:05:30 +00:00
sth 10fa4a6962 Fix: deleting a cert chain with 1 or more intermediate CA's crashed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2625 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-28 14:52:32 +00:00
nils 052a4933ae remove unused variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2606 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-19 16:37:19 +00:00
sth 00be34c4a2 Added certificate update functionality
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2593 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-15 19:40:20 +00:00
nils d37315ec35 cleanup key usage handling, cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2550 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-07 09:32:52 +00:00
nils 13a3e699e5 adjust key usage bits
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2545 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-06 21:18:26 +00:00
nils 3b6a90000a add missing include, removed unused variable and initialize variable
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2518 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-24 15:59:01 +00:00
sth 8e3dee0585 Added set_userpin_ref() to link a PIN value to a PIN ref for an existing user PIN
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2512 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-23 09:01:57 +00:00
sth 26108b0280 Added support for deleting pkcs15 objects (if the pkcs15init card driver for that card supports it)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2508 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-22 09:23:46 +00:00
nils 39373c1ec8 initialize the oid object, patch supplied by Tarasov Viktor <vtarasov@idealx.com>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2477 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-10 18:20:04 +00:00
nils c2751a60da fix use of x509v3 key usage extension value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2445 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-20 17:58:55 +00:00
sth 2585106e3c Print an error if sc_pkcs15init_bind() fails
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2381 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-05 17:43:50 +00:00
aj bf6808e3d8 "smart card" not "smartcard" or "SmartCard".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2354 c6295689-39f2-0310-b995-f0e70906c6a9
2005-06-16 19:35:31 +00:00
bert eb4717ea17 API fixup: use defined type instead of struct for exposed structs (part 2)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2233 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 00:04:44 +00:00
aet a854de4698 - Warning fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2157 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-08 09:51:56 +00:00
nils edbfa95bf4 const fixes etc.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2148 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 21:01:09 +00:00
aet 176323ac03 - Warning fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2143 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 10:06:21 +00:00
nils ea59c97887 fix memory leak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2090 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-21 18:25:26 +00:00
nils d73ed35678 change auth_id -> id, show pin type, update pkcs15-init manpage
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2073 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-13 21:52:39 +00:00
nils ace9520193 fix memory leak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1951 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-24 17:20:29 +00:00
sth 34e3a42c8f If you do pkcs15-init -C with the onepin option, you can now specify --pin and --puk instead of --so-pin and --so-puk (also allowed for backward compatibility)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1910 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-06 14:07:18 +00:00
nils 5ebccf1842 rename "StarCOS" -> "STARCOS SPK 2.3"
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1900 c6295689-39f2-0310-b995-f0e70906c6a9
2004-09-17 19:13:30 +00:00
nils bfd5b49436 pkcs15-init etc. support for pkcs15 data objects
patch supplied by Victor Tarasov <vtarasov@idealx.com>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1877 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-26 18:47:23 +00:00
nils 82ec09e92b check return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1826 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-12 08:42:55 +00:00
nils 71e5f638c5 fix/cleanup passphrase input
Michael Bell <michael.bell@cms.hu-berlin.de> and Nils Larsch


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1825 c6295689-39f2-0310-b995-f0e70906c6a9
2004-07-12 08:26:53 +00:00
nils 9fb99e7051 use opt_passphrase, if present, before asking the user
patch supplied by Michael Bell <michael.bell@cms.hu-berlin.de>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1804 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-25 15:44:33 +00:00
aj 9b7cdbffad cleanup debug/quiet/verbose handling.
now all tools accept "-v" for verbose
operation, and you can specify -v several
times to get more verbose i.e. debugging
output.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1792 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-13 20:13:12 +00:00
aj 4aa731e415 oops, forgot the select.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1791 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-13 20:04:53 +00:00
aj 209dad0217 fixed a small bug (!= instead of ==) and made
the code hopefully more readable.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1790 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-13 19:45:24 +00:00
nils 8cb6a3f94a "--assert-pristine" workaround for Starcos cards (see comment in the patch)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1776 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-21 20:11:56 +00:00
nils b057f4055d add support for "finalize" to pkcs15-init to activate the ACs for starcos
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1766 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-17 09:25:30 +00:00
sth 5d6af9a68c Added --cert-label option, usefull to specify the user cert label if you do a --store-private-key
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1745 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-24 20:55:34 +00:00