Skip to content

Commit ccd45b5

Browse files
crypto: add cryptohelper implementation
Signed-off-by: Mykola Kobets <[email protected]>
1 parent 75676c9 commit ccd45b5

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
@@ -1257,4 +1257,25 @@
12571257
#define AOS_CONFIG_TIMERS_MAX_COUNT 32
12581258
#endif
12591259

1260+
/**
1261+
* Number of certificates sent by the cloud to validate signs of services, layers, etc.
1262+
*/
1263+
#ifndef AOS_CONFIG_CRYPTO_CLOUD_CERTS_COUNT
1264+
#define AOS_CONFIG_CRYPTO_CLOUD_CERTS_COUNT 4
1265+
#endif
1266+
1267+
/**
1268+
* Number of recipient info in envelope data.
1269+
*/
1270+
#ifndef AOS_CONFIG_CLOUD_RECIPIENTS_IN_ENVELOPEDATA
1271+
#define AOS_CONFIG_CLOUD_RECIPIENTS_IN_ENVELOPEDATA 4
1272+
#endif
1273+
1274+
/**
1275+
* Maximum size for cloud metadata.
1276+
*/
1277+
#ifndef AOS_CONFIG_CLOUD_METADATA_SIZE
1278+
#define AOS_CONFIG_CLOUD_METADATA_SIZE 1024
1279+
#endif
1280+
12601281
#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)