1*e0c4386eSCy Schubert# -*- mode: perl; -*- 2*e0c4386eSCy Schubert# Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved. 3*e0c4386eSCy Schubert# 4*e0c4386eSCy Schubert# Licensed under the Apache License 2.0 (the "License"). You may not use 5*e0c4386eSCy Schubert# this file except in compliance with the License. You can obtain a copy 6*e0c4386eSCy Schubert# in the file LICENSE in the source distribution or at 7*e0c4386eSCy Schubert# https://www.openssl.org/source/license.html 8*e0c4386eSCy Schubert 9*e0c4386eSCy Schubert 10*e0c4386eSCy Schubert## Test session ticket app data 11*e0c4386eSCy Schubert 12*e0c4386eSCy Schubertuse strict; 13*e0c4386eSCy Schubertuse warnings; 14*e0c4386eSCy Schubert 15*e0c4386eSCy Schubertpackage ssltests; 16*e0c4386eSCy Schubertuse OpenSSL::Test::Utils; 17*e0c4386eSCy Schubert 18*e0c4386eSCy Schubertour @tests12 = ( 19*e0c4386eSCy Schubert { 20*e0c4386eSCy Schubert "name" => "session-ticket-app-data12", 21*e0c4386eSCy Schubert "client" => { 22*e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2", 23*e0c4386eSCy Schubert "Options" => "SessionTicket", 24*e0c4386eSCy Schubert }, 25*e0c4386eSCy Schubert "server" => { 26*e0c4386eSCy Schubert "Options" => "SessionTicket", 27*e0c4386eSCy Schubert "extra" => { 28*e0c4386eSCy Schubert "SessionTicketAppData" => "HelloWorld", 29*e0c4386eSCy Schubert }, 30*e0c4386eSCy Schubert }, 31*e0c4386eSCy Schubert "test" => { 32*e0c4386eSCy Schubert "HandshakeMode" => "Resume", 33*e0c4386eSCy Schubert "ExpectedResult" => "Success", 34*e0c4386eSCy Schubert "SessionTicketExpected" => "Yes", 35*e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 36*e0c4386eSCy Schubert "ExpectedSessionTicketAppData" => "HelloWorld", 37*e0c4386eSCy Schubert } 38*e0c4386eSCy Schubert }, 39*e0c4386eSCy Schubert { 40*e0c4386eSCy Schubert "name" => "session-ticket-app-data12", 41*e0c4386eSCy Schubert "client" => { 42*e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2", 43*e0c4386eSCy Schubert "Options" => "SessionTicket", 44*e0c4386eSCy Schubert }, 45*e0c4386eSCy Schubert "server" => { 46*e0c4386eSCy Schubert "Options" => "SessionTicket", 47*e0c4386eSCy Schubert }, 48*e0c4386eSCy Schubert "test" => { 49*e0c4386eSCy Schubert "HandshakeMode" => "Resume", 50*e0c4386eSCy Schubert "ExpectedResult" => "Success", 51*e0c4386eSCy Schubert "SessionTicketExpected" => "Yes", 52*e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 53*e0c4386eSCy Schubert "ExpectedSessionTicketAppData" => "", 54*e0c4386eSCy Schubert } 55*e0c4386eSCy Schubert } 56*e0c4386eSCy Schubert); 57*e0c4386eSCy Schubertour @tests13 = ( 58*e0c4386eSCy Schubert { 59*e0c4386eSCy Schubert "name" => "session-ticket-app-data13", 60*e0c4386eSCy Schubert "client" => { 61*e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.3", 62*e0c4386eSCy Schubert "Options" => "SessionTicket", 63*e0c4386eSCy Schubert }, 64*e0c4386eSCy Schubert "server" => { 65*e0c4386eSCy Schubert "Options" => "SessionTicket", 66*e0c4386eSCy Schubert "extra" => { 67*e0c4386eSCy Schubert "SessionTicketAppData" => "HelloWorld", 68*e0c4386eSCy Schubert }, 69*e0c4386eSCy Schubert }, 70*e0c4386eSCy Schubert "test" => { 71*e0c4386eSCy Schubert "HandshakeMode" => "Resume", 72*e0c4386eSCy Schubert "ExpectedResult" => "Success", 73*e0c4386eSCy Schubert "SessionTicketExpected" => "Yes", 74*e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 75*e0c4386eSCy Schubert "ExpectedSessionTicketAppData" => "HelloWorld", 76*e0c4386eSCy Schubert } 77*e0c4386eSCy Schubert }, 78*e0c4386eSCy Schubert { 79*e0c4386eSCy Schubert "name" => "session-ticket-app-data13", 80*e0c4386eSCy Schubert "client" => { 81*e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.3", 82*e0c4386eSCy Schubert "Options" => "SessionTicket", 83*e0c4386eSCy Schubert }, 84*e0c4386eSCy Schubert "server" => { 85*e0c4386eSCy Schubert "Options" => "SessionTicket", 86*e0c4386eSCy Schubert }, 87*e0c4386eSCy Schubert "test" => { 88*e0c4386eSCy Schubert "HandshakeMode" => "Resume", 89*e0c4386eSCy Schubert "ExpectedResult" => "Success", 90*e0c4386eSCy Schubert "SessionTicketExpected" => "Yes", 91*e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 92*e0c4386eSCy Schubert "ExpectedSessionTicketAppData" => "", 93*e0c4386eSCy Schubert } 94*e0c4386eSCy Schubert } 95*e0c4386eSCy Schubert); 96*e0c4386eSCy Schubert 97*e0c4386eSCy Schubertour @tests = (); 98*e0c4386eSCy Schubertpush @tests, @tests12 unless disabled("tls1_2"); 99*e0c4386eSCy Schubertpush @tests, @tests13 unless disabled("tls1_3") 100*e0c4386eSCy Schubert || (disabled("ec") && disabled("dh")); 101