setEntityJson(httpRequest, request);
return doJsonRequest(httpRequest, RegisterResponse.class);
}
private HttpClient getHttpClient(CertificateAndKey certificateAndKey) {
SimpleClientCertificateKeyManager keyManager = new SimpleClientCertificateKeyManager(certificateAndKey);
SslConfiguration sslConfiguration = getHttpClient().getSslConfiguration().copyWithNewKeyManager(keyManager);
HttpClient httpClient = getHttpClient().withSsl(sslConfiguration);
return httpClient;
}