ludovic.rousseau
a8da1aa886
Fix compiler warning
...
card-piv.c:2014:7: warning: unused variable 'outp' [-Wunused-variable]
u8 * outp = out;
^
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5138 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:47:09 +00:00
ludovic.rousseau
63c293e963
Fix a compiler warning
...
opensc-explorer.c:1440:22: warning: conversion specifies type 'unsigned int' but
the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
printf("expecting %u, got only %d bytes.\n", len, r);
~^ ~~~
%lu
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5137 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:44:56 +00:00
ludovic.rousseau
1b192154d0
Fix compiler warning
...
pkcs15-westcos.c:247:8: warning: initializing 'char *' with an expression of
type 'char const [8]' discards qualifiers
char *name = "WESTCOS";
^ ~~~~~~~~~
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5136 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:42:49 +00:00
ludovic.rousseau
b3aee43e96
Fix a bug. read(2) returns a signed value. read(2) errors were not detected in
...
the previous code.
card-piv.c:833:10: warning: comparison of unsigned expression < 0 is always
false [-Wsign-compare]
if (len < 0) {
~~~ ^ ~
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5135 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:34:29 +00:00
ludovic.rousseau
6ccb540185
Fix compiler warning
...
ctx.c:56:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5134 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:20:43 +00:00
ludovic.rousseau
4459b3df6c
Fix compiler warnings
...
sc.c:406:39: warning: missing field 'usage' initializer
[-Wmissing-field-initializers]
SC_AC_NEVER, SC_AC_KEY_REF_NONE, {{0}}, NULL
^
sc.c:409:38: warning: missing field 'usage' initializer
[-Wmissing-field-initializers]
SC_AC_NONE, SC_AC_KEY_REF_NONE, {{0}}, NULL
^
sc.c:412:41: warning: missing field 'usage' initializer
[-Wmissing-field-initializers]
SC_AC_UNKNOWN, SC_AC_KEY_REF_NONE, {{0}}, NULL
^
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5133 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:16:54 +00:00
ludovic.rousseau
9811426bc5
Fix compiled warnings
...
card-authentic.c:1770:1: warning: no previous prototype for function
'authentic_manage_sdo_encode_prvkey' [-Wmissing-prototypes]
authentic_manage_sdo_encode_prvkey(struct sc_card *card, struct ...
^
card-authentic.c:1832:1: warning: no previous prototype for function
'authentic_manage_sdo_encode' [-Wmissing-prototypes]
authentic_manage_sdo_encode(struct sc_card *card, struct ...
^
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5132 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:11:18 +00:00
ludovic.rousseau
e2bd5b1cc6
Fix compiler warning
...
pkcs15-pubkey.c:787:5: warning: no previous prototype for function
'sc_pkcs15_read_der_file' [-Wmissing-prototypes]
int sc_pkcs15_read_der_file(sc_context_t *ctx, char * filename,
^
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5131 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:05:33 +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
ludovic.rousseau
65b65e588b
Use & for logical and
...
pkcs15-asepcos.c:518:23: warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wconstant-logical-operand]
*p++ = (fileid >> 8) && 0xff;
^ ~~~~
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5129 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 16:54:28 +00:00
ludovic.rousseau
689ac169d4
Fix compiler warning
...
cards.h:215: warning: function declaration isn’t a prototype
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5128 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 16:37:11 +00:00
dengert
1adcc611c2
Add _sc_delete_reader to allow for a single reader to be
...
deleted from the ctx->readers list. This will be used
by cardmod and for consistence by sc_release_context.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5127 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-03 21:18:26 +00:00
martin
d57395173c
EstonianEid: better detection and workaround for the double tag bug with v3.0 cards
...
See wiki:EstonianEid for the description of known issues with the card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5126 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-01 17:32:03 +00:00
andre
13dd004198
pkcs15.c: Check info->label for NULL before calling strdup(). Avoids segmentation fault in the case where info->label == NULL. Fixes #318 .
...
Thanks lmamane.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5125 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 22:18:16 +00:00
martin
03be594243
core: Fix PIN caching for PIN codes protecting user consent keys, broken in r4048
...
Such PIN codes were erroneously cached in memory, even though not used with revalidation..
User consent relates to private keys, not PIN codes.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5124 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 14:25:35 +00:00
martin
9afbc55883
pkcs15-tool: check for remaining PIN tries before changing a PIN.
...
If the card supports it, changing a blocked PIN will result in an error before PIN entry, not when the card re-states that the PIN is already blocked.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5123 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 14:25:30 +00:00
ep
1ed93af035
Amend and update register of IC manufacturers for itacns
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5122 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 08:43:32 +00:00
martin
e033245ad1
MacInstaller: track Tokend branch in Git based on OpenSC release.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5121 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-24 10:59:20 +00:00
martin
2b04b0c328
libopensc: calling sc_context_create without parameters is not allowed
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5120 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-22 12:53:09 +00:00
martin
dac7b9f750
MiniDriver: MS Visual Studio is identified by _MSC_VER not VISUAL_STUDIO
...
http://predef.sourceforge.net/precomp.html#sec35
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5119 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-20 13:02:50 +00:00
martin
0c263bd234
MiniDriver: change cardmod.h include style to help building with compilers which don't have cardmod.h registered in the search path.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5118 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-20 12:58:39 +00:00
martin
8c51f42121
MiniDriver: embed the manifest into minidriver DLL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5117 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-20 12:58:30 +00:00
martin
c44ad2c028
MiniDriver: Create cardmod DLL with nmake as well.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5116 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 15:06:29 +00:00
vtarasov
8e81e3912b
MyEID: pkcs15init: create all xDF files at the stage of the card initialisation ...
...
it was discussed in
http://www.opensc-project.org/pipermail/opensc-devel/2011-January/015620.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5115 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 14:47:54 +00:00
vtarasov
6ce28a6adb
libopensc: initialize 'sc_ef_atr' type variable
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5114 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 14:22:57 +00:00
vtarasov
2fff7a1e91
pkcs15init: profile: unused variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5113 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 14:16:12 +00:00
martin
bc5ddb7d95
EstonianEid: add new 2011 card ATR (18.01.2011+)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5112 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-19 08:37:07 +00:00
vtarasov
e7790508f6
pkcs15: when setting object data's path, use, if available, the AID from 'DiscretionaryDataObject'
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5111 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:31:41 +00:00
vtarasov
47f997983e
pkcs15: simplify PIN's path assignement
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5110 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:17:15 +00:00
vtarasov
04f9c46d15
pkcs15-tool: do not print empty path, print path also when it only has 'aid' member
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5109 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:06:29 +00:00
vtarasov
41c0090321
pkcs15: redesign sc_pkcs15_make_absolute_path() ...
...
- do nothing if child has 'aid';
- child inherit the parents's 'aid' if this one exists;
- child inherit parents's path of type 'DF NAME' as 'aid';
- return if child path is zero length;
- finaly concatenate parent and child paths.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5108 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:02:09 +00:00
vtarasov
b560561755
pkcs15init: when deleting object ignore the object data file selection error 'FILE_NOT_FOUND' ...
...
just update the xDF content.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5107 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 10:39:08 +00:00
vtarasov
5ab90b9219
libopensc: avoid using of the not completely initialized 'sc_path' variables
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5106 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 09:48:26 +00:00
andre
5405d74d19
opensc.conf.in: clean up white spaces
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5105 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 04:43:32 +00:00
andre
752af86f2b
pkcs15-pin.c: fixes segmentation fault in the case where p15card->app == NULL
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5104 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 21:09:48 +00:00
vtarasov
3efe35d246
libopensc: avoid the using of not completely initialized 'sc_path' variables
...
to be continued...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5103 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 19:00:52 +00:00
vtarasov
d1f7e7b8c8
pkcs15init: profile: little fix of the previous commit
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5102 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:52:04 +00:00
vtarasov
2adfa05ac8
pkcs15init: profile: use short form of the log message call
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5101 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:49:56 +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
51ab68db83
pkcs15init: profile: redesign 'sc_profile_find_file_by_path()' ...
...
to take into account the non-zero 'aid' member in the 'path' parameter
or in the path of the file's instance
also take into account the non-zero 'aid' when getting 'file-id'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5099 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:05:43 +00:00
vtarasov
c65bc9023b
pkcs15init: profile: new function 'get_parent' ...
...
to get profile instance of the parent of some file presented by it's profile name.
;accept hexadecimal values presented in 'xAB' form;
;coding style issues;
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5098 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 15:51:47 +00:00
vtarasov
1519cb38a1
pkcs15init: profile: handles for 'profile-extention' and 'exclusive-aid' ...
...
'profile-extention' profile parameter used to load from the separate file
the AID dependent profile part.
'exclusive-aid' profile parameter used to introduce the AID for the DF
that do not have file-id and that can be selected only by 'DF-NAME' selection.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5097 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 15:18:11 +00:00
vtarasov
35a54b511c
pkcs15init: profile: sc_profile_finish() accept additional parameter 'application info' ...
...
Each application of the multi-application PKCS#15 card has it's own associated pkcs15init profile file.
Profile of the multi-application card contains an association between the ID of the on-card application
and associated profile name.
When sc_profile_finish() is called
- sc_card is connected,
- information on the preset on-card applications is available;
- AID of the applicaition to be binded is known.
thus allowing to sc_profile_finish() to load the final part of the profile.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5096 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 14:51:10 +00:00
vtarasov
41731ce56f
pkcs15init: profile: parse new AC operation types ...
...
debug messages and some coding style issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5095 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 14:03:01 +00:00
vtarasov
2c6d3ee9fa
pkcs15: comments and debug messages
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5094 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 13:11:21 +00:00
vtarasov
3fdb9f9e71
pkcs15: when getting public key data, return 'direct' object value if available
...
add debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5093 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 12:54:15 +00:00
vtarasov
fd670f2dce
pkcs15: initialize 'supported algorithms' in SE data by the ones from tokenInfo
...
for some cards to prepare security environment for the PSO operation
card driver may need the value of 'algRef' attribut of tokenInfo.supportedAlgorithm.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5092 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-14 17:12:04 +00:00
flc
5e13c7d083
remove unset sc_pkcs15init_finalize_profile function from libopensc.exports
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5091 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-14 09:59:42 +00:00
vtarasov
71bfc87282
asn1: spelling of the debug messages
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5090 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-13 15:06:12 +00:00
vtarasov
2a8fc56402
pkcs15: add array with supported algos references to the key info data type ...
...
and imlement API to access it
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5089 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-13 14:05:19 +00:00