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
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)
EC key storing: make sure algorithm params are available

When trying to import EC keys onto the card with pkcs15-init, the
params.ec of sc_pkcs15init_prkeyargs or pubkeyargs had not been
initialized. This commit fixes that by reading the curve name from the
EVP_KEY and initializing the parameters.

Also, in sc_pkcs15_encode_pubkey_as_spki, this commit adds code that
tries to construct the EC algorithm params from the key itself. This
prevents a NULL parameter in the SPKI/ASN1 encoding.