Skip to content

Commit

Permalink
Fix missing CR in calls to printf
Browse files Browse the repository at this point in the history
  • Loading branch information
ashman-p committed Jan 17, 2024
1 parent 8ac8f3f commit 8f3ae22
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/sig_stfl/lms/external/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ void hss_hash_ctx(void *result, int hash_type, union hash_context *ctx,
const void *message, size_t message_len) {
#if ALLOW_VERBOSE
if (hss_verbose) {
int i; for (i=0; i< message_len; i++) printf( " %02x%s", ((unsigned char*)message)[i], (i%16 == 15) ? "
" : "" );
int i; for (i=0; i< message_len; i++) printf( " %02x%s", ((unsigned char*)message)[i], (i%16 == 15) ? "\n" : "" );
}
#endif

Expand All @@ -46,8 +45,7 @@ void hss_hash_ctx(void *result, int hash_type, union hash_context *ctx,
#if ALLOW_VERBOSE
if (hss_verbose) {
printf( " ->" );
int i; for (i=0; i<32; i++) printf( " %02x", ((unsigned char *)result)[i] ); printf( "
" );
int i; for (i=0; i<32; i++) printf( " %02x", ((unsigned char *)result)[i] ); printf( "\n" );
}
#endif
break;
Expand Down Expand Up @@ -98,8 +96,7 @@ void hss_finalize_hash_context(int h, union hash_context *ctx, void *buffer) {
if (hss_verbose) {
printf( " -->" );
int i; for (i=0; i<32; i++) printf( " %02x", ((unsigned char*)buffer)[i] );
printf( "
" );
printf( "\n" );
}
#endif
break;
Expand Down
3 changes: 1 addition & 2 deletions src/sig_stfl/lms/external/hss_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ signed long initial_mem_target = mem_target; /* DEBUG HACK */
return 0;
}
#if 0
printf( "Allocation = %ld
", initial_mem_target - mem_target + best_mem ); /* DEBUG HACK */
printf( "Allocation = %ld\n", initial_mem_target - mem_target + best_mem ); /* DEBUG HACK */
#endif

subtree_size[i] = best_j;
Expand Down
3 changes: 1 addition & 2 deletions src/sig_stfl/lms/external/hss_sign_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
* hss_sign_update( &ctx, message_part_2, len_2 );
* hss_sign_update( &ctx, message_part_3, len_3 );
* success = hss_sign_finalize( &ctx, working_key, signature );
* if (success) printf( "We generated the signature
" );
* if (success) printf( "We generated the signature\n" );
*
* This is in its own include file because we need to import some
* 'not-generally-for-general-consumption' include files to make
Expand Down
3 changes: 1 addition & 2 deletions src/sig_stfl/lms/external/hss_verify_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
* hss_validate_update( &ctx, message_part_2, len_2 );
* hss_validate_update( &ctx, message_part_3, len_3 );
* success = hss_validate_finalize( &ctx, signature );
* if (success) printf( "The signature validated
" );
* if (success) printf( "The signature validated\n" );
*
* This is in its own include file because we need to import some
* 'not-generally-for-general-consumption' include files to make
Expand Down

0 comments on commit 8f3ae22

Please sign in to comment.