Load the key to be used for either signing or verficiation.
This function can be called multiple times for the same component. Any previously loaded key is freed.
Only the following crypto key types can be used for signing and verification: CKT_RSA, CKT_DSA, CKT_EC, or CKT_SYM. (see p6cyrotokey.h). When using CRT_SYM the same key is used for both signing and verification. RSA, EC, and DSA are public key ciphers and require to sign with the private key and verify with the public key.
- Parameters
-
pKey | [ in ] The loaded key to use for signing and signature verification. |
- Returns
Success | P6R::eOk | |
Failure | eInvalidArg | pKey is NULL. |
eNotInitialized | A successful call to initialize was not made before this call. |
eWrongKeyType | Only the key types listed above can be used for signing. |