summaryrefslogtreecommitdiffstats
path: root/test/dtls_mtu_test.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-06-20 17:11:28 +0200
committerHugo Landau <hlandau@openssl.org>2022-07-28 10:04:28 +0100
commit38b051a1fedc79ebf24a96de2e9a326ad3665baf (patch)
treee32fa2a0a5cf8572b48b3cb8a1aac2a20d0b439f /test/dtls_mtu_test.c
parentce602bb0a20589e5a84c48a55ce13219ab881e84 (diff)
SSL object refactoring using SSL_CONNECTION object
Make the SSL object polymorphic based on whether this is a traditional SSL connection, QUIC connection, or later to be implemented a QUIC stream. It requires adding if after every SSL_CONNECTION_FROM_SSL() call which itself has to be added to almost every public SSL_ API call. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18612)
Diffstat (limited to 'test/dtls_mtu_test.c')
-rw-r--r--test/dtls_mtu_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/dtls_mtu_test.c b/test/dtls_mtu_test.c
index 2395b9d922..b11d5e3461 100644
--- a/test/dtls_mtu_test.c
+++ b/test/dtls_mtu_test.c
@@ -55,6 +55,7 @@ static int mtu_test(SSL_CTX *ctx, const char *cs, int no_etm)
size_t mtus[30];
unsigned char buf[600];
int rv = 0;
+ SSL_CONNECTION *clnt_sc;
memset(buf, 0x5a, sizeof(buf));
@@ -132,8 +133,10 @@ static int mtu_test(SSL_CTX *ctx, const char *cs, int no_etm)
}
}
}
+ if (!TEST_ptr(clnt_sc = SSL_CONNECTION_FROM_SSL_ONLY(clnt_ssl)))
+ goto end;
rv = 1;
- if (SSL_READ_ETM(clnt_ssl))
+ if (SSL_READ_ETM(clnt_sc))
rv = 2;
end:
SSL_free(clnt_ssl);