File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ static bool valid_application() {
104104
105105}
106106
107- static bool empty_keys () {
107+ int target_empty_keys () {
108108 unsigned int i;
109109 extern const unsigned char enc_priv_key[];
110110 extern const unsigned int enc_priv_key_len;
@@ -113,15 +113,15 @@ static bool empty_keys() {
113113
114114 for (i = 0 ; i < enc_priv_key_len; i++) {
115115 if (enc_priv_key[i] != 0xFF )
116- return false ;
116+ return 0 ;
117117 }
118118
119119 for (i = 0 ; i < ecdsa_pub_key_len; i++) {
120120 if (ecdsa_pub_key[i] != 0xFF )
121- return false ;
121+ return 0 ;
122122 }
123123
124- return true ;
124+ return 1 ;
125125}
126126
127127int target_debug_init (void ) {
@@ -243,7 +243,7 @@ int target_init(void) {
243243 return 1 ;
244244 }
245245
246- if (empty_keys ()) {
246+ if (target_empty_keys ()) {
247247 BOOT_LOG_INF (" Secure keys not configured" );
248248 if ( magic == 0x07AA ) {
249249 /* Try unsecure OTA */
Original file line number Diff line number Diff line change @@ -81,5 +81,6 @@ int target_debug_init(void);
8181int target_loop (void );
8282int target_debug (void );
8383int target_led_off (void );
84+ int target_empty_keys (void );
8485
8586#endif /* __TARGET_INIT_H */
You can’t perform that action at this time.
0 commit comments