Enable SSL in Jenkin without using a key store password

 

Enable SSL in Jenkin without using a key store password on Windows Operating System


          Use Jenkins start-up parameters --httpsPort --httpsCertificate –httpsPrivateKey

      Request New certificate and Password from Support Team or generate with 3rd Party Vendor. Certificate need to be in .pfx format.

    Copy the newly created .pfx file to any location on the server.

     Install OpenSSL on the Server.

    Open the Command Prompt and got to “C:\Program Files\cURL” & Run the below command one by one.

·         Extract private key

            openssl pkcs12 -in "C:\Temp\Certificate\Certificate\<certName>.pfx" -nocerts -nodes -out "C:\Temp\Certificate\Certificate\<private KeyName>.key"

             Enter password when prompted.

 

·         Extract certificate

            openssl pkcs12 -in "C:\Temp\Certificate\Certificate\<certName>.pfx" -nokeys -out "C:\Temp\Certificate\Certificate\<certName>..crt"

 Enter password when prompted.

 

·         Convert PKCS #8 private key to PKCS #1 private key

            openssl rsa -in "C:\Temp\Certificate\Certificate\<privateKeyName>.key" -out "C:\Temp\Certificate\Certificate\<private.pk1>.key"

·         Update PKCS #1 private key for Jenkins start-up parameter

1.  Go to path C:\Program Files (x86)\Jenkins and Edit the jenkin.xml file.

                     2.  Go to the below line

            <arguments>-Xrs -Xmx512m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle  -Dhudson.slaves.ChannelPinger.pingInterval=1  -jar "%BASE%\jenkins.war" --webroot="%BASE%\war" --httpPort=-1 --httpsPort=443 --httpsCertificate="C:\Temp\Certificate\Certificate\certificate.crt" --httpsPrivateKey="C:\Temp\Certificate\Certificate\private.pk1.key" </arguments>

 

                    3. Change the new generated .crt and .key Path like below on the argument parameter.

                  --httpsCertificate="C:\Temp\Certificate\Certificate\certificate.crt"

                  --httpsPrivateKey="C:\Temp\Certificate\Certificate\private.pk1.key"

 

  •    Restart the Jenkin services.

 Note : Change the certificate path based on .pfx file location.

 




Comments

Popular posts from this blog

System Administrator

Get Free Microsoft Certification Exams Vouchers