File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
test/jdk/javax/net/ssl/TLSCommon/interop Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2525import java .net .InetSocketAddress ;
2626import java .net .SocketException ;
2727import java .util .ArrayList ;
28+ import java .util .Arrays ;
2829import java .util .List ;
2930
3031import javax .net .ssl .SNIHostName ;
@@ -86,6 +87,16 @@ protected void configClientSocket(Builder builder) throws SocketException {
8687 if (builder .getAppProtocols () != null ) {
8788 sslParams .setApplicationProtocols (builder .getAppProtocols ());
8889 }
90+
91+ NamedGroup [] namedGroups = builder .getNamedGroups ();
92+ if (namedGroups != null
93+ && namedGroups .length > 0 ) {
94+ String [] namedGroupStrs = Arrays .stream (namedGroups )
95+ .map (NamedGroup ::name )
96+ .toArray (String []::new );
97+ sslParams .setNamedGroups (namedGroupStrs );
98+ }
99+
89100 socket .setSSLParameters (sslParams );
90101 }
91102
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2020, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2020, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2222 */
2323
2424import java .io .IOException ;
25- import java .net .InetAddress ;
2625import java .net .SocketException ;
2726import java .util .ArrayList ;
27+ import java .util .Arrays ;
2828import java .util .List ;
2929
3030import javax .net .ssl .SNIHostName ;
@@ -85,6 +85,16 @@ protected void configServerSocket(Builder builder) throws SocketException {
8585 System .out .println ("appProtocol: " + appProtocol );
8686 }
8787 }
88+
89+ NamedGroup [] namedGroups = builder .getNamedGroups ();
90+ if (namedGroups != null
91+ && namedGroups .length > 0 ) {
92+ String [] namedGroupStrs = Arrays .stream (namedGroups )
93+ .map (NamedGroup ::name )
94+ .toArray (String []::new );
95+ sslParams .setNamedGroups (namedGroupStrs );
96+ }
97+
8898 serverSocket .setSSLParameters (sslParams );
8999 }
90100
You can’t perform that action at this time.
0 commit comments