crypto_driver.h: get type definitions from crypto_enum.h

Now that the type definitions that are useful for driver are in a
separate header file from the application interface function
declarations, include that header file in crypto_driver.h.
This commit is contained in:
Gilles Peskine 2018-12-12 13:51:19 +01:00
parent a7c26db335
commit 2d59b2cd6b

View file

@ -35,19 +35,23 @@
extern "C" { extern "C" {
#endif #endif
/** The following types are redefinitions from the psa/crypto.h file. /* Include type definitions (psa_status_t, psa_algorithm_t,
* It is intended that these will be moved to a new common header file to * psa_key_type_t, etc.) and macros to build and analyze values
* avoid duplication. They are included here for expediency in publication. * of these types. */
*/ #include "crypto_types.h"
typedef uint32_t psa_status_t; #include "crypto_values.h"
typedef uint32_t psa_algorithm_t;
typedef uint8_t psa_encrypt_or_decrypt_t;
typedef uint32_t psa_key_slot_t;
typedef uint32_t psa_key_type_t;
typedef uint32_t psa_key_usage_t;
#define PSA_CRYPTO_DRIVER_ENCRYPT 1 /** An internal designation of a key slot between the core part of the
#define PSA_CRYPTO_DRIVER_DECRYPT 0 * PSA Crypto implementation and the driver. The meaning of this value
* is driver-dependent. */
typedef uint32_t psa_key_slot_t;
/** For encrypt-decrypt functions, whether the operation is an encryption
* or a decryption. */
typedef enum {
PSA_CRYPTO_DRIVER_DECRYPT,
PSA_CRYPTO_DRIVER_ENCRYPT
} psa_encrypt_or_decrypt_t;
/** \defgroup opaque_mac Opaque Message Authentication Code /** \defgroup opaque_mac Opaque Message Authentication Code
* Generation and authentication of Message Authentication Codes (MACs) using * Generation and authentication of Message Authentication Codes (MACs) using