Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
曲欣亮
sap-service
Commits
7700a15d
Commit
7700a15d
authored
Aug 14, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
844954fc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
SapServiceApplication.java
src/main/java/com/egolm/sso/SapServiceApplication.java
+2
-2
SAPTrustManager.java
src/main/java/com/egolm/sso/util/SAPTrustManager.java
+3
-3
No files found.
src/main/java/com/egolm/sso/SapServiceApplication.java
View file @
7700a15d
...
...
@@ -10,7 +10,7 @@ import org.springframework.context.ApplicationContext;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
com.egolm.sso.util.
My
TrustManager
;
import
com.egolm.sso.util.
SAP
TrustManager
;
@EnableScheduling
@SpringBootApplication
...
...
@@ -21,7 +21,7 @@ public class SapServiceApplication {
public
static
void
main
(
String
[]
args
)
throws
KeyManagementException
,
NoSuchAlgorithmException
{
TimeZone
.
setDefault
(
TimeZone
.
getTimeZone
(
"GMT+8"
));
My
TrustManager
.
trustAllHttpsCertificates
();
SAP
TrustManager
.
trustAllHttpsCertificates
();
applicationContext
=
SpringApplication
.
run
(
SapServiceApplication
.
class
,
args
);
}
...
...
src/main/java/com/egolm/sso/util/
My
TrustManager.java
→
src/main/java/com/egolm/sso/util/
SAP
TrustManager.java
View file @
7700a15d
...
...
@@ -10,13 +10,13 @@ import javax.net.ssl.SSLSession;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
public
class
My
TrustManager
implements
javax
.
net
.
ssl
.
TrustManager
,
javax
.
net
.
ssl
.
X509TrustManager
{
public
class
SAP
TrustManager
implements
javax
.
net
.
ssl
.
TrustManager
,
javax
.
net
.
ssl
.
X509TrustManager
{
private
final
static
Log
logger
=
LogFactory
.
getLog
(
My
TrustManager
.
class
);
private
final
static
Log
logger
=
LogFactory
.
getLog
(
SAP
TrustManager
.
class
);
public
static
void
trustAllHttpsCertificates
()
throws
NoSuchAlgorithmException
,
KeyManagementException
{
javax
.
net
.
ssl
.
TrustManager
[]
trustAllCerts
=
new
javax
.
net
.
ssl
.
TrustManager
[
1
];
javax
.
net
.
ssl
.
TrustManager
tm
=
new
My
TrustManager
();
javax
.
net
.
ssl
.
TrustManager
tm
=
new
SAP
TrustManager
();
trustAllCerts
[
0
]
=
tm
;
javax
.
net
.
ssl
.
SSLContext
sc
=
javax
.
net
.
ssl
.
SSLContext
.
getInstance
(
"SSL"
);
sc
.
init
(
null
,
trustAllCerts
,
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