[453] | 1 | // Copyright (c) Microsoft. All rights reserved.
|
---|
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
---|
| 3 |
|
---|
| 4 | #ifndef PROV_SECURITY_FACTORY_H
|
---|
| 5 | #define PROV_SECURITY_FACTORY_H
|
---|
| 6 |
|
---|
| 7 | #ifdef __cplusplus
|
---|
| 8 | #include <cstddef>
|
---|
| 9 | extern "C" {
|
---|
| 10 | #else
|
---|
| 11 | #include <stddef.h>
|
---|
| 12 | #endif /* __cplusplus */
|
---|
| 13 |
|
---|
| 14 | #include "umock_c/umock_c_prod.h"
|
---|
| 15 | #include "azure_macro_utils/macro_utils.h"
|
---|
| 16 |
|
---|
| 17 | #define SECURE_DEVICE_TYPE_VALUES \
|
---|
| 18 | SECURE_DEVICE_TYPE_UNKNOWN, \
|
---|
| 19 | SECURE_DEVICE_TYPE_TPM, \
|
---|
| 20 | SECURE_DEVICE_TYPE_X509, \
|
---|
| 21 | SECURE_DEVICE_TYPE_HTTP_EDGE, \
|
---|
| 22 | SECURE_DEVICE_TYPE_SYMMETRIC_KEY
|
---|
| 23 |
|
---|
| 24 | MU_DEFINE_ENUM_WITHOUT_INVALID(SECURE_DEVICE_TYPE, SECURE_DEVICE_TYPE_VALUES);
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | MOCKABLE_FUNCTION(, int, prov_dev_security_init, SECURE_DEVICE_TYPE, hsm_type);
|
---|
| 28 | MOCKABLE_FUNCTION(, void, prov_dev_security_deinit);
|
---|
| 29 | MOCKABLE_FUNCTION(, SECURE_DEVICE_TYPE, prov_dev_security_get_type);
|
---|
| 30 |
|
---|
| 31 | // Symmetric key information
|
---|
| 32 | MOCKABLE_FUNCTION(, int, prov_dev_set_symmetric_key_info, const char*, registration_name, const char*, symmetric_key);
|
---|
| 33 | MOCKABLE_FUNCTION(, const char*, prov_dev_get_symmetric_key);
|
---|
| 34 | MOCKABLE_FUNCTION(, const char*, prov_dev_get_symm_registration_name);
|
---|
| 35 |
|
---|
| 36 | #ifdef __cplusplus
|
---|
| 37 | }
|
---|
| 38 | #endif /* __cplusplus */
|
---|
| 39 |
|
---|
| 40 | #endif // PROV_SECURITY_FACTORY_H
|
---|