2
0

70-test_tls13messages.t 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. #! /usr/bin/env perl
  2. # Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (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. use strict;
  9. use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file srctop_dir bldtop_dir/;
  10. use OpenSSL::Test::Utils;
  11. use File::Temp qw(tempfile);
  12. use TLSProxy::Proxy;
  13. use checkhandshake qw(checkhandshake @handmessages @extensions);
  14. my $test_name = "test_tls13messages";
  15. setup($test_name);
  16. plan skip_all => "TLSProxy isn't usable on $^O"
  17. if $^O =~ /^(VMS)$/;
  18. plan skip_all => "$test_name needs the dynamic engine feature enabled"
  19. if disabled("engine") || disabled("dynamic-engine");
  20. plan skip_all => "$test_name needs the sock feature enabled"
  21. if disabled("sock");
  22. plan skip_all => "$test_name needs TLSv1.3 enabled"
  23. if disabled("tls1_3");
  24. plan skip_all => "$test_name needs EC enabled"
  25. if disabled("ec");
  26. @handmessages = (
  27. [TLSProxy::Message::MT_CLIENT_HELLO,
  28. checkhandshake::ALL_HANDSHAKES],
  29. [TLSProxy::Message::MT_SERVER_HELLO,
  30. checkhandshake::HRR_HANDSHAKE | checkhandshake::HRR_RESUME_HANDSHAKE],
  31. [TLSProxy::Message::MT_CLIENT_HELLO,
  32. checkhandshake::HRR_HANDSHAKE | checkhandshake::HRR_RESUME_HANDSHAKE],
  33. [TLSProxy::Message::MT_SERVER_HELLO,
  34. checkhandshake::ALL_HANDSHAKES],
  35. [TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS,
  36. checkhandshake::ALL_HANDSHAKES],
  37. [TLSProxy::Message::MT_CERTIFICATE_REQUEST,
  38. checkhandshake::CLIENT_AUTH_HANDSHAKE],
  39. [TLSProxy::Message::MT_CERTIFICATE,
  40. checkhandshake::ALL_HANDSHAKES & ~(checkhandshake::RESUME_HANDSHAKE | checkhandshake::HRR_RESUME_HANDSHAKE)],
  41. [TLSProxy::Message::MT_CERTIFICATE_VERIFY,
  42. checkhandshake::ALL_HANDSHAKES & ~(checkhandshake::RESUME_HANDSHAKE | checkhandshake::HRR_RESUME_HANDSHAKE)],
  43. [TLSProxy::Message::MT_FINISHED,
  44. checkhandshake::ALL_HANDSHAKES],
  45. [TLSProxy::Message::MT_CERTIFICATE,
  46. checkhandshake::CLIENT_AUTH_HANDSHAKE],
  47. [TLSProxy::Message::MT_CERTIFICATE_VERIFY,
  48. checkhandshake::CLIENT_AUTH_HANDSHAKE],
  49. [TLSProxy::Message::MT_FINISHED,
  50. checkhandshake::ALL_HANDSHAKES],
  51. [0, 0]
  52. );
  53. @extensions = (
  54. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
  55. TLSProxy::Message::CLIENT,
  56. checkhandshake::SERVER_NAME_CLI_EXTENSION],
  57. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
  58. TLSProxy::Message::CLIENT,
  59. checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
  60. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
  61. TLSProxy::Message::CLIENT,
  62. checkhandshake::DEFAULT_EXTENSIONS],
  63. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
  64. TLSProxy::Message::CLIENT,
  65. checkhandshake::DEFAULT_EXTENSIONS],
  66. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
  67. TLSProxy::Message::CLIENT,
  68. checkhandshake::DEFAULT_EXTENSIONS],
  69. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
  70. TLSProxy::Message::CLIENT,
  71. checkhandshake::ALPN_CLI_EXTENSION],
  72. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
  73. TLSProxy::Message::CLIENT,
  74. checkhandshake::SCT_CLI_EXTENSION],
  75. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
  76. TLSProxy::Message::CLIENT,
  77. checkhandshake::DEFAULT_EXTENSIONS],
  78. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
  79. TLSProxy::Message::CLIENT,
  80. checkhandshake::DEFAULT_EXTENSIONS],
  81. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
  82. TLSProxy::Message::CLIENT,
  83. checkhandshake::DEFAULT_EXTENSIONS],
  84. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
  85. TLSProxy::Message::CLIENT,
  86. checkhandshake::DEFAULT_EXTENSIONS],
  87. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
  88. TLSProxy::Message::CLIENT,
  89. checkhandshake::DEFAULT_EXTENSIONS],
  90. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
  91. TLSProxy::Message::CLIENT,
  92. checkhandshake::DEFAULT_EXTENSIONS],
  93. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
  94. TLSProxy::Message::CLIENT,
  95. checkhandshake::PSK_CLI_EXTENSION],
  96. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_POST_HANDSHAKE_AUTH,
  97. TLSProxy::Message::CLIENT,
  98. checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION],
  99. [TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
  100. TLSProxy::Message::SERVER,
  101. checkhandshake::DEFAULT_EXTENSIONS],
  102. [TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
  103. TLSProxy::Message::SERVER,
  104. checkhandshake::KEY_SHARE_HRR_EXTENSION],
  105. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SERVER_NAME,
  106. TLSProxy::Message::CLIENT,
  107. checkhandshake::SERVER_NAME_CLI_EXTENSION],
  108. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_STATUS_REQUEST,
  109. TLSProxy::Message::CLIENT,
  110. checkhandshake::STATUS_REQUEST_CLI_EXTENSION],
  111. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
  112. TLSProxy::Message::CLIENT,
  113. checkhandshake::DEFAULT_EXTENSIONS],
  114. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EC_POINT_FORMATS,
  115. TLSProxy::Message::CLIENT,
  116. checkhandshake::DEFAULT_EXTENSIONS],
  117. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SIG_ALGS,
  118. TLSProxy::Message::CLIENT,
  119. checkhandshake::DEFAULT_EXTENSIONS],
  120. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ALPN,
  121. TLSProxy::Message::CLIENT,
  122. checkhandshake::ALPN_CLI_EXTENSION],
  123. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SCT,
  124. TLSProxy::Message::CLIENT,
  125. checkhandshake::SCT_CLI_EXTENSION],
  126. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_ENCRYPT_THEN_MAC,
  127. TLSProxy::Message::CLIENT,
  128. checkhandshake::DEFAULT_EXTENSIONS],
  129. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_EXTENDED_MASTER_SECRET,
  130. TLSProxy::Message::CLIENT,
  131. checkhandshake::DEFAULT_EXTENSIONS],
  132. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SESSION_TICKET,
  133. TLSProxy::Message::CLIENT,
  134. checkhandshake::DEFAULT_EXTENSIONS],
  135. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
  136. TLSProxy::Message::CLIENT,
  137. checkhandshake::DEFAULT_EXTENSIONS],
  138. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
  139. TLSProxy::Message::CLIENT,
  140. checkhandshake::DEFAULT_EXTENSIONS],
  141. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK_KEX_MODES,
  142. TLSProxy::Message::CLIENT,
  143. checkhandshake::DEFAULT_EXTENSIONS],
  144. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_PSK,
  145. TLSProxy::Message::CLIENT,
  146. checkhandshake::PSK_CLI_EXTENSION],
  147. [TLSProxy::Message::MT_CLIENT_HELLO, TLSProxy::Message::EXT_POST_HANDSHAKE_AUTH,
  148. TLSProxy::Message::CLIENT,
  149. checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION],
  150. [TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_SUPPORTED_VERSIONS,
  151. TLSProxy::Message::SERVER,
  152. checkhandshake::DEFAULT_EXTENSIONS],
  153. [TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_KEY_SHARE,
  154. TLSProxy::Message::SERVER,
  155. checkhandshake::DEFAULT_EXTENSIONS],
  156. [TLSProxy::Message::MT_SERVER_HELLO, TLSProxy::Message::EXT_PSK,
  157. TLSProxy::Message::SERVER,
  158. checkhandshake::PSK_SRV_EXTENSION],
  159. [TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_SERVER_NAME,
  160. TLSProxy::Message::SERVER,
  161. checkhandshake::SERVER_NAME_SRV_EXTENSION],
  162. [TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_ALPN,
  163. TLSProxy::Message::SERVER,
  164. checkhandshake::ALPN_SRV_EXTENSION],
  165. [TLSProxy::Message::MT_ENCRYPTED_EXTENSIONS, TLSProxy::Message::EXT_SUPPORTED_GROUPS,
  166. TLSProxy::Message::SERVER,
  167. checkhandshake::SUPPORTED_GROUPS_SRV_EXTENSION],
  168. [TLSProxy::Message::MT_CERTIFICATE_REQUEST, TLSProxy::Message::EXT_SIG_ALGS,
  169. TLSProxy::Message::SERVER,
  170. checkhandshake::DEFAULT_EXTENSIONS],
  171. [TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_STATUS_REQUEST,
  172. TLSProxy::Message::SERVER,
  173. checkhandshake::STATUS_REQUEST_SRV_EXTENSION],
  174. [TLSProxy::Message::MT_CERTIFICATE, TLSProxy::Message::EXT_SCT,
  175. TLSProxy::Message::SERVER,
  176. checkhandshake::SCT_SRV_EXTENSION],
  177. [0,0,0,0]
  178. );
  179. my $proxy = TLSProxy::Proxy->new(
  180. undef,
  181. cmdstr(app(["openssl"]), display => 1),
  182. srctop_file("apps", "server.pem"),
  183. (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
  184. );
  185. #Test 1: Check we get all the right messages for a default handshake
  186. (undef, my $session) = tempfile();
  187. $proxy->serverconnects(2);
  188. $proxy->clientflags("-no_rx_cert_comp -sess_out ".$session);
  189. $proxy->sessionfile($session);
  190. $proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
  191. plan tests => 17;
  192. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  193. checkhandshake::DEFAULT_EXTENSIONS,
  194. "Default handshake test");
  195. #Test 2: Resumption handshake
  196. $proxy->clearClient();
  197. $proxy->clientflags("-no_rx_cert_comp -sess_in ".$session);
  198. $proxy->clientstart();
  199. checkhandshake($proxy, checkhandshake::RESUME_HANDSHAKE,
  200. (checkhandshake::DEFAULT_EXTENSIONS
  201. | checkhandshake::PSK_CLI_EXTENSION
  202. | checkhandshake::PSK_SRV_EXTENSION),
  203. "Resumption handshake test");
  204. SKIP: {
  205. skip "No OCSP support in this OpenSSL build", 4
  206. if disabled("ct") || disabled("ec") || disabled("ocsp");
  207. #Test 3: A status_request handshake (client request only)
  208. $proxy->clear();
  209. $proxy->clientflags("-no_rx_cert_comp -status");
  210. $proxy->start();
  211. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  212. checkhandshake::DEFAULT_EXTENSIONS
  213. | checkhandshake::STATUS_REQUEST_CLI_EXTENSION,
  214. "status_request handshake test (client)");
  215. #Test 4: A status_request handshake (server support only)
  216. $proxy->clear();
  217. $proxy->clientflags("-no_rx_cert_comp");
  218. $proxy->serverflags("-no_rx_cert_comp -status_file "
  219. .srctop_file("test", "recipes", "ocsp-response.der"));
  220. $proxy->start();
  221. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  222. checkhandshake::DEFAULT_EXTENSIONS,
  223. "status_request handshake test (server)");
  224. #Test 5: A status_request handshake (client and server)
  225. $proxy->clear();
  226. $proxy->clientflags("-no_rx_cert_comp -status");
  227. $proxy->serverflags("-no_rx_cert_comp -status_file "
  228. .srctop_file("test", "recipes", "ocsp-response.der"));
  229. $proxy->start();
  230. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  231. checkhandshake::DEFAULT_EXTENSIONS
  232. | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
  233. | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
  234. "status_request handshake test");
  235. #Test 6: A status_request handshake (client and server) with client auth
  236. $proxy->clear();
  237. $proxy->clientflags("-no_rx_cert_comp -status -enable_pha -cert "
  238. .srctop_file("apps", "server.pem"));
  239. $proxy->serverflags("-no_rx_cert_comp -Verify 5 -status_file "
  240. .srctop_file("test", "recipes", "ocsp-response.der"));
  241. $proxy->start();
  242. checkhandshake($proxy, checkhandshake::CLIENT_AUTH_HANDSHAKE,
  243. checkhandshake::DEFAULT_EXTENSIONS
  244. | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
  245. | checkhandshake::STATUS_REQUEST_SRV_EXTENSION
  246. | checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION,
  247. "status_request handshake with client auth test");
  248. }
  249. #Test 7: A client auth handshake
  250. $proxy->clear();
  251. $proxy->clientflags("-no_rx_cert_comp -enable_pha -cert ".srctop_file("apps", "server.pem"));
  252. $proxy->serverflags("-no_rx_cert_comp -Verify 5");
  253. $proxy->start();
  254. checkhandshake($proxy, checkhandshake::CLIENT_AUTH_HANDSHAKE,
  255. checkhandshake::DEFAULT_EXTENSIONS |
  256. checkhandshake::POST_HANDSHAKE_AUTH_CLI_EXTENSION,
  257. "Client auth handshake test");
  258. #Test 8: Server name handshake (no client request)
  259. $proxy->clear();
  260. $proxy->clientflags("-no_rx_cert_comp -noservername");
  261. $proxy->start();
  262. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  263. checkhandshake::DEFAULT_EXTENSIONS
  264. & ~checkhandshake::SERVER_NAME_CLI_EXTENSION,
  265. "Server name handshake test (client)");
  266. #Test 9: Server name handshake (server support only)
  267. $proxy->clear();
  268. $proxy->clientflags("-no_rx_cert_comp -noservername");
  269. $proxy->serverflags("-no_rx_cert_comp -servername testhost");
  270. $proxy->start();
  271. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  272. checkhandshake::DEFAULT_EXTENSIONS
  273. & ~checkhandshake::SERVER_NAME_CLI_EXTENSION,
  274. "Server name handshake test (server)");
  275. #Test 10: Server name handshake (client and server)
  276. $proxy->clear();
  277. $proxy->clientflags("-no_rx_cert_comp -servername testhost");
  278. $proxy->serverflags("-no_rx_cert_comp -servername testhost");
  279. $proxy->start();
  280. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  281. checkhandshake::DEFAULT_EXTENSIONS
  282. | checkhandshake::SERVER_NAME_SRV_EXTENSION,
  283. "Server name handshake test");
  284. #Test 11: ALPN handshake (client request only)
  285. $proxy->clear();
  286. $proxy->clientflags("-no_rx_cert_comp -alpn test");
  287. $proxy->start();
  288. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  289. checkhandshake::DEFAULT_EXTENSIONS
  290. | checkhandshake::ALPN_CLI_EXTENSION,
  291. "ALPN handshake test (client)");
  292. #Test 12: ALPN handshake (server support only)
  293. $proxy->clear();
  294. $proxy->clientflags("-no_rx_cert_comp");
  295. $proxy->serverflags("-no_rx_cert_comp -alpn test");
  296. $proxy->start();
  297. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  298. checkhandshake::DEFAULT_EXTENSIONS,
  299. "ALPN handshake test (server)");
  300. #Test 13: ALPN handshake (client and server)
  301. $proxy->clear();
  302. $proxy->clientflags("-no_rx_cert_comp -alpn test");
  303. $proxy->serverflags("-no_rx_cert_comp -alpn test");
  304. $proxy->start();
  305. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  306. checkhandshake::DEFAULT_EXTENSIONS
  307. | checkhandshake::ALPN_CLI_EXTENSION
  308. | checkhandshake::ALPN_SRV_EXTENSION,
  309. "ALPN handshake test");
  310. SKIP: {
  311. skip "No CT, EC or OCSP support in this OpenSSL build", 1
  312. if disabled("ct") || disabled("ec") || disabled("ocsp");
  313. #Test 14: SCT handshake (client request only)
  314. $proxy->clear();
  315. #Note: -ct also sends status_request
  316. $proxy->clientflags("-no_rx_cert_comp -ct");
  317. $proxy->serverflags("-no_rx_cert_comp -status_file "
  318. .srctop_file("test", "recipes", "ocsp-response.der")
  319. ." -serverinfo ".srctop_file("test", "serverinfo2.pem"));
  320. $proxy->start();
  321. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  322. checkhandshake::DEFAULT_EXTENSIONS
  323. | checkhandshake::SCT_CLI_EXTENSION
  324. | checkhandshake::SCT_SRV_EXTENSION
  325. | checkhandshake::STATUS_REQUEST_CLI_EXTENSION
  326. | checkhandshake::STATUS_REQUEST_SRV_EXTENSION,
  327. "SCT handshake test");
  328. }
  329. #Test 15: HRR Handshake
  330. $proxy->clear();
  331. $proxy->clientflags("-no_rx_cert_comp");
  332. $proxy->serverflags("-no_rx_cert_comp -curves P-256");
  333. $proxy->start();
  334. checkhandshake($proxy, checkhandshake::HRR_HANDSHAKE,
  335. checkhandshake::DEFAULT_EXTENSIONS
  336. | checkhandshake::KEY_SHARE_HRR_EXTENSION,
  337. "HRR handshake test");
  338. #Test 16: Resumption handshake with HRR
  339. $proxy->clear();
  340. $proxy->clientflags("-no_rx_cert_comp -sess_in ".$session);
  341. $proxy->serverflags("-no_rx_cert_comp -curves P-256");
  342. $proxy->start();
  343. checkhandshake($proxy, checkhandshake::HRR_RESUME_HANDSHAKE,
  344. (checkhandshake::DEFAULT_EXTENSIONS
  345. | checkhandshake::KEY_SHARE_HRR_EXTENSION
  346. | checkhandshake::PSK_CLI_EXTENSION
  347. | checkhandshake::PSK_SRV_EXTENSION),
  348. "Resumption handshake with HRR test");
  349. #Test 17: Acceptable but non preferred key_share
  350. $proxy->clear();
  351. $proxy->clientflags("-no_rx_cert_comp -curves P-256");
  352. $proxy->start();
  353. checkhandshake($proxy, checkhandshake::DEFAULT_HANDSHAKE,
  354. checkhandshake::DEFAULT_EXTENSIONS
  355. | checkhandshake::SUPPORTED_GROUPS_SRV_EXTENSION,
  356. "Acceptable but non preferred key_share");
  357. unlink $session;