File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ final class TlsIconTest extends TestCase
3333 /** @var string */
3434 private $ strStalwartCryptedTlsv13WithCipher = '<img class="lock_icon" src="plugins/tls_icon/lock.svg" title="TLSv1.3 with cipher TLS13_AES_256_GCM_SHA384" /> ' ;
3535
36+ /** @var string */
37+ private $ strNewPostfixTLSv13 = '<img class="lock_icon" src="plugins/tls_icon/lock.svg" title="TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (4096 bits) server-digest SHA256" /> ' ;
38+
3639 public function testInstance ()
3740 {
3841 $ o = new tls_icon ();
@@ -196,6 +199,43 @@ public function testMessageHeadersInternal()
196199 ], $ headersProcessed );
197200 }
198201
202+ public function testPostfixTLS13NewSyntax ()
203+ {
204+ $ header = 'from GVXPR05CU001.outbound.protection.outlook.com (mail-swedencentralazon11023139.outbound.protection.outlook.com [52.101.83.139])
205+ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (4096 bits) server-digest SHA256)
206+ (No client certificate requested)
207+ by example.com with ESMTPS id EXAMPLE
208+ for <test@example.com>; Tue, 16 Sep 2025 12:26:17 +0200 (CEST) ' ;
209+
210+ $ o = new tls_icon ();
211+ $ headersProcessed = $ o ->message_headers ([
212+ 'output ' => [
213+ 'subject ' => [
214+ 'value ' => 'Sent to you ' ,
215+ ],
216+ ],
217+ 'headers ' => (object )[
218+ 'others ' => [
219+ 'received ' => $ header ,
220+ ]
221+ ]
222+ ]);
223+ $ this ->assertEquals ([
224+ 'output ' => [
225+ 'subject ' => [
226+ 'value ' => 'Sent to you ' . $ this ->strNewPostfixTLSv13 ,
227+ 'html ' => 1 ,
228+ ],
229+ ],
230+ 'headers ' => (object )[
231+ 'others ' => [
232+ 'received ' => $ header ,
233+ ]
234+ ]
235+ ], $ headersProcessed );
236+ }
237+
238+
199239 public function testMessageHeadersMultiFromWithConfig ()
200240 {
201241 $ inputHeaders = [
You can’t perform that action at this time.
0 commit comments