<commit_before>package com.youcruit.onfido.api.http;

import java.io.IOException;
import java.net.URI;
import java.util.Collections;
import java.util.Map;
import java.util.regex.Pattern;

import javax.annotation.concurrent.ThreadSafe;

import com.google.gson.Gson;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.CipherSuite;
import okhttp3.ConnectionSpec;
import okhttp3.ConnectionSpec.Builder;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.TlsVersion;
import okio.ByteString;

@ThreadSafe
public class OkHttpOnfidoClient extends AbstractOnfidoHttpClient<Response> {
    private static final Pattern HOST_MATCHER = Pattern.compile("(.*\\.|)onfido.com");

    private final OkHttpClient client;
    private static final MediaType JSON = MediaType.parse("application/json");
    private final Map<String, String> headersToReplace;

    private OkHttpClient createOkClient() {
	OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder();
	ConnectionSpec sslConnectionSpec = new Builder(ConnectionSpec.MODERN_TLS)
		.tlsVersions(TlsVersion.TLS_1_2)
		.cipherSuites(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
			CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
			CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, CipherSuite.TLS_DHE_RSA_WITH_AES_256_CBC_SHA)

		.build();
	okHttpClient.connectionSpecs(Collections.singletonList(sslConnectionSpec));
	okHttpClient.addInterceptor(new HeaderAdder());
	return okHttpClient.build();
    }<commit_msg>Upgrade allowed cipher suites<commit_after>package com.youcruit.onfido.api.http;

import java.io.IOException;
import java.net.URI;
import java.util.Collections;
import java.util.Map;
import java.util.regex.Pattern;

import javax.annotation.concurrent.ThreadSafe;

import com.google.gson.Gson;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.CipherSuite;
import okhttp3.ConnectionSpec;
import okhttp3.ConnectionSpec.Builder;
import okhttp3.HttpUrl;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.TlsVersion;
import okio.ByteString;

@ThreadSafe
public class OkHttpOnfidoClient extends AbstractOnfidoHttpClient<Response> {
    private static final Pattern HOST_MATCHER = Pattern.compile("(.*\\.|)onfido.com");

    private final OkHttpClient client;
    private static final MediaType JSON = MediaType.parse("application/json");
    private final Map<String, String> headersToReplace;

    private OkHttpClient createOkClient() {
	OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder();
	ConnectionSpec sslConnectionSpec = new Builder(ConnectionSpec.MODERN_TLS)
		.tlsVersions(TlsVersion.TLS_1_2)
		.cipherSuites(CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
			CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
			CipherSuite.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
			CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256)

		.build();
	okHttpClient.connectionSpecs(Collections.singletonList(sslConnectionSpec));
	okHttpClient.addInterceptor(new HeaderAdder());
	return okHttpClient.build();
    }
{'fraction_non_alphanumeric': 0.08703481392557023, 'fraction_numerical': 0.023109243697478993, 'mean_word_length': 6.805620608899297, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2655462', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1091, 'n_words': 193}