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 — [improve][misc] Upgrade Conscrypt to 2.6.1 to add aarch64 native supp… · apache/pulsar@4408cc8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • distribution
    • server/src/assemble
      • LICENSE.bin.txt
    • shell/src/assemble
      • LICENSE.bin.txt
  • pom.xml
  • pulsar-common/src/main/java/org/apache/pulsar/common/util
    • SecurityUtility.java
    • keystoretls
      • KeyStoreSSLContext.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎distribution/server/src/assemble/LICENSE.bin.txt‎

Copy file name to clipboardExpand all lines: distribution/server/src/assemble/LICENSE.bin.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ The Apache Software License, Version 2.0
261261
- com.fasterxml.jackson.datatype-jackson-datatype-jsr310-2.18.9.jar
262262
- com.fasterxml.jackson.module-jackson-module-parameter-names-2.18.9.jar
263263
* Caffeine -- com.github.ben-manes.caffeine-caffeine-3.2.4.jar
264-
* Conscrypt -- org.conscrypt-conscrypt-openjdk-uber-2.5.2.jar
264+
* Conscrypt -- org.conscrypt-conscrypt-openjdk-uber-2.6.1.jar
265265
* Fastutil -- it.unimi.dsi-fastutil-8.5.16.jar
266266
* Proto Google Common Protos -- com.google.api.grpc-proto-google-common-protos-2.59.2.jar
267267
* Bitbucket -- org.bitbucket.b_c-jose4j-0.9.6.jar
Collapse file

‎distribution/shell/src/assemble/LICENSE.bin.txt‎

Copy file name to clipboardExpand all lines: distribution/shell/src/assemble/LICENSE.bin.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ The Apache Software License, Version 2.0
325325
- jackson-datatype-jsr310-2.18.9.jar
326326
- jackson-module-parameter-names-2.18.9.jar
327327
* Caffeine -- caffeine-3.2.4.jar
328-
* Conscrypt -- conscrypt-openjdk-uber-2.5.2.jar
328+
* Conscrypt -- conscrypt-openjdk-uber-2.6.1.jar
329329
* Gson
330330
- gson-2.13.2.jar
331331
* Guava
Collapse file

‎pom.xml‎

Copy file name to clipboardExpand all lines: pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ flexible messaging model and an intuitive client API.</description>
194194
<jetty.version>12.1.12</jetty.version>
195195
<!-- Jetty 9 is used in tiered-storage/file-system tests and pulsar-io/alluxio -->
196196
<jetty9.version>9.4.58.v20250814</jetty9.version>
197-
<conscrypt.version>2.5.2</conscrypt.version>
197+
<conscrypt.version>2.6.1</conscrypt.version>
198198
<jersey.version>2.42</jersey.version>
199199
<athenz.version>1.10.62</athenz.version>
200200
<prometheus.version>0.16.0</prometheus.version>
Collapse file

‎pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java‎

Copy file name to clipboardExpand all lines: pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java
+5-49Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
import javax.net.ssl.TrustManagerFactory;
6969
import lombok.extern.slf4j.Slf4j;
7070
import org.apache.commons.lang3.StringUtils;
71-
import org.apache.pulsar.common.classification.InterfaceAudience;
7271
import org.apache.pulsar.common.tls.TlsHostnameVerifier;
7372

7473
/**
@@ -161,10 +160,11 @@ private static Provider loadConscryptProvider() {
161160
//
162161
// more details of Conscrypt's hostname verification:
163162
// https://github.com/google/conscrypt/blob/master/IMPLEMENTATION_NOTES.md#hostname-verification
164-
// there's a bug in Conscrypt while setting a custom HostnameVerifier,
165-
// https://github.com/google/conscrypt/issues/1015 and therefore this solution alone
166-
// isn't sufficient to configure Conscrypt's hostname verifier. The method processConscryptTrustManager
167-
// contains the workaround.
163+
//
164+
// Setting the default is sufficient on its own since Conscrypt 2.6.0: TrustManagerImpl used to ignore
165+
// the default verifier (https://github.com/google/conscrypt/issues/1015), which forced Pulsar to copy it
166+
// onto every TrustManager instance, but https://github.com/google/conscrypt/pull/1060 made it fall back
167+
// to the default, so that workaround has been removed.
168168
try {
169169
HostnameVerifier hostnameVerifier = new TlsHostnameVerifier();
170170
Object wrappedHostnameVerifier = conscryptClazz
@@ -396,54 +396,10 @@ private static TrustManager[] setupTrustCerts(KeyStoreHolder ksh, boolean allowI
396396
}
397397

398398
trustManagers = tmf.getTrustManagers();
399-
400-
for (TrustManager trustManager : trustManagers) {
401-
processConscryptTrustManager(trustManager);
402-
}
403399
}
404400
return trustManagers;
405401
}
406402

407-
/***
408-
* Conscrypt TrustManager instances will be configured to use the Pulsar {@link TlsHostnameVerifier}
409-
* class.
410-
* This method is used as a workaround for https://github.com/google/conscrypt/issues/1015
411-
* when Conscrypt / OpenSSL is used as the TLS security provider.
412-
*
413-
* @param trustManagers the array of TrustManager instances to process.
414-
* @return same instance passed as parameter
415-
*/
416-
@InterfaceAudience.Private
417-
public static TrustManager[] processConscryptTrustManagers(TrustManager[] trustManagers) {
418-
for (TrustManager trustManager : trustManagers) {
419-
processConscryptTrustManager(trustManager);
420-
}
421-
return trustManagers;
422-
}
423-
424-
// workaround https://github.com/google/conscrypt/issues/1015
425-
private static void processConscryptTrustManager(TrustManager trustManager) {
426-
if (trustManager.getClass().getName().equals("org.conscrypt.TrustManagerImpl")) {
427-
try {
428-
Class<?> conscryptClazz = Class.forName("org.conscrypt.Conscrypt");
429-
Object hostnameVerifier = conscryptClazz.getMethod("getHostnameVerifier",
430-
new Class[]{TrustManager.class}).invoke(null, trustManager);
431-
if (hostnameVerifier == null) {
432-
Object defaultHostnameVerifier = conscryptClazz.getMethod("getDefaultHostnameVerifier",
433-
new Class[]{TrustManager.class}).invoke(null, trustManager);
434-
if (defaultHostnameVerifier != null) {
435-
conscryptClazz.getMethod("setHostnameVerifier", new Class[]{
436-
TrustManager.class,
437-
Class.forName("org.conscrypt.ConscryptHostnameVerifier")
438-
}).invoke(null, trustManager, defaultHostnameVerifier);
439-
}
440-
}
441-
} catch (ReflectiveOperationException e) {
442-
log.warn("Unable to set hostname verifier for Conscrypt TrustManager implementation", e);
443-
}
444-
}
445-
}
446-
447403
public static X509Certificate[] loadCertificatesFromPemFile(String certFilePath) throws KeyManagementException {
448404
X509Certificate[] certificates = null;
449405

Collapse file

‎pulsar-common/src/main/java/org/apache/pulsar/common/util/keystoretls/KeyStoreSSLContext.java‎

Copy file name to clipboardExpand all lines: pulsar-common/src/main/java/org/apache/pulsar/common/util/keystoretls/KeyStoreSSLContext.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public SSLContext createSSLContext() throws GeneralSecurityException, IOExceptio
170170

171171
TrustManager[] trustManagers = null;
172172
if (trustManagerFactory != null) {
173-
trustManagers = SecurityUtility.processConscryptTrustManagers(trustManagerFactory.getTrustManagers());
173+
trustManagers = trustManagerFactory.getTrustManagers();
174174
}
175175

176176
// init

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.