import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
-import javax.ws.rs.HttpMethod;
import org.apache.commons.codec.binary.Base64;
import org.onap.ccsdk.sli.adaptors.aai.AAIService.TransactionIdTracker;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.client.urlconnection.HTTPSProperties;
import org.apache.http.impl.EnglishReasonPhraseCatalog;
/**
if(keystorePath != null && keystorePassword != null && (new File(keystorePath)).exists())
{
- DefaultClientConfig config = new DefaultClientConfig();
//both jersey and HttpURLConnection can use this
SSLContext ctx = null;
try {
}
ctx.init(kmf.getKeyManagers(), null, null);
- config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties( new HostnameVerifier() {
- @Override
- public boolean verify( String s, SSLSession sslSession ) {
- return ignoreCertificateHostError;
- }
- }, ctx));
CTX = ctx;
LOG.debug("SSLContext created");
responseMessage = con.getResponseMessage();
} catch(Exception exc) {
responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null);
+ } finally {
if(responseMessage == null)
responseMessage = NOT_PROVIDED;
}
responseMessage = con.getResponseMessage();
} catch(Exception exc) {
responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null);
+ } finally {
if(responseMessage == null)
responseMessage = NOT_PROVIDED;
}
responseMessage = conn.getResponseMessage();
} catch(Exception exc) {
responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null);
+ } finally {
if(responseMessage == null)
responseMessage = NOT_PROVIDED;
}
responseMessage = con.getResponseMessage();
} catch(Exception exc) {
responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null);
+ } finally {
if(responseMessage == null)
responseMessage = NOT_PROVIDED;
}
responseMessage = con.getResponseMessage();
} catch(Exception exc) {
responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null);
+ } finally {
if(responseMessage == null)
responseMessage = NOT_PROVIDED;
}