Post-rebase fixes

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23334)
This commit is contained in:
Hugo Landau 2024-03-09 12:16:51 +00:00
parent e5b92db8e3
commit 5300a20c4e
No known key found for this signature in database
GPG Key ID: 3D30A3A9FF1360DC
4 changed files with 18 additions and 17 deletions

View File

@ -1445,7 +1445,7 @@ SSL_R_LENGTH_TOO_LONG:404:length too long
SSL_R_LENGTH_TOO_SHORT:160:length too short
SSL_R_LIBRARY_BUG:274:library bug
SSL_R_LIBRARY_HAS_NO_CIPHERS:161:library has no ciphers
SSL_R_LISTENER_USE_ONLY:413:listener use only
SSL_R_LISTENER_USE_ONLY:419:listener use only
SSL_R_MAXIMUM_ENCRYPTED_PKTS_REACHED:395:maximum encrypted pkts reached
SSL_R_MISSING_DSA_SIGNING_CERT:165:missing dsa signing cert
SSL_R_MISSING_ECDSA_SIGNING_CERT:381:missing ecdsa signing cert

View File

@ -165,7 +165,7 @@
# define SSL_R_LENGTH_TOO_SHORT 160
# define SSL_R_LIBRARY_BUG 274
# define SSL_R_LIBRARY_HAS_NO_CIPHERS 161
# define SSL_R_LISTENER_USE_ONLY 413
# define SSL_R_LISTENER_USE_ONLY 419
# define SSL_R_MAXIMUM_ENCRYPTED_PKTS_REACHED 395
# define SSL_R_MISSING_DSA_SIGNING_CERT 165
# define SSL_R_MISSING_ECDSA_SIGNING_CERT 381

View File

@ -31,7 +31,7 @@ static int qc_try_create_default_xso_for_write(QCTX *ctx);
static int qc_wait_for_default_xso_for_read(QCTX *ctx, int peek);
static void qctx_lock(QCTX *qctx);
static void qctx_unlock(QCTX *qctx);
static void quic_lock_for_io(QCTX *ctx);
static void qctx_lock_for_io(QCTX *ctx);
static int quic_do_handshake(QCTX *ctx);
static void qc_update_reject_policy(QUIC_CONNECTION *qc);
static void qc_touch_default_xso(QUIC_CONNECTION *qc);
@ -276,7 +276,7 @@ static int ossl_unused expect_quic_with_stream_lock(const SSL *s, int remote_ini
return 0;
if (in_io)
quic_lock_for_io(ctx);
qctx_lock_for_io(ctx);
else
qctx_lock(ctx);
@ -353,7 +353,7 @@ static void qctx_unlock(QCTX *ctx)
#endif
}
static void quic_lock_for_io(QCTX *ctx)
static void qctx_lock_for_io(QCTX *ctx)
{
qctx_lock(ctx);
ctx->in_io = 1;
@ -1855,7 +1855,7 @@ int ossl_quic_do_handshake(SSL *s)
if (!expect_quic(s, &ctx))
return 0;
quic_lock_for_io(&ctx);
qctx_lock_for_io(&ctx);
ret = quic_do_handshake(&ctx);
qctx_unlock(&ctx);
@ -2854,7 +2854,7 @@ static int quic_read(SSL *s, void *buf, size_t len, size_t *bytes_read, int peek
if (!expect_quic(s, &ctx))
return 0;
quic_lock_for_io(&ctx);
qctx_lock_for_io(&ctx);
if (!quic_mutation_allowed(ctx.qc, /*req_active=*/0)) {
ret = QUIC_RAISE_NON_NORMAL_ERROR(&ctx, SSL_R_PROTOCOL_IS_SHUTDOWN, NULL);
@ -3357,7 +3357,7 @@ static int qc_getset_idle_timeout(QCTX *ctx, uint32_t class_,
int ret = 0;
uint64_t value_out = 0, value_in;
quic_lock(ctx->qc);
qctx_lock(ctx);
switch (class_) {
case SSL_VALUE_CLASS_FEATURE_REQUEST:
@ -3408,7 +3408,7 @@ static int qc_getset_idle_timeout(QCTX *ctx, uint32_t class_,
ret = 1;
err:
quic_unlock(ctx->qc);
qctx_unlock(ctx);
if (ret && p_value_out != NULL)
*p_value_out = value_out;
@ -3428,14 +3428,14 @@ static int qc_get_stream_avail(QCTX *ctx, uint32_t class_,
return 0;
}
quic_lock(ctx->qc);
qctx_lock(ctx);
*value = is_remote
? ossl_quic_channel_get_remote_stream_count_avail(ctx->qc->ch, is_uni)
: ossl_quic_channel_get_local_stream_count_avail(ctx->qc->ch, is_uni);
ret = 1;
quic_unlock(ctx->qc);
qctx_unlock(ctx);
return ret;
}
@ -3471,7 +3471,7 @@ static int qc_getset_event_handling(QCTX *ctx, uint32_t class_,
int ret = 0;
uint64_t value_out = 0;
quic_lock(ctx->qc);
qctx_lock(ctx);
if (class_ != SSL_VALUE_CLASS_GENERIC) {
QUIC_RAISE_NON_NORMAL_ERROR(ctx, SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS,
@ -3504,7 +3504,7 @@ static int qc_getset_event_handling(QCTX *ctx, uint32_t class_,
ret = 1;
err:
quic_unlock(ctx->qc);
qctx_unlock(ctx);
if (ret && p_value_out != NULL)
*p_value_out = value_out;
@ -3519,7 +3519,7 @@ static int qc_get_stream_write_buf_stat(QCTX *ctx, uint32_t class_,
int ret = 0;
size_t value = 0;
quic_lock(ctx->qc);
qctx_lock(ctx);
if (class_ != SSL_VALUE_CLASS_GENERIC) {
QUIC_RAISE_NON_NORMAL_ERROR(ctx, SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS,
@ -3542,7 +3542,7 @@ static int qc_get_stream_write_buf_stat(QCTX *ctx, uint32_t class_,
ret = 1;
err:
quic_unlock(ctx->qc);
qctx_unlock(ctx);
*p_value_out = (uint64_t)value;
return ret;
}
@ -4427,7 +4427,7 @@ int ossl_quic_conn_poll_events(SSL *ssl, uint64_t events, int do_tick,
if (!expect_quic(ssl, &ctx))
return 0;
quic_lock(ctx.qc);
qctx_lock(&ctx);
if (do_tick)
ossl_quic_reactor_tick(ossl_quic_channel_get_reactor(ctx.qc->ch), 0);
@ -4478,7 +4478,7 @@ int ossl_quic_conn_poll_events(SSL *ssl, uint64_t events, int do_tick,
revents |= SSL_POLL_EVENT_OSU;
}
quic_unlock(ctx.qc);
qctx_unlock(&ctx);
*p_revents = revents;
return 1;
}

View File

@ -8,6 +8,7 @@
*/
#include "internal/common.h"
#include "internal/quic_ssl.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "../ssl_local.h"