I would like to recover some data from HTTPS url.
I build a Flow Service which use “pub.client.http” to connect.
I have also add the client certificate in IS server which i had from the website.
The problem is when i execute my flow service i have this message :
I built an independant program in Eclipse which do the same things.
I succeeded to connect to my HTTPS url.
I have read somewhere that, we must change a properties on IS server like this :
java -Djsse.enableSNIExtension=false yourClass
But i don’t know where to change this property ? In which files ?
Please note that TLSv1.1 and TLSv1.2 will only work with JVM 7 and newer and only when the target server port is configured to use JSSE instead of Entrust. Entrust is the default for most recent webMethods versions.
Hi rmg,
Thanks for your reply.
I set value of UseJSSE at true for pub.client.http
With a basic program in java which run on my computer (no on the server) i have no problem…
Here a sample of my code :
URL url;
String targetURL = TARGET_URL;
System.setProperty("jsse.enableSNIExtension", "false");
System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
url = new URL(targetURL);
KeyStore ks = KeyStore.getInstance("PKCS12");
FileInputStream fis = new FileInputStream(CERTIFACATE_FILE);
ks.load(fis, CERTIFACATE_PASS.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, CERTIFACATE_PASS.toCharArray());
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(kmf.getKeyManagers(), null, null);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
if (con instanceof HttpsURLConnection) {
((HttpsURLConnection)con)
.setSSLSocketFactory(sc.getSocketFactory());
}
/*add Request header*/
con.setRequestMethod("POST");
con.setRequestProperty("User-Agent", USER_AGENT);
// Send post request
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(URL_PARAMETERS);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
I add JAVA_CUSTOM_OPTS in this parts of custom_wrapper.conf (see the 1st attachment), that is correct ?.
Nothing change after a restart of IS
The only i can say is with my java program when i remove this line System.setProperty(“jsse.enableSNIExtension”, “false”); , i have the same error as on the wM Server :
Exception in thread “main” javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
My client provide me a certificate in PKCS12 format.
Hi Holger
I run server as windows service.
When i want to update the service, i have this message (1st attachment).
I don’t find official documentations on how to restart application service.