]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/70-test_sslcertstatus.t
2 # Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
10 use OpenSSL
::Test qw
/:DEFAULT cmdstr srctop_file bldtop_dir/;
11 use OpenSSL
::Test
::Utils
;
14 my $test_name = "test_sslcertstatus";
17 plan skip_all
=> "TLSProxy isn't usable on $^O"
20 plan skip_all
=> "$test_name needs the dynamic engine feature enabled"
21 if disabled
("engine") || disabled
("dynamic-engine");
23 plan skip_all
=> "$test_name needs the sock feature enabled"
26 plan skip_all
=> "$test_name needs the ocsp feature enabled"
29 plan skip_all
=> "$test_name needs TLS enabled"
30 if alldisabled
(available_protocols
("tls"))
31 || (!disabled
("tls1_3") && disabled
("tls1_2"));
33 $ENV{OPENSSL_ia32cap
} = '~0x200000200000000';
34 my $proxy = TLSProxy
::Proxy
->new(
36 cmdstr
(app
(["openssl"]), display
=> 1),
37 srctop_file
("apps", "server.pem"),
38 (!$ENV{HARNESS_ACTIVE
} || $ENV{HARNESS_VERBOSE
})
41 #Test 1: Sending a status_request extension in both ClientHello and
42 #ServerHello but then omitting the CertificateStatus message is valid
43 #TODO(TLS1.3): Temporarily disabling this test in TLS1.3 until we've completed
44 #the move the status request extension to the Certificate message.
45 $proxy->clientflags("-status -no_tls1_3");
46 $proxy->start() or plan skip_all
=> "Unable to start up Proxy for tests";
48 ok
(TLSProxy
::Message
->success, "Missing CertificateStatus message");
54 # We're only interested in the initial ServerHello
55 if ($proxy->flight != 1) {
59 foreach my $message (@
{$proxy->message_list}) {
60 if ($message->mt == TLSProxy
::Message
::MT_SERVER_HELLO
) {
61 #Add the status_request to the ServerHello even though we are not
62 #going to send a CertificateStatus message
63 $message->set_extension(TLSProxy
::Message
::EXT_STATUS_REQUEST
,