Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
83c47b30
Commit
83c47b30
authored
Mar 05, 2018
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1191: Use client truststores for c2s-type connections.
parent
d727b51c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
CertificateStoreManager.java
...vesoftware/openfire/keystore/CertificateStoreManager.java
+13
-1
No files found.
src/java/org/jivesoftware/openfire/keystore/CertificateStoreManager.java
View file @
83c47b30
package
org
.
jivesoftware
.
openfire
.
keystore
;
package
org
.
jivesoftware
.
openfire
.
keystore
;
import
org.bouncycastle.bcpg.ElGamalSecretBCPGKey
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.container.BasicModule
;
import
org.jivesoftware.openfire.container.BasicModule
;
import
org.jivesoftware.openfire.spi.ConnectionListener
;
import
org.jivesoftware.openfire.spi.ConnectionListener
;
...
@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
...
@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.ConcurrentMap
;
...
@@ -349,7 +351,17 @@ public class CertificateStoreManager extends BasicModule
...
@@ -349,7 +351,17 @@ public class CertificateStoreManager extends BasicModule
static
String
getTrustStoreLocation
(
ConnectionType
type
)
static
String
getTrustStoreLocation
(
ConnectionType
type
)
{
{
final
String
propertyName
=
type
.
getPrefix
()
+
"truststore"
;
final
String
propertyName
=
type
.
getPrefix
()
+
"truststore"
;
final
String
defaultValue
=
"resources"
+
File
.
separator
+
"security"
+
File
.
separator
+
"truststore"
;
final
String
defaultValue
;
// OF-1191: For client-oriented connection types, Openfire traditionally uses a different truststore.
if
(
Arrays
.
asList
(
ConnectionType
.
SOCKET_C2S
,
ConnectionType
.
BOSH_C2S
,
ConnectionType
.
WEBADMIN
).
contains
(
type
)
)
{
defaultValue
=
"resources"
+
File
.
separator
+
"security"
+
File
.
separator
+
"client.truststore"
;
}
else
{
defaultValue
=
"resources"
+
File
.
separator
+
"security"
+
File
.
separator
+
"truststore"
;
}
if
(
type
.
getFallback
()
==
null
)
if
(
type
.
getFallback
()
==
null
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment