Skip to content

Commit ebbda14

Browse files
crypto: add cryptohelper implementation
Signed-off-by: Mykola Kobets <[email protected]>
1 parent 47eaa70 commit ebbda14

File tree

4 files changed

+1229
-1
lines changed

4 files changed

+1229
-1
lines changed

src/core/common/config.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,4 +1264,25 @@
12641264
#define AOS_CONFIG_TIMERS_MAX_COUNT 32
12651265
#endif
12661266

1267+
/**
1268+
* Number of certificates sent by the cloud to validate signs of services, layers, etc.
1269+
*/
1270+
#ifndef AOS_CONFIG_CRYPTO_CLOUD_CERTS_COUNT
1271+
#define AOS_CONFIG_CRYPTO_CLOUD_CERTS_COUNT 4
1272+
#endif
1273+
1274+
/**
1275+
* Number of recipient info in envelope data.
1276+
*/
1277+
#ifndef AOS_CONFIG_CLOUD_RECIPIENTS_IN_ENVELOPEDATA
1278+
#define AOS_CONFIG_CLOUD_RECIPIENTS_IN_ENVELOPEDATA 4
1279+
#endif
1280+
1281+
/**
1282+
* Maximum size for cloud metadata.
1283+
*/
1284+
#ifndef AOS_CONFIG_CLOUD_METADATA_SIZE
1285+
#define AOS_CONFIG_CLOUD_METADATA_SIZE 1024
1286+
#endif
1287+
12671288
#endif

src/core/common/crypto/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ endif()
7171
# Sources
7272
# ######################################################################################################################
7373

74-
set(SOURCES crypto.cpp cryptoutils.cpp)
74+
set(SOURCES crypto.cpp cryptohelper.cpp cryptoutils.cpp)
7575

7676
if(WITH_MBEDTLS)
7777
list(APPEND SOURCES mbedtls/cryptoprovider.cpp mbedtls/driverwrapper.cpp)

0 commit comments

Comments
 (0)