mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
iot-safe: Fixed debug printf, updated slot number for 16-bit demo
This commit is contained in:
@ -40,7 +40,7 @@
|
||||
#define CRT_SERVER_FILE_ID 0x3330
|
||||
#define PRIVKEY_ID 0x3230 /* pre-provisioned */
|
||||
#define ECDH_KEYPAIR_ID 0x3330
|
||||
#define PEER_PUBKEY_ID 0x3530
|
||||
#define PEER_PUBKEY_ID 0x3730
|
||||
#define PEER_CERT_ID 0x3430
|
||||
|
||||
/* In this version of the demo, the server certificate is
|
||||
@ -75,7 +75,9 @@
|
||||
|
||||
/* Debugging */
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#if 1
|
||||
|
||||
/* Change to "if 1" to enable debug */
|
||||
#if 0
|
||||
#define DEBUG_WOLFSSL
|
||||
#define WOLFSSL_DEBUG_TLS
|
||||
#define DEBUG_IOTSAFE
|
||||
|
@ -140,8 +140,6 @@ static int expect_tok(const char *cmd, int size, const char *tok, char **repl)
|
||||
#ifdef DEBUG_IOTSAFE
|
||||
if (ret > 0)
|
||||
printf("<<< %s\n", csim_read_buf);
|
||||
else
|
||||
printf("<<< csim_read returned %d\n", ret);
|
||||
#endif
|
||||
if (tok && (ret > 0) && !r_found) {
|
||||
/* Mark the beginning of the match in the reply. */
|
||||
@ -462,7 +460,9 @@ static int iotsafe_readfile(uint8_t *file_id, uint16_t file_id_sz,
|
||||
return -1;
|
||||
file_sz = (fs_msb << 8) + fs_lsb;
|
||||
WOLFSSL_MSG("Stat successful on file");
|
||||
printf("File size: %d (%04x)", file_sz, file_sz);
|
||||
#ifdef DEBUG_IOTSAFE
|
||||
printf("File size: %d (%04x)", file_sz, file_sz);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (file_sz > max_size) {
|
||||
@ -1056,7 +1056,9 @@ static int wolfIoT_ecc_verify(WOLFSSL *ssl,
|
||||
/* Store public key in IoT-safe slot */
|
||||
ret = iotsafe_put_public_key(pubkey_slot, id_size, key);
|
||||
if (ret < 0) {
|
||||
#ifdef DEBUG_IOTSAFE
|
||||
printf("IOTSAFE: put public key failed\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (ret == 0) {
|
||||
|
Reference in New Issue
Block a user