Jenkins & Katalon Certificate Problems

I am currently trying to run my katalon studio projekt in jenkins.
I came across the following problem:
I have a certificate that i absolutely need, I have included this in Katalon Studio unter the project settings.
But in Jenkins I get an error that the password is wrong, which I can rule out.

I already tried to set the certificate via groovy but it did not work either
[ System.setProperty(“Djavax.net.ssl.trustStore”, GlobalVariable.Certificate);
System.setProperty(“Djavax.net.ssl.trustStorePassword”, “password”); ]

But I get an Error:
org.apache.commons.ssl.ProbablyBadPasswordException: Probably bad JKS-Key password: java.security.UnrecoverableKeyException: Password must not be null

The certificate itself works at my normal Katalon project.

Side-question:
Is there a way to access the project-settings via groovy ?

Hi @Eric.Springer,
What in the screenshot is the configuration for client certificate. Did you mistake server certificate with client certificate?

The configuration in the screenshot is the certificate i have in my browser and with that settings, my katalon studio project works locally on my windows machine.
But the project fails at my linux jenkins server.

Is it possible to set the sertificate via groovy ?

Also I found in die API com.kms.katalon.core.model.SSLClientCertificateSettings.
How can I set the certificate with groovy ?

Hi @Eric.Springer,
The certificate you set in your browser is for server certificates. For Groovy, you can set it via System.setProperty(“javax.net.ssl.trustStore”) and System.setProperty(“javax.net.ssl.trustStorePassword”) (Remember not to include “D” letter at the beginning of the property)

Hello huynguyen,

thank you for your help.
System.setProperty(“javax.net.ssl.trustStore”) somehow doesn’t work for me, only if I set the certificate in the project settings.

If I understand that correctly System.setProperty(“javax.net.ssl.trustStore”) requires a path to the certificate as a seccond argument right ?

Also com.kms.katalon.core.model.SSLClientCertificateSettings has a method to set the certificate via groovy but I don’t know how to correctly use the method because:
if I create a new instance of SSLClientCertificateSettings, the setKeyStoreFile() & *Password() has no effect.

What is the correct way to use SSLClientCertificateSettings ?

Hi @Eric.Springer,
If you don’t set the client certificate settings in Project > Settings, what will happen?

If I run my tests without the setting enabled (fields empty), the test fails because I can’t access my data without the certificate.

Hello Eric,
I am facing the same problem, in Katalon Studio the tests with the certificates are running, in Jenkins they are not. Could you find a solution? I would be very grateful if you could share it