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 IOTHUB_SECURITY_FACTORY_H
|
---|
5 | #define IOTHUB_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 | #include "azure_c_shared_utility/buffer_.h"
|
---|
17 |
|
---|
18 | #define IOTHUB_SECURITY_TYPE_VALUES \
|
---|
19 | IOTHUB_SECURITY_TYPE_UNKNOWN, \
|
---|
20 | IOTHUB_SECURITY_TYPE_SAS, \
|
---|
21 | IOTHUB_SECURITY_TYPE_X509, \
|
---|
22 | IOTHUB_SECURITY_TYPE_HTTP_EDGE, \
|
---|
23 | IOTHUB_SECURITY_TYPE_SYMMETRIC_KEY
|
---|
24 |
|
---|
25 |
|
---|
26 | MU_DEFINE_ENUM_WITHOUT_INVALID(IOTHUB_SECURITY_TYPE, IOTHUB_SECURITY_TYPE_VALUES);
|
---|
27 |
|
---|
28 | MOCKABLE_FUNCTION(, int, iothub_security_init, IOTHUB_SECURITY_TYPE, sec_type);
|
---|
29 | MOCKABLE_FUNCTION(, void, iothub_security_deinit);
|
---|
30 |
|
---|
31 | MOCKABLE_FUNCTION(, const void*, iothub_security_interface);
|
---|
32 | MOCKABLE_FUNCTION(, IOTHUB_SECURITY_TYPE, iothub_security_type);
|
---|
33 |
|
---|
34 | // Symmetric key information
|
---|
35 | MOCKABLE_FUNCTION(, int, iothub_security_set_symmetric_key_info, const char*, registration_name, const char*, symmetric_key);
|
---|
36 | MOCKABLE_FUNCTION(, const char*, iothub_security_get_symmetric_key);
|
---|
37 | MOCKABLE_FUNCTION(, const char*, iothub_security_get_symm_registration_name);
|
---|
38 |
|
---|
39 | #ifdef __cplusplus
|
---|
40 | }
|
---|
41 | #endif /* __cplusplus */
|
---|
42 |
|
---|
43 | #endif // IOTHUB_SECURITY_FACTORY_H
|
---|