0

Someone PLEASE HELP! I am going crazy searching for ssl.SslContextFactory.

History: - Am using artifactory2.66 which uses jetty 7.02 ( I can't use higher version of artifactory because of java 1.7 dependency) - To make artifactory run as https, I did the following:

 <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ssl.SslSocketConnector"> <Set name="Port">8443</Set> <Set name="maxIdleTime">30000</Set> <Set name="keystore">/amyhomedir/artifactory/etc/keystore</Set> <Set name="password">password</Set> <Set name="keyPassword">password</Set> </New> </Arg> </Call> 

This worked but my jenkins did not recognize the new http url and threw "Error occurred while requesting version information: peer not authenticated". I wondered if this is due to depricated methods of ssl.SslSocketConnector and decided to use the following code as per this

 <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector"> <Arg> <New class="org.eclipse.jetty.http.ssl.SslContextFactory"> <Set name="keyStore"><SystemProperty name="jetty.home" default="." />/etc/keystore</Set> <Set name="keyStorePassword">mypassword</Set> <Set name="keyManagerPassword">mypassword</Set> <Set name="trustStore"><SystemProperty name="jetty.home" default="." />/etc/keystore</Set> <Set name="trustStorePassword">mypassword</Set> </New> </Arg> <Set name="port">8443</Set> <Set name="maxIdleTime">30000</Set> </New> </Arg> </Call> 

But I always get class not found exception for ssl.SslContextFactory.. I also tried util.ssl.SslContextFactory.. Nothing works! I am not able to find out the correct ssl.SslContextFactory... Please help!

4
  • 1
    My guess would be that Jenkins is using a version of Apache HTTP Client that has the problem described in this question, i.e. you get this error because the client connecting to your repository isn't configured to trust its certificate. AFAIK the SslContextFactory is for later versions of Jetty, effectively replacing the settings you already have. I'd try to make your client (whatever is running within Jetty) trust your server certificate instead. Commented Jul 24, 2014 at 20:32
  • Thanks Bruno. I am trying that route too. its another nightmare! Commented Jul 24, 2014 at 21:04
  • 2
    Importing your server certificate into your the cacerts file of the JRE used by your Jenkins installation should do. Commented Jul 24, 2014 at 21:23
  • Thanks. I did it and it worked. Do you want to leave your comment as an answer so that I could choose your answer as the solution to my question? Commented Jul 28, 2014 at 20:20

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.