summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2017-07-04 11:00:05 +0200
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>2017-07-04 11:00:05 +0200
commitf69917404c3bb626c9f1a0ae4f13fd88bf6a2f6b (patch)
treef439e9cabe06c0794276e6ed13432ac96749e2ff /src/include
parent3ef92a6c151f78c75c9bd7036c6afe4b2bc92062 (diff)
downloadkey-manager-f69917404c3bb626c9f1a0ae4f13fd88bf6a2f6b.tar.gz
key-manager-f69917404c3bb626c9f1a0ae4f13fd88bf6a2f6b.tar.bz2
key-manager-f69917404c3bb626c9f1a0ae4f13fd88bf6a2f6b.zip
Detect invalid rsa padding parameter
Return proper error in case of wrong RSA padding parameter. Add more detailed description of valid parameter combinations. Change-Id: I100f0b900566dbb17bd66c62fabe278baf83c1ff
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ckmc/ckmc-manager.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/ckmc/ckmc-manager.h b/src/include/ckmc/ckmc-manager.h
index 1ed88bf6..7cc2d9ab 100644
--- a/src/include/ckmc/ckmc-manager.h
+++ b/src/include/ckmc/ckmc-manager.h
@@ -532,7 +532,9 @@ int ckmc_create_key_aes(size_t size, const char *key_alias, ckmc_policy_s key_po
* @param[in] message The message that is signed with a private key
* @param[in] hash The hash algorithm used in creating signature
* @param[in] padding The RSA padding algorithm used in creating signature \n
- * It is used only when the signature algorithm is RSA
+ * It is used only when the signature algorithm is RSA. If
+ * @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE
+ * and the message must be equal to key length
* @param[out] ppsignature The pointer to a newly created signature \n
* If an error occurs, @a *ppsignature will be null
* @return @c 0 on success,
@@ -566,7 +568,9 @@ int ckmc_create_signature(const char *private_key_alias, const char *password, c
* @param[in] signature The signature that is verified with public key
* @param[in] hash The hash algorithm used in verifying signature
* @param[in] padding The RSA padding algorithm used in verifying signature \n
- * It is used only when the signature algorithm is RSA
+ * It is used only when the signature algorithm is RSA. If
+ * @a padding is CKMC_NONE_PADDING you must use CKMC_HASH_NONE
+ * and the message must be equal to key length
* @return @c 0 on success and the signature is valid,
* otherwise a negative error value
* @retval #CKMC_ERROR_NONE Successful