You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ja...@apache.org on 2019/01/09 01:29:36 UTC

[pulsar] branch master updated: Java Client - Add Bouncy Castle Provider to AuthenticationTls (#3334)

This is an automated email from the ASF dual-hosted git repository.

jai1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new baec02c  Java Client - Add Bouncy Castle Provider to AuthenticationTls (#3334)
baec02c is described below

commit baec02cf3a9275a50f57a1a7077aef1731c8dba6
Author: Jai Asher <ja...@ccs.neu.edu>
AuthorDate: Tue Jan 8 17:29:31 2019 -0800

    Java Client - Add Bouncy Castle Provider to AuthenticationTls (#3334)
---
 .../java/org/apache/pulsar/client/impl/auth/AuthenticationTls.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationTls.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationTls.java
index 8594879..c4a1e7d 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationTls.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/auth/AuthenticationTls.java
@@ -19,6 +19,7 @@
 package org.apache.pulsar.client.impl.auth;
 
 import java.io.IOException;
+import java.security.Security;
 import java.util.Map;
 
 import org.apache.pulsar.client.api.Authentication;
@@ -41,6 +42,11 @@ public class AuthenticationTls implements Authentication, EncodedAuthenticationP
     private String certFilePath;
     private String keyFilePath;
 
+    // Load Bouncy Castle
+    static {
+        Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
+    }
+    
     public AuthenticationTls() {
     }