GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SSL: Clear native error if named group is not supported (#15001) (#15… · netty/netty@aa62bfb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • handler/src/main/java/io/netty5/handler/ssl
    • OpenSsl.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎handler/src/main/java/io/netty5/handler/ssl/OpenSsl.java‎

Copy file name to clipboardExpand all lines: handler/src/main/java/io/netty5/handler/ssl/OpenSsl.java
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public final class OpenSsl {
183183
// fips and the configure group is not supported when using FIPS.
184184
// See https://github.com/netty/netty-tcnative/issues/883
185185
defaultGroupsIter.remove();
186+
187+
// Clear the error as otherwise we might fail later.
188+
SSL.clearError();
186189
}
187190
}
188191
namedGroups = defaultConvertedNamedGroups.toArray(EmptyArrays.EMPTY_STRINGS);
@@ -214,6 +217,7 @@ public final class OpenSsl {
214217

215218
} catch (Exception ignore) {
216219
tlsv13Supported = false;
220+
SSL.clearError();
217221
}
218222
}
219223

@@ -258,6 +262,7 @@ public final class OpenSsl {
258262
supportsKeyManagerFactory = true;
259263
} catch (Exception e) {
260264
logger.debug("KeyManagerFactory not supported", e);
265+
SSL.clearError();
261266
}
262267
} finally {
263268
SSL.freeSSL(ssl);
@@ -289,6 +294,9 @@ public final class OpenSsl {
289294
supportedNamedGroups.add(namedGroup);
290295
} else {
291296
unsupportedNamedGroups.add(namedGroup);
297+
298+
// Clear the error as otherwise we might fail later.
299+
SSL.clearError();
292300
}
293301
}
294302

@@ -307,7 +315,7 @@ public final class OpenSsl {
307315
Arrays.toString(groupArray),
308316
Arrays.toString(unsupportedNamedGroups.toArray(EmptyArrays.EMPTY_STRINGS)));
309317
}
310-
namedGroups = supportedConvertedNamedGroups.toArray(EmptyArrays.EMPTY_STRINGS);
318+
namedGroups = supportedConvertedNamedGroups.toArray(EmptyArrays.EMPTY_STRINGS);
311319
}
312320
} else {
313321
namedGroups = defaultConvertedNamedGroups.toArray(EmptyArrays.EMPTY_STRINGS);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.