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
cdd9ac28
Commit
cdd9ac28
authored
Nov 21, 2015
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused SSLJiveTrustManager.java
parent
4c2ba34e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
80 deletions
+0
-80
SSLJiveTrustManager.java
...va/org/jivesoftware/openfire/net/SSLJiveTrustManager.java
+0
-80
No files found.
src/java/org/jivesoftware/openfire/net/SSLJiveTrustManager.java
deleted
100644 → 0
View file @
4c2ba34e
/**
* $RCSfile$
* $Revision: 128 $
* $Date: 2004-10-25 20:42:00 -0300 (Mon, 25 Oct 2004) $
*
* Copyright (C) 2004-2008 Jive Software. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
jivesoftware
.
openfire
.
net
;
import
java.security.cert.CertificateExpiredException
;
import
java.security.cert.CertificateNotYetValidException
;
import
java.security.cert.X509Certificate
;
import
org.jivesoftware.util.LocaleUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.net.ssl.X509TrustManager
;
/**
* Trust manager which accepts certificates without any validation
* except date validation.
* <p>
* A skeleton placeholder for developers wishing to implement their own custom
* trust manager. In future revisions we may expand the skeleton code if customers
* request assistance in creating custom trust managers.</p>
* <p>
* You only need a trust manager if your server will require clients
* to authenticated with the server (typically only the server authenticates
* with the client).</p>
*
* @author Iain Shigeoka
*/
public
class
SSLJiveTrustManager
implements
X509TrustManager
{
private
static
final
Logger
Log
=
LoggerFactory
.
getLogger
(
SSLJiveTrustManager
.
class
);
@Override
public
void
checkClientTrusted
(
X509Certificate
[]
chain
,
String
authType
)
{
}
@Override
public
void
checkServerTrusted
(
X509Certificate
[]
chain
,
String
authType
)
{
}
public
boolean
isClientTrusted
(
X509Certificate
[]
x509Certificates
)
{
return
true
;
}
public
boolean
isServerTrusted
(
X509Certificate
[]
x509Certificates
)
{
boolean
trusted
=
true
;
try
{
x509Certificates
[
0
].
checkValidity
();
}
catch
(
CertificateExpiredException
|
CertificateNotYetValidException
e
)
{
Log
.
error
(
LocaleUtils
.
getLocalizedString
(
"admin.error"
),
e
);
trusted
=
false
;
}
return
trusted
;
}
@Override
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
new
X509Certificate
[
0
];
}
}
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