Skip to content

Commit

Permalink
Merge branch 'master' into sock-loop-wakeup
Browse files Browse the repository at this point in the history
  • Loading branch information
huitema committed Dec 8, 2023
2 parents c915a76 + af2f604 commit c090338
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 25 deletions.
6 changes: 3 additions & 3 deletions picohttp/democlient.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ typedef struct st_picoquic_demo_stream_ctx_t {
uint64_t post_sent;
char* f_name;
FILE* F; /* NULL if stream is closed or no_disk. */
int is_open : 1;
int is_file_open : 1;
int flow_opened : 1;
unsigned int is_open : 1;
unsigned int is_file_open : 1;
unsigned int flow_opened : 1;
} picoquic_demo_client_stream_ctx_t;

typedef struct st_picoquic_demo_client_callback_ctx_t {
Expand Down
2 changes: 0 additions & 2 deletions picoquic/frames.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,6 @@ uint8_t* picoquic_copy_single_stream_frame_for_retransmit(picoquic_cnx_t* cnx, p
uint8_t* picoquic_copy_stream_frames_for_retransmit(picoquic_cnx_t* cnx,
uint8_t* bytes_next, uint8_t* bytes_max, uint64_t current_priority, int* more_data, int* is_pure_ack)
{
uint8_t* bytes_first;
int more_retransmit = 0;
int packet_dequeued = 0;
picoquic_packet_t* packet = NULL;
Expand All @@ -2055,7 +2054,6 @@ uint8_t* picoquic_copy_stream_frames_for_retransmit(picoquic_cnx_t* cnx,
break;
}
else {
bytes_first = bytes_next;
more_retransmit = 0;
bytes_next = picoquic_copy_single_stream_frame_for_retransmit(cnx, packet,
bytes_next, bytes_max, current_priority, &more_retransmit, &packet_dequeued, is_pure_ack);
Expand Down
2 changes: 0 additions & 2 deletions picoquictest/mediatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,6 @@ int mediatest_loop(mediatest_ctx_t* mt_ctx, uint64_t simulated_time_max, int is_
int mediatest_one(int media_test_id, mediatest_spec_t * spec)
{
int ret = 0;
int nb_steps = 0;
int nb_inactive = 0;
int is_finished = 0;

/* set the configuration */
Expand Down
30 changes: 12 additions & 18 deletions picoquictest/minicrypto_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ int minicrypto_is_last_test()
int expected_aes128gcm_sha256 = 1;
int expected_aes128gcm_sha256_low = 1;
int expected_set_key = 1;
int actual_aes128gcm_sha256;
int actual_aes128gcm_sha256_low;
int using_aes128gcm_sha256;
int using_aes128gcm_sha256_low;
int actual_set_key;
void* actual_aes128gcmsha256 = picoquic_get_aes128gcm_sha256_v(0);
void* actual_aes128gcmsha256_low = picoquic_get_aes128gcm_sha256_v(1);
void* actual_aes128gcm_sha256 = picoquic_get_aes128gcm_sha256_v(0);
void* actual_aes128gcm_sha256_low = picoquic_get_aes128gcm_sha256_v(1);

picoquic_tls_api_reset(0);

Expand All @@ -129,25 +129,19 @@ int minicrypto_is_last_test()
#if !defined(PTLS_WITHOUT_OPENSSL)
expected_set_key = 0;
#endif
actual_aes128gcm_sha256 = (actual_aes128gcmsha256 == (void*)&ptls_minicrypto_aes128gcmsha256);
actual_aes128gcm_sha256_low = (actual_aes128gcmsha256 == (void*)&ptls_minicrypto_aes128gcmsha256);
using_aes128gcm_sha256 = (actual_aes128gcm_sha256 == (void*)&ptls_minicrypto_aes128gcmsha256);
using_aes128gcm_sha256_low = (actual_aes128gcm_sha256_low == (void*)&ptls_minicrypto_aes128gcmsha256);
actual_set_key = (picoquic_set_private_key_from_file_fn == picoquic_minicrypto_set_key_fn);
if (actual_aes128gcm_sha256 != expected_aes128gcm_sha256) {
if (using_aes128gcm_sha256 != expected_aes128gcm_sha256) {
DBG_PRINTF("Wrong aes gcm 128 sha 256. Expected: %s, actual: %s",
(expected_aes128gcm_sha256) ? "minicrypto" : "other",
(actual_aes128gcm_sha256) ? "minicrypto" : "other");
(using_aes128gcm_sha256) ? "minicrypto" : "other");
ret = -1;
}
if (actual_aes128gcm_sha256 != expected_aes128gcm_sha256) {
DBG_PRINTF("Wrong aes gcm 128 sha 256. Expected: %s, actual: %s",
(expected_aes128gcm_sha256) ? "minicrypto" : "other",
(actual_aes128gcm_sha256) ? "minicrypto" : "other");
ret = -1;
}
if (actual_aes128gcm_sha256 != expected_aes128gcm_sha256) {
DBG_PRINTF("Wrong aes gcm 128 sha 256. Expected: %s, actual: %s",
(expected_aes128gcm_sha256) ? "minicrypto" : "other",
(actual_aes128gcm_sha256) ? "minicrypto" : "other");
if (using_aes128gcm_sha256_low != expected_aes128gcm_sha256_low) {
DBG_PRINTF("Wrong aes gcm 128 sha 256 low. Expected: %s, actual: %s",
(expected_aes128gcm_sha256_low) ? "minicrypto" : "other",
(using_aes128gcm_sha256_low) ? "minicrypto" : "other");
ret = -1;
}
if (actual_set_key != expected_set_key) {
Expand Down

0 comments on commit c090338

Please sign in to comment.