mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-05 23:30:02 +01:00
fix TLS/SSL LDAP under IBM JVM (#2472)
Co-authored-by: Hirohisa Yamaguchi <umq@ueo.co.jp>
This commit is contained in:
committed by
GitHub
parent
c15d69d566
commit
501cbf54ab
@@ -127,8 +127,14 @@ object LDAPUtil {
|
||||
private def getSslProvider(): Provider = {
|
||||
val cachedInstance = provider.get()
|
||||
if (cachedInstance == null) {
|
||||
val newInstance = Class
|
||||
.forName("com.sun.net.ssl.internal.ssl.Provider")
|
||||
val cls = try {
|
||||
Class.forName("com.sun.net.ssl.internal.ssl.Provider")
|
||||
} catch {
|
||||
case e: ClassNotFoundException =>
|
||||
Class.forName("com.ibm.jsse.IBMJSSEProvider")
|
||||
case e: Throwable => throw e
|
||||
}
|
||||
val newInstance = cls
|
||||
.getDeclaredConstructor()
|
||||
.newInstance()
|
||||
.asInstanceOf[Provider]
|
||||
|
||||
Reference in New Issue
Block a user