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
9107ba23
Commit
9107ba23
authored
Jun 06, 2014
by
Dave Cridland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-405 Comments from Sven Bunge addressed
parent
b1c84166
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
CertificateManager.java
src/java/org/jivesoftware/util/CertificateManager.java
+5
-3
No files found.
src/java/org/jivesoftware/util/CertificateManager.java
View file @
9107ba23
...
@@ -227,7 +227,9 @@ public class CertificateManager {
...
@@ -227,7 +227,9 @@ public class CertificateManager {
* For certain failures, we SHOULD generate an exception - revocations and the like,
* For certain failures, we SHOULD generate an exception - revocations and the like,
* but we currently do not.
* but we currently do not.
*
*
* @param certChain an array of X509Certificate where the first one is the endEntityCertificate.
* @param chain an array of X509Certificate where the first one is the endEntityCertificate.
* @param certStore a keystore containing untrusted certificates (including ICAs, etc).
* @param trustStore a keystore containing Trust Anchors (most-trusted CA certificates).
* @return trusted end-entity certificate, or null.
* @return trusted end-entity certificate, or null.
*/
*/
public
static
X509Certificate
getEndEntityCertificate
(
Certificate
chain
[],
public
static
X509Certificate
getEndEntityCertificate
(
Certificate
chain
[],
...
@@ -255,7 +257,7 @@ public class CertificateManager {
...
@@ -255,7 +257,7 @@ public class CertificateManager {
}
}
return
null
;
return
null
;
}
}
ArrayList
<
Object
>
all_certs
=
new
ArrayList
<
Object
>();
final
List
<
Certificate
>
all_certs
=
new
ArrayList
<
Certificate
>();
try
{
try
{
// First, load up certStore contents into a CertStore.
// First, load up certStore contents into a CertStore.
// It's a mystery why these objects are different.
// It's a mystery why these objects are different.
...
@@ -278,7 +280,7 @@ public class CertificateManager {
...
@@ -278,7 +280,7 @@ public class CertificateManager {
all_certs
.
add
(
cert
);
all_certs
.
add
(
cert
);
}
}
}
}
// Finally, add all the certs in the chain
except the first
:
// Finally, add all the certs in the chain:
for
(
int
i
=
0
;
i
<
chain
.
length
;
++
i
)
{
for
(
int
i
=
0
;
i
<
chain
.
length
;
++
i
)
{
all_certs
.
add
(
chain
[
i
]);
all_certs
.
add
(
chain
[
i
]);
}
}
...
...
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