lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # -*- mode: perl; -*- |
| 2 | # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. |
| 3 | # |
| 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 |
| 8 | |
| 9 | |
| 10 | ## Test session ticket app data |
| 11 | |
| 12 | use strict; |
| 13 | use warnings; |
| 14 | |
| 15 | package ssltests; |
| 16 | use OpenSSL::Test::Utils; |
| 17 | |
| 18 | our @tests12 = ( |
| 19 | { |
| 20 | "name" => "session-ticket-app-data12", |
| 21 | "client" => { |
| 22 | "MaxProtocol" => "TLSv1.2", |
| 23 | "Options" => "SessionTicket", |
| 24 | }, |
| 25 | "server" => { |
| 26 | "Options" => "SessionTicket", |
| 27 | "extra" => { |
| 28 | "SessionTicketAppData" => "HelloWorld", |
| 29 | }, |
| 30 | }, |
| 31 | "test" => { |
| 32 | "HandshakeMode" => "Resume", |
| 33 | "ExpectedResult" => "Success", |
| 34 | "SessionTicketExpected" => "Yes", |
| 35 | "ResumptionExpected" => "Yes", |
| 36 | "ExpectedSessionTicketAppData" => "HelloWorld", |
| 37 | } |
| 38 | }, |
| 39 | { |
| 40 | "name" => "session-ticket-app-data12", |
| 41 | "client" => { |
| 42 | "MaxProtocol" => "TLSv1.2", |
| 43 | "Options" => "SessionTicket", |
| 44 | }, |
| 45 | "server" => { |
| 46 | "Options" => "SessionTicket", |
| 47 | }, |
| 48 | "test" => { |
| 49 | "HandshakeMode" => "Resume", |
| 50 | "ExpectedResult" => "Success", |
| 51 | "SessionTicketExpected" => "Yes", |
| 52 | "ResumptionExpected" => "Yes", |
| 53 | "ExpectedSessionTicketAppData" => "", |
| 54 | } |
| 55 | } |
| 56 | ); |
| 57 | our @tests13 = ( |
| 58 | { |
| 59 | "name" => "session-ticket-app-data13", |
| 60 | "client" => { |
| 61 | "MaxProtocol" => "TLSv1.3", |
| 62 | "Options" => "SessionTicket", |
| 63 | }, |
| 64 | "server" => { |
| 65 | "Options" => "SessionTicket", |
| 66 | "extra" => { |
| 67 | "SessionTicketAppData" => "HelloWorld", |
| 68 | }, |
| 69 | }, |
| 70 | "test" => { |
| 71 | "HandshakeMode" => "Resume", |
| 72 | "ExpectedResult" => "Success", |
| 73 | "SessionTicketExpected" => "Yes", |
| 74 | "ResumptionExpected" => "Yes", |
| 75 | "ExpectedSessionTicketAppData" => "HelloWorld", |
| 76 | } |
| 77 | }, |
| 78 | { |
| 79 | "name" => "session-ticket-app-data13", |
| 80 | "client" => { |
| 81 | "MaxProtocol" => "TLSv1.3", |
| 82 | "Options" => "SessionTicket", |
| 83 | }, |
| 84 | "server" => { |
| 85 | "Options" => "SessionTicket", |
| 86 | }, |
| 87 | "test" => { |
| 88 | "HandshakeMode" => "Resume", |
| 89 | "ExpectedResult" => "Success", |
| 90 | "SessionTicketExpected" => "Yes", |
| 91 | "ResumptionExpected" => "Yes", |
| 92 | "ExpectedSessionTicketAppData" => "", |
| 93 | } |
| 94 | } |
| 95 | ); |
| 96 | |
| 97 | our @tests = (); |
| 98 | push @tests, @tests12 unless disabled("tls1_2"); |
| 99 | push @tests, @tests13 unless disabled("tls1_3"); |