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
4437950b
Commit
4437950b
authored
Nov 17, 2015
by
Tom Evans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup connection logging, etc.
Also remove dependency for sun.security.provider.* package
parent
fbe74c8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
SocketConnection.java
src/java/org/jivesoftware/openfire/net/SocketConnection.java
+1
-1
TrustStoreConfigTest.java
.../jivesoftware/openfire/keystore/TrustStoreConfigTest.java
+24
-13
No files found.
src/java/org/jivesoftware/openfire/net/SocketConnection.java
View file @
4437950b
...
...
@@ -497,7 +497,7 @@ public class SocketConnection implements Connection {
writer
.
flush
();
}
catch
(
Exception
e
)
{
Log
.
error
(
"Failed to deliver stream close tag: "
+
e
.
getMessage
());
Log
.
debug
(
"Failed to deliver stream close tag: "
+
e
.
getMessage
());
}
// Register that we finished sending data on the connection
...
...
src/test/java/org/jivesoftware/openfire/keystore/TrustStoreConfigTest.java
View file @
4437950b
package
org
.
jivesoftware
.
openfire
.
keystore
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.math.BigInteger
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.security.KeyPair
;
import
java.security.KeyPairGenerator
;
import
java.security.KeyStore
;
import
java.security.Provider
;
import
java.security.SecureRandom
;
import
java.security.Security
;
import
java.security.cert.TrustAnchor
;
import
java.security.cert.X509Certificate
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.UUID
;
import
org.bouncycastle.jce.X509Principal
;
import
org.bouncycastle.jce.provider.BouncyCastleProvider
;
import
org.bouncycastle.x509.X509V3CertificateGenerator
;
...
...
@@ -8,17 +28,6 @@ import org.junit.After;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Test
;
import
sun.security.provider.X509Factory
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.math.BigInteger
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.security.*
;
import
java.security.cert.TrustAnchor
;
import
java.security.cert.X509Certificate
;
import
java.util.*
;
/**
* Unit tests that verify the functionality of {@link TrustStoreConfig}.
...
...
@@ -28,6 +37,8 @@ import java.util.*;
public
class
TrustStoreConfigTest
{
private
static
final
Provider
PROVIDER
=
new
BouncyCastleProvider
();
private
static
final
Object
BEGIN_CERT
=
"-----BEGIN CERTIFICATE-----"
;
private
static
final
Object
END_CERT
=
"-----END CERTIFICATE-----"
;
static
{
...
...
@@ -94,9 +105,9 @@ public class TrustStoreConfigTest
private
static
String
toPEM
(
X509Certificate
certificate
)
throws
Exception
{
final
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
X509Factory
.
BEGIN_CERT
).
append
(
'\n'
);
sb
.
append
(
BEGIN_CERT
).
append
(
'\n'
);
sb
.
append
(
Base64
.
encodeBytes
(
certificate
.
getEncoded
()
)
).
append
(
'\n'
);
sb
.
append
(
X509Factory
.
END_CERT
).
append
(
'\n'
);
sb
.
append
(
END_CERT
).
append
(
'\n'
);
return
sb
.
toString
();
}
...
...
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