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 no-tls1_2 and no-dtls1_2 #2788

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 2 additions & 0 deletions test/recipes/80-test_ssl_new.t
Expand Up @@ -59,6 +59,8 @@ my %conf_dependent_tests = (
"07-dtls-protocol-version.conf" => !$is_default_dtls,
"10-resumption.conf" => !$is_default_tls,
"11-dtls_resumption.conf" => !$is_default_dtls,
"17-renegotiate.conf" => disabled("tls1_2"),
"18-dtls-renegotiate.conf" => disabled("dtls1_2"),
"19-mac-then-encrypt.conf" => !$is_default_tls,
"20-cert-select.conf" => !$is_default_tls || $no_dh || $no_dsa,
);
Expand Down
9 changes: 7 additions & 2 deletions test/ssl-tests/17-renegotiate.conf.in
Expand Up @@ -13,6 +13,7 @@ use strict;
use warnings;

package ssltests;
use OpenSSL::Test::Utils;

our @tests = (
{
Expand Down Expand Up @@ -106,7 +107,9 @@ our @tests = (
"ResumptionExpected" => "No",
"ExpectedResult" => "Success"
}
},
}
);
our @tests_tls1_2 = (
{
name => "renegotiate-aead-to-non-aead",
server => {
Expand Down Expand Up @@ -182,5 +185,7 @@ our @tests = (
"ResumptionExpected" => "No",
"ExpectedResult" => "Success"
}
},
}
);

push @tests, @tests_tls1_2 unless disabled("tls1_2");
8 changes: 7 additions & 1 deletion test/ssl-tests/18-dtls-renegotiate.conf.in
Expand Up @@ -13,6 +13,7 @@ use strict;
use warnings;

package ssltests;
use OpenSSL::Test::Utils;

our @tests = (
{
Expand Down Expand Up @@ -92,7 +93,9 @@ our @tests = (
"ResumptionExpected" => "No",
"ExpectedResult" => "Success"
}
},
}
);
our @tests_dtls1_2 = (
{
name => "renegotiate-aead-to-non-aead",
server => {
Expand Down Expand Up @@ -166,3 +169,6 @@ our @tests = (
}
},
);


push @tests, @tests_dtls1_2 unless disabled("dtls1_2");
4 changes: 4 additions & 0 deletions test/sslapitest.c
Expand Up @@ -477,6 +477,7 @@ static int test_keylog_no_master_key(void) {
}
#endif

#ifndef OPENSSL_NO_TLS1_2
static int full_early_callback(SSL *s, int *al, void *arg)
{
int *ctr = arg;
Expand Down Expand Up @@ -559,6 +560,7 @@ static int test_early_cb(void) {

return testresult;
}
#endif

static int execute_test_large_message(const SSL_METHOD *smeth,
const SSL_METHOD *cmeth, int read_ahead)
Expand Down Expand Up @@ -1568,7 +1570,9 @@ int test_main(int argc, char *argv[])
#ifndef OPENSSL_NO_TLS1_3
ADD_TEST(test_keylog_no_master_key);
#endif
#ifndef OPENSSL_NO_TLS1_2
ADD_TEST(test_early_cb);
#endif
Copy link
Member

Choose a reason for hiding this comment

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

So... this works with SSL v3, TLS v1.0, v1.1 and v1.3, but not v1.2?

Copy link
Member Author

Choose a reason for hiding this comment

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

No - this test only works if we have v1.2, i.e. if 1.2 is disabled we shouldn't run it. It uses some 1.2 only ciphersuites.

Copy link
Member

Choose a reason for hiding this comment

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

I read the directive wrong, sorry. Thanks for explaining.


testresult = run_tests(argv[0]);

Expand Down