1e0c4386eSCy Schubert# -*- mode: perl; -*- 2*a7148ab3SEnji Cooper# Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved. 3e0c4386eSCy Schubert# 4e0c4386eSCy Schubert# Licensed under the Apache License 2.0 (the "License"). You may not use 5e0c4386eSCy Schubert# this file except in compliance with the License. You can obtain a copy 6e0c4386eSCy Schubert# in the file LICENSE in the source distribution or at 7e0c4386eSCy Schubert# https://www.openssl.org/source/license.html 8e0c4386eSCy Schubert 9e0c4386eSCy Schubert 10e0c4386eSCy Schubert## Test NPN. Note that NPN is only supported up to TLSv1.2 11e0c4386eSCy Schubert 12e0c4386eSCy Schubertuse strict; 13e0c4386eSCy Schubertuse warnings; 14e0c4386eSCy Schubert 15e0c4386eSCy Schubertpackage ssltests; 16e0c4386eSCy Schubert 17e0c4386eSCy Schubertour @tests = ( 18e0c4386eSCy Schubert { 19e0c4386eSCy Schubert name => "npn-simple", 20e0c4386eSCy Schubert server => { 21e0c4386eSCy Schubert extra => { 22e0c4386eSCy Schubert "NPNProtocols" => "foo", 23e0c4386eSCy Schubert }, 24e0c4386eSCy Schubert }, 25e0c4386eSCy Schubert client => { 26e0c4386eSCy Schubert extra => { 27e0c4386eSCy Schubert "NPNProtocols" => "foo", 28e0c4386eSCy Schubert }, 29e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 30e0c4386eSCy Schubert }, 31e0c4386eSCy Schubert test => { 32e0c4386eSCy Schubert "ExpectedNPNProtocol" => "foo", 33e0c4386eSCy Schubert }, 34e0c4386eSCy Schubert }, 35e0c4386eSCy Schubert { 36e0c4386eSCy Schubert name => "npn-client-finds-match", 37e0c4386eSCy Schubert server => { 38e0c4386eSCy Schubert extra => { 39e0c4386eSCy Schubert "NPNProtocols" => "baz,bar", 40e0c4386eSCy Schubert }, 41e0c4386eSCy Schubert }, 42e0c4386eSCy Schubert client => { 43e0c4386eSCy Schubert extra => { 44e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 45e0c4386eSCy Schubert }, 46e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 47e0c4386eSCy Schubert }, 48e0c4386eSCy Schubert test => { 49e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 50e0c4386eSCy Schubert }, 51e0c4386eSCy Schubert }, 52e0c4386eSCy Schubert { 53e0c4386eSCy Schubert name => "npn-client-honours-server-pref", 54e0c4386eSCy Schubert server => { 55e0c4386eSCy Schubert extra => { 56e0c4386eSCy Schubert "NPNProtocols" => "bar,foo", 57e0c4386eSCy Schubert }, 58e0c4386eSCy Schubert }, 59e0c4386eSCy Schubert client => { 60e0c4386eSCy Schubert extra => { 61e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 62e0c4386eSCy Schubert }, 63e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 64e0c4386eSCy Schubert }, 65e0c4386eSCy Schubert test => { 66e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 67e0c4386eSCy Schubert }, 68e0c4386eSCy Schubert }, 69e0c4386eSCy Schubert { 70e0c4386eSCy Schubert name => "npn-client-first-pref-on-mismatch", 71e0c4386eSCy Schubert server => { 72e0c4386eSCy Schubert extra => { 73e0c4386eSCy Schubert "NPNProtocols" => "baz", 74e0c4386eSCy Schubert }, 75e0c4386eSCy Schubert }, 76e0c4386eSCy Schubert client => { 77e0c4386eSCy Schubert extra => { 78e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 79e0c4386eSCy Schubert }, 80e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 81e0c4386eSCy Schubert }, 82e0c4386eSCy Schubert test => { 83e0c4386eSCy Schubert "ExpectedNPNProtocol" => "foo", 84e0c4386eSCy Schubert }, 85e0c4386eSCy Schubert }, 86e0c4386eSCy Schubert { 87e0c4386eSCy Schubert name => "npn-no-server-support", 88e0c4386eSCy Schubert server => {}, 89e0c4386eSCy Schubert client => { 90e0c4386eSCy Schubert extra => { 91e0c4386eSCy Schubert "NPNProtocols" => "foo", 92e0c4386eSCy Schubert }, 93e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 94e0c4386eSCy Schubert }, 95e0c4386eSCy Schubert test => { 96e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 97e0c4386eSCy Schubert }, 98e0c4386eSCy Schubert }, 99e0c4386eSCy Schubert { 100e0c4386eSCy Schubert name => "npn-no-client-support", 101e0c4386eSCy Schubert server => { 102e0c4386eSCy Schubert extra => { 103e0c4386eSCy Schubert "NPNProtocols" => "foo", 104e0c4386eSCy Schubert }, 105e0c4386eSCy Schubert }, 106e0c4386eSCy Schubert client => { 107e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 108e0c4386eSCy Schubert }, 109e0c4386eSCy Schubert test => { 110e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 111e0c4386eSCy Schubert }, 112e0c4386eSCy Schubert }, 113e0c4386eSCy Schubert { 114*a7148ab3SEnji Cooper name => "npn-empty-client-list", 115*a7148ab3SEnji Cooper server => { 116*a7148ab3SEnji Cooper extra => { 117*a7148ab3SEnji Cooper "NPNProtocols" => "foo", 118*a7148ab3SEnji Cooper }, 119*a7148ab3SEnji Cooper }, 120*a7148ab3SEnji Cooper client => { 121*a7148ab3SEnji Cooper extra => { 122*a7148ab3SEnji Cooper "NPNProtocols" => "", 123*a7148ab3SEnji Cooper }, 124*a7148ab3SEnji Cooper "MaxProtocol" => "TLSv1.2" 125*a7148ab3SEnji Cooper }, 126*a7148ab3SEnji Cooper test => { 127*a7148ab3SEnji Cooper "ExpectedResult" => "ClientFail", 128*a7148ab3SEnji Cooper "ExpectedClientAlert" => "HandshakeFailure" 129*a7148ab3SEnji Cooper }, 130*a7148ab3SEnji Cooper }, 131*a7148ab3SEnji Cooper { 132*a7148ab3SEnji Cooper name => "npn-empty-server-list", 133*a7148ab3SEnji Cooper server => { 134*a7148ab3SEnji Cooper extra => { 135*a7148ab3SEnji Cooper "NPNProtocols" => "", 136*a7148ab3SEnji Cooper }, 137*a7148ab3SEnji Cooper }, 138*a7148ab3SEnji Cooper client => { 139*a7148ab3SEnji Cooper extra => { 140*a7148ab3SEnji Cooper "NPNProtocols" => "foo", 141*a7148ab3SEnji Cooper }, 142*a7148ab3SEnji Cooper "MaxProtocol" => "TLSv1.2" 143*a7148ab3SEnji Cooper }, 144*a7148ab3SEnji Cooper test => { 145*a7148ab3SEnji Cooper "ExpectedNPNProtocol" => "foo" 146*a7148ab3SEnji Cooper }, 147*a7148ab3SEnji Cooper }, 148*a7148ab3SEnji Cooper { 149e0c4386eSCy Schubert name => "npn-with-sni-no-context-switch", 150e0c4386eSCy Schubert server => { 151e0c4386eSCy Schubert extra => { 152e0c4386eSCy Schubert "NPNProtocols" => "foo", 153e0c4386eSCy Schubert "ServerNameCallback" => "IgnoreMismatch", 154e0c4386eSCy Schubert }, 155e0c4386eSCy Schubert }, 156e0c4386eSCy Schubert server2 => { 157e0c4386eSCy Schubert extra => { 158e0c4386eSCy Schubert "NPNProtocols" => "bar", 159e0c4386eSCy Schubert }, 160e0c4386eSCy Schubert }, 161e0c4386eSCy Schubert client => { 162e0c4386eSCy Schubert extra => { 163e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 164e0c4386eSCy Schubert "ServerName" => "server1", 165e0c4386eSCy Schubert }, 166e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 167e0c4386eSCy Schubert }, 168e0c4386eSCy Schubert test => { 169e0c4386eSCy Schubert "ExpectedServerName" => "server1", 170e0c4386eSCy Schubert "ExpectedNPNProtocol" => "foo", 171e0c4386eSCy Schubert }, 172e0c4386eSCy Schubert }, 173e0c4386eSCy Schubert { 174e0c4386eSCy Schubert name => "npn-with-sni-context-switch", 175e0c4386eSCy Schubert server => { 176e0c4386eSCy Schubert extra => { 177e0c4386eSCy Schubert "NPNProtocols" => "foo", 178e0c4386eSCy Schubert "ServerNameCallback" => "IgnoreMismatch", 179e0c4386eSCy Schubert }, 180e0c4386eSCy Schubert }, 181e0c4386eSCy Schubert server2 => { 182e0c4386eSCy Schubert extra => { 183e0c4386eSCy Schubert "NPNProtocols" => "bar", 184e0c4386eSCy Schubert }, 185e0c4386eSCy Schubert }, 186e0c4386eSCy Schubert client => { 187e0c4386eSCy Schubert extra => { 188e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 189e0c4386eSCy Schubert "ServerName" => "server2", 190e0c4386eSCy Schubert }, 191e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 192e0c4386eSCy Schubert }, 193e0c4386eSCy Schubert test => { 194e0c4386eSCy Schubert "ExpectedServerName" => "server2", 195e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 196e0c4386eSCy Schubert }, 197e0c4386eSCy Schubert }, 198e0c4386eSCy Schubert { 199e0c4386eSCy Schubert name => "npn-selected-sni-server-supports-npn", 200e0c4386eSCy Schubert server => { 201e0c4386eSCy Schubert extra => { 202e0c4386eSCy Schubert "ServerNameCallback" => "IgnoreMismatch", 203e0c4386eSCy Schubert }, 204e0c4386eSCy Schubert }, 205e0c4386eSCy Schubert server2 => { 206e0c4386eSCy Schubert extra => { 207e0c4386eSCy Schubert "NPNProtocols" => "bar", 208e0c4386eSCy Schubert }, 209e0c4386eSCy Schubert }, 210e0c4386eSCy Schubert client => { 211e0c4386eSCy Schubert extra => { 212e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 213e0c4386eSCy Schubert "ServerName" => "server2", 214e0c4386eSCy Schubert }, 215e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 216e0c4386eSCy Schubert }, 217e0c4386eSCy Schubert test => { 218e0c4386eSCy Schubert "ExpectedServerName" => "server2", 219e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 220e0c4386eSCy Schubert }, 221e0c4386eSCy Schubert }, 222e0c4386eSCy Schubert { 223e0c4386eSCy Schubert name => "npn-selected-sni-server-does-not-support-npn", 224e0c4386eSCy Schubert server => { 225e0c4386eSCy Schubert extra => { 226e0c4386eSCy Schubert "NPNProtocols" => "bar", 227e0c4386eSCy Schubert "ServerNameCallback" => "IgnoreMismatch", 228e0c4386eSCy Schubert }, 229e0c4386eSCy Schubert }, 230e0c4386eSCy Schubert server2 => { }, 231e0c4386eSCy Schubert client => { 232e0c4386eSCy Schubert extra => { 233e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 234e0c4386eSCy Schubert "ServerName" => "server2", 235e0c4386eSCy Schubert }, 236e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 237e0c4386eSCy Schubert }, 238e0c4386eSCy Schubert test => { 239e0c4386eSCy Schubert "ExpectedServerName" => "server2", 240e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 241e0c4386eSCy Schubert }, 242e0c4386eSCy Schubert }, 243e0c4386eSCy Schubert { 244e0c4386eSCy Schubert name => "alpn-preferred-over-npn", 245e0c4386eSCy Schubert server => { 246e0c4386eSCy Schubert extra => { 247e0c4386eSCy Schubert "ALPNProtocols" => "foo", 248e0c4386eSCy Schubert "NPNProtocols" => "bar", 249e0c4386eSCy Schubert }, 250e0c4386eSCy Schubert }, 251e0c4386eSCy Schubert client => { 252e0c4386eSCy Schubert extra => { 253e0c4386eSCy Schubert "ALPNProtocols" => "foo", 254e0c4386eSCy Schubert "NPNProtocols" => "bar", 255e0c4386eSCy Schubert }, 256e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 257e0c4386eSCy Schubert }, 258e0c4386eSCy Schubert test => { 259e0c4386eSCy Schubert "ExpectedALPNProtocol" => "foo", 260e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 261e0c4386eSCy Schubert }, 262e0c4386eSCy Schubert }, 263e0c4386eSCy Schubert { 264e0c4386eSCy Schubert name => "sni-npn-preferred-over-alpn", 265e0c4386eSCy Schubert server => { 266e0c4386eSCy Schubert extra => { 267e0c4386eSCy Schubert "ServerNameCallback" => "IgnoreMismatch", 268e0c4386eSCy Schubert "ALPNProtocols" => "foo", 269e0c4386eSCy Schubert }, 270e0c4386eSCy Schubert }, 271e0c4386eSCy Schubert server2 => { 272e0c4386eSCy Schubert extra => { 273e0c4386eSCy Schubert "NPNProtocols" => "bar", 274e0c4386eSCy Schubert }, 275e0c4386eSCy Schubert }, 276e0c4386eSCy Schubert client => { 277e0c4386eSCy Schubert extra => { 278e0c4386eSCy Schubert "ServerName" => "server2", 279e0c4386eSCy Schubert "ALPNProtocols" => "foo", 280e0c4386eSCy Schubert "NPNProtocols" => "bar", 281e0c4386eSCy Schubert }, 282e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 283e0c4386eSCy Schubert }, 284e0c4386eSCy Schubert test => { 285e0c4386eSCy Schubert "ExpectedALPNProtocol" => undef, 286e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 287e0c4386eSCy Schubert "ExpectedServerName" => "server2", 288e0c4386eSCy Schubert }, 289e0c4386eSCy Schubert }, 290e0c4386eSCy Schubert { 291e0c4386eSCy Schubert name => "npn-simple-resumption", 292e0c4386eSCy Schubert server => { 293e0c4386eSCy Schubert extra => { 294e0c4386eSCy Schubert "NPNProtocols" => "foo", 295e0c4386eSCy Schubert }, 296e0c4386eSCy Schubert }, 297e0c4386eSCy Schubert client => { 298e0c4386eSCy Schubert extra => { 299e0c4386eSCy Schubert "NPNProtocols" => "foo", 300e0c4386eSCy Schubert }, 301e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 302e0c4386eSCy Schubert }, 303e0c4386eSCy Schubert test => { 304e0c4386eSCy Schubert "HandshakeMode" => "Resume", 305e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 306e0c4386eSCy Schubert "ExpectedNPNProtocol" => "foo", 307e0c4386eSCy Schubert }, 308e0c4386eSCy Schubert }, 309e0c4386eSCy Schubert { 310e0c4386eSCy Schubert name => "npn-server-switch-resumption", 311e0c4386eSCy Schubert server => { 312e0c4386eSCy Schubert extra => { 313e0c4386eSCy Schubert "NPNProtocols" => "bar,foo", 314e0c4386eSCy Schubert }, 315e0c4386eSCy Schubert }, 316e0c4386eSCy Schubert resume_server => { 317e0c4386eSCy Schubert extra => { 318e0c4386eSCy Schubert "NPNProtocols" => "baz,foo", 319e0c4386eSCy Schubert }, 320e0c4386eSCy Schubert }, 321e0c4386eSCy Schubert client => { 322e0c4386eSCy Schubert extra => { 323e0c4386eSCy Schubert "NPNProtocols" => "foo,bar,baz", 324e0c4386eSCy Schubert }, 325e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 326e0c4386eSCy Schubert }, 327e0c4386eSCy Schubert test => { 328e0c4386eSCy Schubert "HandshakeMode" => "Resume", 329e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 330e0c4386eSCy Schubert "ExpectedNPNProtocol" => "baz", 331e0c4386eSCy Schubert }, 332e0c4386eSCy Schubert }, 333e0c4386eSCy Schubert { 334e0c4386eSCy Schubert name => "npn-client-switch-resumption", 335e0c4386eSCy Schubert server => { 336e0c4386eSCy Schubert extra => { 337e0c4386eSCy Schubert "NPNProtocols" => "foo,bar,baz", 338e0c4386eSCy Schubert }, 339e0c4386eSCy Schubert }, 340e0c4386eSCy Schubert client => { 341e0c4386eSCy Schubert extra => { 342e0c4386eSCy Schubert "NPNProtocols" => "foo,baz", 343e0c4386eSCy Schubert }, 344e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 345e0c4386eSCy Schubert }, 346e0c4386eSCy Schubert resume_client => { 347e0c4386eSCy Schubert extra => { 348e0c4386eSCy Schubert "NPNProtocols" => "bar,baz", 349e0c4386eSCy Schubert }, 350e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 351e0c4386eSCy Schubert }, 352e0c4386eSCy Schubert test => { 353e0c4386eSCy Schubert "HandshakeMode" => "Resume", 354e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 355e0c4386eSCy Schubert "ExpectedNPNProtocol" => "bar", 356e0c4386eSCy Schubert }, 357e0c4386eSCy Schubert }, 358e0c4386eSCy Schubert { 359e0c4386eSCy Schubert name => "npn-client-first-pref-on-mismatch-resumption", 360e0c4386eSCy Schubert server => { 361e0c4386eSCy Schubert extra => { 362e0c4386eSCy Schubert "NPNProtocols" => "bar", 363e0c4386eSCy Schubert }, 364e0c4386eSCy Schubert }, 365e0c4386eSCy Schubert resume_server => { 366e0c4386eSCy Schubert extra => { 367e0c4386eSCy Schubert "NPNProtocols" => "baz", 368e0c4386eSCy Schubert }, 369e0c4386eSCy Schubert }, 370e0c4386eSCy Schubert client => { 371e0c4386eSCy Schubert extra => { 372e0c4386eSCy Schubert "NPNProtocols" => "foo,bar", 373e0c4386eSCy Schubert }, 374e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 375e0c4386eSCy Schubert }, 376e0c4386eSCy Schubert test => { 377e0c4386eSCy Schubert "HandshakeMode" => "Resume", 378e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 379e0c4386eSCy Schubert "ExpectedNPNProtocol" => "foo", 380e0c4386eSCy Schubert }, 381e0c4386eSCy Schubert }, 382e0c4386eSCy Schubert { 383e0c4386eSCy Schubert name => "npn-no-server-support-resumption", 384e0c4386eSCy Schubert server => { 385e0c4386eSCy Schubert extra => { 386e0c4386eSCy Schubert "NPNProtocols" => "foo", 387e0c4386eSCy Schubert }, 388e0c4386eSCy Schubert }, 389e0c4386eSCy Schubert resume_server => { }, 390e0c4386eSCy Schubert client => { 391e0c4386eSCy Schubert extra => { 392e0c4386eSCy Schubert "NPNProtocols" => "foo", 393e0c4386eSCy Schubert }, 394e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 395e0c4386eSCy Schubert }, 396e0c4386eSCy Schubert test => { 397e0c4386eSCy Schubert "HandshakeMode" => "Resume", 398e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 399e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 400e0c4386eSCy Schubert }, 401e0c4386eSCy Schubert }, 402e0c4386eSCy Schubert { 403e0c4386eSCy Schubert name => "npn-no-client-support-resumption", 404e0c4386eSCy Schubert server => { 405e0c4386eSCy Schubert extra => { 406e0c4386eSCy Schubert "NPNProtocols" => "foo", 407e0c4386eSCy Schubert }, 408e0c4386eSCy Schubert }, 409e0c4386eSCy Schubert client => { 410e0c4386eSCy Schubert extra => { 411e0c4386eSCy Schubert "NPNProtocols" => "foo", 412e0c4386eSCy Schubert }, 413e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 414e0c4386eSCy Schubert }, 415e0c4386eSCy Schubert resume_client => { 416e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 417e0c4386eSCy Schubert }, 418e0c4386eSCy Schubert test => { 419e0c4386eSCy Schubert "HandshakeMode" => "Resume", 420e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 421e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 422e0c4386eSCy Schubert }, 423e0c4386eSCy Schubert }, 424e0c4386eSCy Schubert { 425e0c4386eSCy Schubert name => "alpn-preferred-over-npn-resumption", 426e0c4386eSCy Schubert server => { 427e0c4386eSCy Schubert extra => { 428e0c4386eSCy Schubert "NPNProtocols" => "bar", 429e0c4386eSCy Schubert }, 430e0c4386eSCy Schubert }, 431e0c4386eSCy Schubert resume_server => { 432e0c4386eSCy Schubert extra => { 433e0c4386eSCy Schubert "ALPNProtocols" => "foo", 434e0c4386eSCy Schubert "NPNProtocols" => "baz", 435e0c4386eSCy Schubert }, 436e0c4386eSCy Schubert }, 437e0c4386eSCy Schubert client => { 438e0c4386eSCy Schubert extra => { 439e0c4386eSCy Schubert "ALPNProtocols" => "foo", 440e0c4386eSCy Schubert "NPNProtocols" => "bar,baz", 441e0c4386eSCy Schubert }, 442e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 443e0c4386eSCy Schubert }, 444e0c4386eSCy Schubert test => { 445e0c4386eSCy Schubert "HandshakeMode" => "Resume", 446e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 447e0c4386eSCy Schubert "ExpectedALPNProtocol" => "foo", 448e0c4386eSCy Schubert "ExpectedNPNProtocol" => undef, 449e0c4386eSCy Schubert }, 450e0c4386eSCy Schubert }, 451e0c4386eSCy Schubert { 452e0c4386eSCy Schubert name => "npn-used-if-alpn-not-supported-resumption", 453e0c4386eSCy Schubert server => { 454e0c4386eSCy Schubert extra => { 455e0c4386eSCy Schubert "ALPNProtocols" => "foo", 456e0c4386eSCy Schubert "NPNProtocols" => "bar", 457e0c4386eSCy Schubert }, 458e0c4386eSCy Schubert }, 459e0c4386eSCy Schubert resume_server => { 460e0c4386eSCy Schubert extra => { 461e0c4386eSCy Schubert "NPNProtocols" => "baz", 462e0c4386eSCy Schubert }, 463e0c4386eSCy Schubert }, 464e0c4386eSCy Schubert client => { 465e0c4386eSCy Schubert extra => { 466e0c4386eSCy Schubert "ALPNProtocols" => "foo", 467e0c4386eSCy Schubert "NPNProtocols" => "bar,baz", 468e0c4386eSCy Schubert }, 469e0c4386eSCy Schubert "MaxProtocol" => "TLSv1.2" 470e0c4386eSCy Schubert }, 471e0c4386eSCy Schubert test => { 472e0c4386eSCy Schubert "HandshakeMode" => "Resume", 473e0c4386eSCy Schubert "ResumptionExpected" => "Yes", 474e0c4386eSCy Schubert "ExpectedALPNProtocol" => undef, 475e0c4386eSCy Schubert "ExpectedNPNProtocol" => "baz", 476e0c4386eSCy Schubert }, 477e0c4386eSCy Schubert }, 478e0c4386eSCy Schubert); 479