You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/07 07:51:22 UTC

[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #15485: [improve][doc] Add code example for WebSocket API to use TLS with CLI tools

BewareMyPower commented on code in PR #15485:
URL: https://github.com/apache/pulsar/pull/15485#discussion_r867319593


##########
site2/docs/security-tls-transport.md:
##########
@@ -273,3 +273,49 @@ var client = PulsarClient.Builder()
                          .Build();
 ```
 > Note that `VerifyCertificateName` refers to the configuration of hostname verification in the C# client.
+
+#### WebSocket API
+
+
+```python
+import websockets
+import asyncio
+import base64
+import json
+import ssl
+
+ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
+client_pem = pathlib.PATH(__file__).with_name("pulsar_client.pem")

Review Comment:
   ```suggestion
   client_pem = pathlib.Path(__file__).with_name("pulsar_client.pem")
   ```



##########
site2/docs/security-tls-transport.md:
##########
@@ -273,3 +273,49 @@ var client = PulsarClient.Builder()
                          .Build();
 ```
 > Note that `VerifyCertificateName` refers to the configuration of hostname verification in the C# client.
+
+#### WebSocket API
+
+
+```python
+import websockets
+import asyncio
+import base64
+import json
+import ssl

Review Comment:
   ```suggestion
   import ssl
   import pathlib
   ```



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org