Skip to content

Commit 27d70db

Browse files
committed
fix
1 parent bd9ea42 commit 27d70db

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

GitlabSnippets.zip

-951 Bytes
Binary file not shown.

src/org/openactive/gitlab/snippet/SnippetCreate.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,7 @@ private String post( String text, String fileName, VirtualFile[] files) throws E
148148
StringEntity ent = new StringEntity( data, ContentType.APPLICATION_JSON );
149149
post.setEntity( ent );
150150

151-
SSLContextBuilder builderssl = new SSLContextBuilder();
152-
builderssl.loadTrustMaterial(null, new TrustStrategy() {
153-
@Override
154-
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
155-
return true;
156-
}
157-
});
158-
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builderssl.build(),
159-
SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
160-
161-
162-
try ( CloseableHttpClient client = HttpClients.custom().setSSLSocketFactory(sslsf).build() )
151+
try ( CloseableHttpClient client = HttpClients.createDefault() )
163152
{
164153
resp = client.execute( post );
165154
byte[] buff = new byte[1024];

0 commit comments

Comments
 (0)