chickenlj commented on code in PR #10567:
URL: https://github.com/apache/dubbo/pull/10567#discussion_r965482265


##########
dubbo-xds/src/main/java/org/apache/dubbo/registry/xds/util/XdsChannel.java:
##########
@@ -46,17 +49,30 @@ public class XdsChannel {
     protected XdsChannel(URL url) {
         ManagedChannel managedChannel = null;
         try {
-            XdsCertificateSigner signer = 
url.getOrDefaultApplicationModel().getExtensionLoader(XdsCertificateSigner.class)
-                .getExtension(url.getParameter("signer", "istio"));
-            XdsCertificateSigner.CertPair certPair = signer.GenerateCert(url);
-            SslContext context = GrpcSslContexts.forClient()
-                .trustManager(InsecureTrustManagerFactory.INSTANCE)
-                .keyManager(new 
ByteArrayInputStream(certPair.getPublicKey().getBytes(StandardCharsets.UTF_8)),
-                    new 
ByteArrayInputStream(certPair.getPrivateKey().getBytes(StandardCharsets.UTF_8)))
-                .build();
-            managedChannel = NettyChannelBuilder.forAddress(url.getHost(), 
url.getPort()).sslContext(context)
-                .build();
-        } catch (SSLException e) {
+            if(!url.getParameter("useAgent",false)) {

Review Comment:
   Please use the dash formatted variable name `use-agent` and define it as a 
constant.
   
   Also, we need a demo and documentation introducing the usage of this key and 
the whole bootstrap file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to