Skip to content

Commit

Permalink
Merge pull request #21046 from netd-tud/psa-key-headers
Browse files Browse the repository at this point in the history
sys/psa_crypto: Update key headers
  • Loading branch information
mguetschow authored Dec 10, 2024
2 parents e481058 + 7cabd3e commit c80058e
Show file tree
Hide file tree
Showing 9 changed files with 1,687 additions and 1,474 deletions.
44 changes: 0 additions & 44 deletions sys/include/psa_crypto/psa/crypto_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,6 @@ extern "C" {
#include "crypto_sizes.h"
#include "crypto_contexts.h"

#if IS_USED(MODULE_PSA_KEY_MANAGEMENT) || defined(DOXYGEN)
/**
* @brief Structure storing the key usage policies
*/
struct psa_key_policy_s {
psa_key_usage_t usage; /**< Key usage policy */
psa_algorithm_t alg; /**< Algorithm for key usage */
};

/**
* @brief Type for key usage policies.
*/
typedef struct psa_key_policy_s psa_key_policy_t;

/**
* @brief Structure storing key attributes
*/
struct psa_key_attributes_s {
psa_key_type_t type; /**< Type of key */
psa_key_bits_t bits; /**< Size of key in bits */
psa_key_lifetime_t lifetime; /**< Lifetime of key */
psa_key_id_t id; /**< Key identifier */
psa_key_policy_t policy; /**< Key usage policy */
};

/**
* @brief This macro returns a suitable initializer for a key attribute object of
* type @ref psa_key_attributes_t.
*/
#define PSA_KEY_ATTRIBUTES_INIT { 0 }

/**
* @brief Return an initial value for a key attribute object.
*
* @return struct psa_key_attributes_s
*/
static inline struct psa_key_attributes_s psa_key_attributes_init(void)
{
const struct psa_key_attributes_s v = PSA_KEY_ATTRIBUTES_INIT;

return v;
}
#endif /*(MODULE_PSA_KEY_MANAGEMENT */

#if IS_USED(MODULE_PSA_AEAD) || defined(DOXYGEN)
/**
* @brief Structure storing an AEAD operation context
Expand Down
276 changes: 1 addition & 275 deletions sys/include/psa_crypto/psa/crypto_types.h

Large diffs are not rendered by default.

Loading

0 comments on commit c80058e

Please sign in to comment.