Skip to content

Commit 9b277e8

Browse files
committed
security: return false when SECURED is not defined for SecurityDataJson
1 parent 9c2cb62 commit 9b277e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Bootloader/Src/security.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Security_setServerSecurityDataJson(char* buffer, uint16_t buffer_size) {
108108
bool
109109
Security_getClientSecurityDataJson(char* buffer, uint16_t buffer_size) {
110110

111+
#ifdef SECURED
111112
bool success = true;
112113

113114
char public_key_base64[KEY_SIZE_BASE64_STR];
@@ -147,6 +148,10 @@ Security_getClientSecurityDataJson(char* buffer, uint16_t buffer_size) {
147148
}
148149

149150
return success;
151+
#else
152+
if (buffer && buffer_size) {}
153+
return false;
154+
#endif
150155
}
151156

152157
bool

0 commit comments

Comments
 (0)