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
cd4994ca
Commit
cd4994ca
authored
Mar 10, 2016
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #558 from guusdk/master
Prevent occasional failure of CheckChainTrustedTest
parents
e464bb87
3ed99368
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
OpenfireX509TrustManager.java
...esoftware/openfire/keystore/OpenfireX509TrustManager.java
+4
-0
KeystoreTestUtils.java
...org/jivesoftware/openfire/keystore/KeystoreTestUtils.java
+4
-4
No files found.
src/java/org/jivesoftware/openfire/keystore/OpenfireX509TrustManager.java
View file @
cd4994ca
...
...
@@ -267,6 +267,10 @@ public class OpenfireX509TrustManager implements X509TrustManager
// This exception generally isn't very helpful. This block attempts to print more debug information.
try
{
Log
.
debug
(
"** Accepted Issuers (trust anchors, \"root CA's\"):"
);
for
(
X509Certificate
acceptedIssuer
:
acceptedIssuers
)
{
Log
.
debug
(
" - "
+
acceptedIssuer
.
getSubjectDN
()
+
"/"
+
acceptedIssuer
.
getIssuerDN
()
);
}
Log
.
debug
(
"** Chain to be validated:"
);
Log
.
debug
(
" length: "
+
chain
.
length
);
for
(
int
i
=
0
;
i
<
chain
.
length
;
i
++)
{
...
...
src/test/java/org/jivesoftware/openfire/keystore/KeystoreTestUtils.java
View file @
cd4994ca
...
...
@@ -41,7 +41,7 @@ public class KeystoreTestUtils
private
static
final
Provider
PROVIDER
=
new
BouncyCastleProvider
();
private
static
final
Object
BEGIN_CERT
=
"-----BEGIN CERTIFICATE-----"
;
private
static
final
Object
END_CERT
=
"-----END CERTIFICATE-----"
;
static
{
// Add the BC provider to the list of security providers
...
...
@@ -164,9 +164,9 @@ public class KeystoreTestUtils
private
static
X509Certificate
generateTestCertificate
(
final
boolean
isValid
,
final
KeyPair
issuerKeyPair
,
final
KeyPair
subjectKeyPair
,
int
indexAwayFromEndEntity
)
throws
Exception
{
// Issuer and Subject
final
X500Name
subject
=
new
X500Name
(
"CN=
MyName"
+
subjectKeyPair
.
getPublic
().
hashCode
(
)
);
final
X500Name
issuer
=
new
X500Name
(
"CN=
MyName"
+
issuerKeyPair
.
getPublic
().
hashCode
(
)
);
// Issuer and Subject
.
final
X500Name
subject
=
new
X500Name
(
"CN=
"
+
Base64
.
encodeBytes
(
subjectKeyPair
.
getPublic
().
getEncoded
(),
Base64
.
URL_SAFE
)
);
final
X500Name
issuer
=
new
X500Name
(
"CN=
"
+
Base64
.
encodeBytes
(
issuerKeyPair
.
getPublic
().
getEncoded
(),
Base64
.
URL_SAFE
)
);
// Validity
final
Date
notBefore
;
...
...
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