Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
8336695f
Commit
8336695f
authored
May 05, 2017
by
Greg Messner
Browse files
Cleaned up setIgnoreCerificateErrors().
parent
b1a89968
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/GitLabApiClient.java
View file @
8336695f
...
...
@@ -122,19 +122,21 @@ public class GitLabApiClient {
return
;
}
if
(
ignoreCertificateErrors
==
false
)
{
if
(!
ignoreCertificateErrors
)
{
GitLabApiClient
.
ignoreCertificateErrors
=
false
;
HttpsURLConnection
.
setDefaultSSLSocketFactory
(
GitLabApiClient
.
defaultSocketFactory
);
return
;
}
}
else
{
SSLSocketFactory
defaultSocketFactory
=
HttpsURLConnection
.
getDefaultSSLSocketFactory
();
SSLSocketFactory
defaultSocketFactory
=
HttpsURLConnection
.
getDefaultSSLSocketFactory
();
if
(
ignoreCertificateErrors
()
==
true
)
{
GitLabApiClient
.
ignoreCertificateErrors
=
true
;
GitLabApiClient
.
defaultSocketFactory
=
defaultSocketFactory
;
}
else
{
throw
new
RuntimeException
(
"Unable to ignore certificate errors."
);
if
(
ignoreCertificateErrors
())
{
GitLabApiClient
.
ignoreCertificateErrors
=
true
;
GitLabApiClient
.
defaultSocketFactory
=
defaultSocketFactory
;
}
else
{
throw
new
RuntimeException
(
"Unable to ignore certificate errors."
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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