OSLC Workshop with RTC 5.0 (SSLPeerUniverifiedException)
![](http://jazz.net/_images/myphoto/20a58527dff9bd5593fbe53cf47adea9.jpg)
・Open Services for Lifecycle Collaboration Workshop
https://jazz.net/library/article/635
https://jazz.net/wiki/bin/view/Main/OSLCWorkshopDownload
With RTC 4.0.2, it worked.
But with RTC 5.0 , I got SSLPeerUnverifiedException (detail see below).
・Server: RTC 5.0 (Express Setup)
- recreated self-certification after installed
・Client: RTC IDE Client
Is there any information about this error?
Is OSLC workshop example compatible with CLM 5.0?
If it isn't compatible, is there any OSLC java sample for CLM 5.0?
SSLPeerUnverifiedException detail:
>> Example01: Accessing Root Services document with HttpClient
- Root Services URI: https://jazz-server:9443/ccm/rootservices
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.ibm.jsse2.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:177)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:339)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
at net.jazz.oslc.consumer.examples.Example01.main(Example01.java:52)
Accepted answer
![](http://jazz.net/_images/myphoto/20a58527dff9bd5593fbe53cf47adea9.jpg)
sc = SSLContext.getInstance("SSL"); //$NON-NLS-1$to
sc = SSLContext.getInstance("TLSv1"); //$NON-NLS-1$With this change, the code should still work with CLM 4.0.x server since it supports both SSLv3 and TLSv1.
2 other answers
![](http://jazz.net/_images/myphoto/20a58527dff9bd5593fbe53cf47adea9.jpg)
The sample code bundles Apache HTTP Client library 4.0.1 and works for me. Did you use a different version of that library?
Comments
![](http://jazz.net/_images/myphoto/20a58527dff9bd5593fbe53cf47adea9.jpg)
Thank you for your response.
>The sample code bundles Apache HTTP Client library 4.0.1 and works for me. Did you use a different version of that library?
I also use Apache HTTP Client library 4.0.1 bundled with workshop.
![](http://jazz.net/_images/myphoto/0227396f4efb17d0baa0c12dd70df878.jpg)
That's a bit strange. You can use another HTTPS connection for testing. It does not need to be Jazz server. Just pick a secure connection with an unverified certificate (most self-signed certificates fall into this category). If the problem can still be reproduced, you have to debug a bit further, probably on Appache HTTP Client.
![](http://jazz.net/_images/myphoto/5f3620db84c169ad66de7dda27f193a2.jpg)
@Dnong I tried with CLM 4.0.2 and 4.0.6 no problem. but CLM 5.0 have still same error. I am also using Apache HTTP Client library 4.0.1 bundled with workshop.
![](http://jazz.net/_images/myphoto/0227396f4efb17d0baa0c12dd70df878.jpg)
I can actually see the same error in my CLM 5.0 environment now for some reason. I analyzed the network trace using Wireshark and found out that the Java application actually communicated with the CLM 5.0 server (GET versionCompatibility) before being kicked out by the server (it seems).
The curious thing is CLM 4.0.6 and CLM 5.0 actually use the same certificate if the bundled Tomcat is used.
Some more digging is still required.
![](http://jazz.net/_images/myphoto/20a58527dff9bd5593fbe53cf47adea9.jpg)
At first, you export a key by using your browser, or by executing keytool on the server side.
To import a server's key to the client key store using keytool, here is the sample command;
keytool -import -trustcacerts -file <your-server's-certificate-pass> -alias clm50ca -keystore ..\lib\security\cacertsNote that backing up the key store is recommended, and default key store password is "changeit".