Commit Graph

27 Commits

Author SHA1 Message Date
Jakub Jelen ef724e1e57 pkcs15-authentic: Do not confuse static analyzers 2018-10-01 23:07:34 +02:00
Jakub Jelen a85a4a8b48 pkcs15-authentic: Avoid memory leak on failure 2018-10-01 23:07:34 +02:00
Frank Morgner 6819759946 fixed memory leak 2018-06-29 17:14:55 +02:00
Peter Marschall 5abe99d228 fix typos
Mass-typo fixing, almost exclusively in comments and text strings.

While at it also fixed a few (very few) grammar errors.
2018-04-15 09:34:45 +02:00
Maciej S. Szmigiero 62cbda6cd9 Fix log messages format and parameter issues flagged by GCC
Since "Add GCC format checking attributes to log functions" commit GCC
warns us about problems with format strings and their arguments provided
to OpenSC message logging functions.

This commit fixes all cases where GCC warned about incorrect format on
64-bit Linux, 32-bit and 64-bit mingw builds (with SM and OpenSSL enabled).
Well, almost all since on mingw GCC does not recognize "ll" size specifier
(present at least since Visual Studio 2005, also in mingw own CRT) so these
(few) warnings about it remain.

In most cases format size specifier for size_t type was missing (usually
size was left at default int level, with is different on 64-bit x86).
Some formats had too few / too many arguments.
In some cases pointers were printed as integers.
Some long variables were missing "l" prefix (especially with regard to %x
format).

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2017-03-27 11:05:16 +02:00
Michał Trojnara 645780e6d4 NULL parameter check moved to sc_file_free()
This fixes numerous issues where the check is *not* performed,
and also simplifies the code.
2017-01-10 12:46:44 +01:00
Viktor Tarasov 5be51ea3e2 pkcs15init: authentIC: init card/pin not supported 2016-04-27 15:48:18 +02:00
Frank Morgner 7e29fcd26c pkcs15-authentic.c: fixed potential resource leak 2015-10-30 12:18:04 +01:00
Frank Morgner 4af4308d19 authentic: fixed resource leak
pkcs15-authentic: fixed resource leak
card-authentic: fixed resource leak
2015-05-08 09:10:48 +02:00
Frank Morgner 3a92bf7af5 fixed resource leaks 2015-02-05 01:38:41 +01:00
Frank Morgner 11881a61b8 removed/fixed dead code 2015-02-05 01:38:41 +01:00
Viktor Tarasov 122c58de85 pkcs15init: do not use 'der-data' of pubkey data 2014-02-09 18:49:58 +01:00
Viktor Tarasov e57d443e86 pkcd15init: remove trailing whitespaces
inspired by
http://www.opensc-project.org/pipermail/opensc-devel/2012-March/017883.html

Change-Id: I817f903e67965942d9cc0c30931dbaea0c5f736e
2012-04-02 23:40:05 +02:00
Stef Walter 6ed52a06b8 libopensc: Don't fail to allocate memory when mlock fails
* Print out warning when mlock fails, and continue.
 * The warning required a ctx to be passed in, so that means
   changing a few function signatures.

https://www.opensc-project.org/opensc/ticket/389
2012-02-17 10:02:55 +01:00
vtarasov f026db6f84 compile warnings: resolve 'comparison between signed and unsigned' compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5534 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 16:59:39 +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
ludovic.rousseau b6ea61fcf5 Remove dead code
pkcs15-authentic.c:692:2: warning: Value stored to 'caps' is never read
        caps = card->caps;
        ^      ~~~~~~~~~~


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5151 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 20:54:31 +00:00
ludovic.rousseau c17eb11d41 Fix compiler warning
pkcs15-authentic.c:97:1: warning: no previous prototype for function
      'authentic_reference_to_pkcs15_id' [-Wmissing-prototypes]
authentic_reference_to_pkcs15_id (unsigned int ref, struct sc_pkcs15_id *id)
^


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5130 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:04:02 +00:00
vtarasov ffcc58baf3 pkcs15init: debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5044 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:33:32 +00:00
vtarasov 103af724fe liopensc: log: use 'normal' as default debug level ...
and make shorter short call to insert debug message


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5040 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 11:33:03 +00:00
vtarasov 3a2e88ce4d AuthentIC: remove unused members of the SDO structure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5039 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 10:52:50 +00:00
vtarasov 392e6eff98 AuthentIC: use short form to insert 'normal' debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5038 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-04 09:19:09 +00:00
vtarasov 89d47696dd AuthentIC: remove unused macros, code layout
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5031 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 16:26:41 +00:00
vtarasov 0056eeb34c AuthentIC: memory allocation errors, thanks to Martin
for memory allocation errors use SC_ERROR_OUT_MEMORY instead of SC_ERROR_MEMORY_FAILURE


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5029 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 15:01:03 +00:00
vtarasov 6aaf1a79e3 AuthentIC: cleanup dead code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5012 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 10:52:15 +00:00
vtarasov 682c464540 AuthentIC: "now there is no way to build without OpenSSL" (Andre Zepezauer)
Thanks for patch.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5011 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 08:54:07 +00:00
vtarasov 1a58c429cb 'AuthentIC': basic support of Oberthur's 'COSMO.v7/AuthentIC.v3.2' ...
it's the natively PKCS#15 card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5006 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 14:40:28 +00:00