Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamouh committed Oct 11, 2018
1 parent bd9ea42 commit 27d70db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Binary file modified GitlabSnippets.zip
Binary file not shown.
13 changes: 1 addition & 12 deletions src/org/openactive/gitlab/snippet/SnippetCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,7 @@ private String post( String text, String fileName, VirtualFile[] files) throws E
StringEntity ent = new StringEntity( data, ContentType.APPLICATION_JSON );
post.setEntity( ent );

SSLContextBuilder builderssl = new SSLContextBuilder();
builderssl.loadTrustMaterial(null, new TrustStrategy() {
@Override
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
return true;
}
});
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builderssl.build(),
SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);


try ( CloseableHttpClient client = HttpClients.custom().setSSLSocketFactory(sslsf).build() )
try ( CloseableHttpClient client = HttpClients.createDefault() )
{
resp = client.execute( post );
byte[] buff = new byte[1024];
Expand Down

0 comments on commit 27d70db

Please sign in to comment.