Throw exceptions on wrong key type in Signature

Our engine can handle both RSA and DSA, but we need to throw an error if
the wrong key type is supplied after we've initialized to emulate other
providers.

Also, apparently OpenSSL is really flexible, because calling
EVP_SignInit had the same effect as EVP_VerifyInit. Change this to be
correct even though the underlying implementation in OpenSSL doesn't
care.

Change-Id: If9223d17909fcf86437b9669c204fc544e6d12ff
5 files changed