Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix current CI failures on push #21823

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/compiler-zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

name: Compiler Zoo CI

on: [push]
on: [pull_request]

permissions:
contents: read
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cross-compiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,26 +183,26 @@ jobs:
run: make -s -j4

- name: install qemu
if: github.event_name == 'push' && matrix.platform.tests != 'none'
if: matrix.platform.tests != 'none'
run: sudo apt-get -yq --force-yes install qemu-user

- name: Set QEMU environment
if: github.event_name == 'push' && matrix.platform.qemucpu != ''
if: matrix.platform.qemucpu != ''
run: echo "QEMU_CPU=${{ matrix.platform.qemucpu }}" >> $GITHUB_ENV

- name: Set OpenSSL caps environment
if: github.event_name == 'push' && matrix.platform.opensslcapsname != ''
if: matrix.platform.opensslcapsname != ''
run: echo "OPENSSL_${{ matrix.platform.opensslcapsname }}=\
${{ matrix.platform.opensslcaps }}" >> $GITHUB_ENV

- name: make all tests
if: github.event_name == 'push' && matrix.platform.tests == ''
if: matrix.platform.tests == ''
run: |
make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
TESTS="-test_afalg" \
QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }}
- name: make some tests
if: github.event_name == 'push' && matrix.platform.tests != 'none' && matrix.platform.tests != ''
if: matrix.platform.tests != 'none' && matrix.platform.tests != ''
run: |
make test HARNESS_JOBS=${HARNESS_JOBS:-4} \
TESTS="${{ matrix.platform.tests }} -test_afalg" \
Expand Down
2 changes: 1 addition & 1 deletion doc/designs/quic-design/record-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ struct ossl_record_method_st {
* multiple records in one go and buffer them.
*/
int (*read_record)(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
int *type, unsigned char **data, size_t *datalen,
uint8_t *type, unsigned char **data, size_t *datalen,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to change this type I think it has ripple effects in libssl, e.g. I would also suggest changing the type of type and recvd_type in ssl3_read_bytes and dtls1_read_bytes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK these are assigned and not passed as pointer to them so type conversion should happen fine. But I can change it anyway if you prefer that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattcaswell it was quite spread throughout the code but AFAIK done now, please look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was quite spread throughout the code but AFAIK done now, please look.

Yeah - this is what I meant by a ripple effect.

But I can change it anyway if you prefer that.

I really dislike this type dissonance where we use different types for the same thing in different places. Looks much better now.

uint16_t *epoch, unsigned char *seq_num);
/*
* Release a buffer associated with a record previously read with
Expand Down
2 changes: 1 addition & 1 deletion include/internal/recordmethod.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ struct ossl_record_method_st {
* multiple records in one go and buffer them.
*/
int (*read_record)(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
int *type, const unsigned char **data, size_t *datalen,
uint8_t *type, const unsigned char **data, size_t *datalen,
uint16_t *epoch, unsigned char *seq_num);
/*
* Release length bytes from a buffer associated with a record previously
Expand Down
2 changes: 1 addition & 1 deletion ssl/quic/quic_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static int ch_stateless_reset_token_handler(const unsigned char *data,

static int ch_init(QUIC_CHANNEL *ch)
{
OSSL_QUIC_TX_PACKETISER_ARGS txp_args = {0};
OSSL_QUIC_TX_PACKETISER_ARGS txp_args = {{0}};
OSSL_QTX_ARGS qtx_args = {0};
OSSL_QRX_ARGS qrx_args = {0};
QUIC_TLS_ARGS tls_args = {0};
Expand Down
6 changes: 3 additions & 3 deletions ssl/quic/quic_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static int quic_retry_write_records(OSSL_RECORD_LAYER *rl)
}

static int quic_read_record(OSSL_RECORD_LAYER *rl, void **rechandle,
int *rversion, int *type, const unsigned char **data,
int *rversion, uint8_t *type, const unsigned char **data,
size_t *datalen, uint16_t *epoch,
unsigned char *seq_num)
{
Expand Down Expand Up @@ -671,8 +671,8 @@ static int raise_error(QUIC_TLS *qtls, uint64_t error_code,
ERR_new();
ERR_set_debug(src_file, src_line, src_func);
ERR_set_error(ERR_LIB_SSL, SSL_R_QUIC_HANDSHAKE_LAYER_ERROR,
"handshake layer error, error code %zu (\"%s\")",
error_code, error_msg);
"handshake layer error, error code %llu (\"%s\")",
(unsigned long long)error_code, error_msg);
OSSL_ERR_STATE_save_to_mark(qtls->error_state);

/*
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/methods/recmethod_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ int tls_retry_write_records(OSSL_RECORD_LAYER *rl);
int tls_get_alert_code(OSSL_RECORD_LAYER *rl);
int tls_set1_bio(OSSL_RECORD_LAYER *rl, BIO *bio);
int tls_read_record(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
int *type, const unsigned char **data, size_t *datalen,
uint8_t *type, const unsigned char **data, size_t *datalen,
uint16_t *epoch, unsigned char *seq_num);
int tls_release_record(OSSL_RECORD_LAYER *rl, void *rechandle, size_t length);
int tls_default_set_protocol_version(OSSL_RECORD_LAYER *rl, int version);
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/methods/tls_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ int tls13_common_post_process_record(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec)
}

int tls_read_record(OSSL_RECORD_LAYER *rl, void **rechandle, int *rversion,
int *type, const unsigned char **data, size_t *datalen,
uint8_t *type, const unsigned char **data, size_t *datalen,
uint16_t *epoch, unsigned char *seq_num)
{
TLS_RL_RECORD *rec;
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/record.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
typedef struct tls_record_st {
void *rechandle;
int version;
int type;
uint8_t type;
/* The data buffer containing bytes from the record */
const unsigned char *data;
/*
Expand Down