const Alias& publicKeyAlias,
const Policy& policyPrivateKey = Policy(),
const Policy& policyPublicKey = Policy());
+ void createKeyAES(
+ const ObserverPtr& observer,
+ int size,
+ const Alias &keyAlias,
+ const Policy &policyKey = Policy());
void getCertificateChain(
const ObserverPtr& observer,
const Policy &policyPrivateKey = Policy(),
const Policy &policyPublicKey = Policy()) = 0;
+ virtual int createKeyAES(
+ const int size, // size in bits [128, 192, 256]
+ const Alias &keyAlias,
+ const Policy &policyKey = Policy()) = 0;
+
virtual int getCertificateChain(
const CertificateShPtr &certificate,
const CertificateShPtrVector &untrustedCertificates,
const ckmc_policy_s policy_public_key);
/**
+ * @brief Creates AES key and stores it inside key manager based on the policy.
+ *
+ * @since_tizen 3.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/keymanager
+ *
+ * @remarks If password in policy is provided, the key is additionally encrypted with the password
+ * in policy.
+ *
+ * @param[in] size The size of key strength to be created. \n
+ * @c 128, @c 192 and @c 256 are supported.
+ * @param[in] key_alias The name of key to be stored
+ * @param[in] key_policy The policy about how to store the key securely
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #CKMC_ERROR_NONE Successful
+ * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
+ * @retval #CKMC_ERROR_DB_LOCKED A user key is not loaded in memory (a user is not logged
+ * in)
+ * @retval #CKMC_ERROR_DB_ALIAS_EXISTS Alias already exists
+ * @retval #CKMC_ERROR_DB_ERROR Failed due to other DB transaction unexpectedly
+ * @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager
+ *
+ * @pre User is already logged in and the user key is already loaded into memory in plain text form.
+ *
+ * @see ckmc_create_key_pair_rsa()
+ * @see ckmc_create_key_pair_dsa()
+ * @see ckmc_create_key_pair_ecdsa()
+ */
+int ckmc_create_key_aes(const size_t size,
+ const char *key_alias,
+ const ckmc_policy_s key_policy);
+
+/**
* @brief Creates a signature on a given message using a private key and returns the signature.
*
* @since_tizen 2.3
policyPublicKey);
}
+void ManagerAsync::createKeyAES(const ObserverPtr& /*observer*/,
+ int /*size*/,
+ const Alias &/*keyAlias*/,
+ const Policy &/*policyKey*/)
+{
+}
+
void ManagerAsync::getCertificateChain(const ObserverPtr& observer,
const CertificateShPtr& certificate,
const CertificateShPtrVector& untrustedCertificates,
}
KEY_MANAGER_CAPI
+int ckmc_create_key_aes(const size_t /*size*/,
+ const char */*key_alias*/,
+ const ckmc_policy_s /*key_policy*/)
+{
+ return 0;
+}
+
+KEY_MANAGER_CAPI
int ckmc_create_signature(const char *private_key_alias,
const char *password,
const ckmc_raw_buffer_s message,
return this->createKeyPair(CKM::KeyType::KEY_ECDSA_PUBLIC, static_cast<int>(type), privateKeyAlias, publicKeyAlias, policyPrivateKey, policyPublicKey);
}
+int ManagerImpl::createKeyAES(
+ const int /*size*/,
+ const Alias &/*keyAlias*/,
+ const Policy &/*policyKey*/)
+{
+ return 0;
+}
+
+
int ManagerImpl::createKeyPair(
const KeyType key_type,
const int additional_param,
const Policy &policyPrivateKey = Policy(),
const Policy &policyPublicKey = Policy());
+ int createKeyAES(
+ const int size, // size in bits [128, 192, 256]
+ const Alias &keyAlias,
+ const Policy &policyKey = Policy());
+
int getCertificateChain(
const CertificateShPtr &certificate,
const CertificateShPtrVector &untrustedCertificates,