pkcs11-tool sets CKA_DECRYPT=true rather then CKA_DERIVE=true when generating EC keys (#277)

RSA and EC keys have different usage attributes. Appropriate attributes are set
When using --keypairgen the user can use the --usage-sign, --usage-decrypt,
and --usage-derive. to get finer control.

 Changes to be committed:
	modified:   tools/pkcs11-tool.c
Merge branch 'master' of github.com:OpenSC/OpenSC
Remove hardcodes from Mutual Authenticate

Support nonces that are not only 8 bytes in
Mutual Authenticate. Use the witness length
to determine the nonce size, thus existing
systems using 8 bytes will continue to use 8
bytes. However, with AES 256, the nonces could
be a single block size of 16 bytes or greater.
Fix secure messaging library name on Mac OS X

Mac OS X uses "libsmm-local.3.dylib" as library name. The default value
"libsmm-local.so.3" is correct for Linux but not for Mac OS X.

This bug prevented the "opensc-tool -a" to work correctly and return the
ATR if an IAS card is present in the reader.
Merge pull request #280 from shootingatshadow/aes-support

Remove hardcodes from Mutual Authenticate
Fix compiler warning

The same function iasecc_sm_external_authentication() was declared in
two different .h files.

In file included from ../../src/libopensc/iasecc.h:27:0,
                 from sm-card-iasecc.c:44:
../../src/libopensc/iasecc-sdo.h:324:5: warning: redundant redeclaration of `iasecc_sm_external_authentication' [-Wredundant-decls]
In file included from ../../src/libopensc/opensc.h:44:0,
                 from sm-card-iasecc.c:40:
../../src/libopensc/sm.h:352:5: note: previous declaration of `iasecc_sm_external_authentication' was here
Merge PR#280 from dirkx/master: --no-prompt flag

Add a --no-prompt flag to pkcs15-tool (i.e. the equivalent of the --no-prompt flag of pkcs15-init). As to aid readers with keypads (as commonly used in the medical space).
Merge PR#288 from philipWendland:upstream-ecc-fix

add the possibility to store public ECC keys encoded according to SPKI
EC pubkey storing: Check if params are available before copying.
pkcs15-lib.c / sc_pkcs15init_store_public_key may be called with keyargs->key.u.ec.params.value == NULL. In this case, allocating and copying the parameters will fail. Add a check to prevent this.
pkcs15-dnie: fix compilation when OpenSSL is not used

If OpenSSL is not used then the functions from card-dnie.c are not
defined and in particular dnie_match_card() is not defined.
In that case we use a fake dnie_match_card() that just returns false.
build: disable Secure Messaging if OpenSSL is not used

If OpenSSL is not present or --disable-openssl then Secure Messaging is
disabled.

The problem was that some Secure Messaging code is missing if OpenSSL is
absent. The build/link failed with some missing symbols.

Fix issue #293
Fix compiler warning

pkcs15-dnie.c:242:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 const char *sc_driver_version()
             ^
Fix compiler warning

p15card-helper.c:23:5: warning: 'ENABLE_OPENSSL' is not defined, evaluates to 0
      [-Wundef]
    ^
generate bash completion scripts from XML doc files

This generates the scripts that lets bash do completion per specific tool.
It gets the options from the documentation XML files that are also the
source for the man pages and HTML.
Merge branch 'master' of github.com:OpenSC/OpenSC
PKCS#11 hashes for cards without RAW (see #241)

    The framework-pkcs15.c did not add hashes correctly if the card did not support RSA RAW.
    This change fixes that and only adds hashes if the card did not specify a list of hashes.
    It also will not add hashes done in software if ENABLE_OPENSSL is not specified.
    Some error conditions are also tested for EC mechanisms.

    See bug report #241 for more information.
Merge pull request #279 from dengert/master

pkcs11-tool sets CKA_DECRYPT=true rather then CKA_DERIVE=true when gener...
Merge pull request #298 from dengert/pkcs11Hashes

PKCS#11 hashes for cards without RAW (see #241)
Merge pull request #238 from eighthave/master

generate bash completion scripts from XML doc files