18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

IE shows certificate error as 'sahi.example.com' has expired

SudhakarSudhakar Members
edited November -1 in Sahi - Open Source
Hi all,

I have created certificate for sahi.example.com and also for my app.i ran my suite and it worked fine for me before 1 month.
but when i tried to run my suite IE shows certificate error and shows error as

"This certificate has expired or is not yet valid".
Issued to : sahi.example.com
Issues by : sahi.example.com
valid from 3/25/2009 to 6/23/2009.

I thought that sahi.example.com has expired and tried creating new certificate for sahi.example.com by using below keytool command.

"keytool -genkey -alias sahi.example.com -keypass sahipassword -storepass password -keyalg RSA -keystore
D:\shared\Sahi\sahi-src_20090715\sahi\certs\sahi_example_com -dname "CN=sahi.example.com, OU=Sahi, O=Sahi, L=Bangalore, S=Karnataka, C=IN"

But certificate is not getting generated,error showed as password is not valid.
i changed the password to "$password", and created certificate for sahi.example.com.

but when i tried to open the app on the browser, it prompted an error message as page cannot be displayed.

So can anyone suggest me whats wrong in the process.

Thanks,
Sudhakar

Comments

  • narayannarayan Administrators
    Sudhakar,

    If the certificate has expired, delete all the certificates in your certs folder and recreate them. (I need to check why it has expired in 3 months.) If you are changing the password during creation of certificate, make sure you also change ssl.password in config/sahi.properties, because Sahi needs to access that certificate and the password needs to match. I would suggest, clear all your certificates, let Sahi recreate them and accept the certificates again. If you are creating your own certificates, make sure you use the same password for all certificates and use that for ssl.password in sahi.properties.
  • Hi folks
    I don't know if you have already solved this issue.
    This is my solution in order to avoid the 3 months certificate validity limitation.
    Open, using a text editor, the file ssl.txt located in the "config" directory.
    This file should contain a single line with the template for the "keytool" command.
    Add the "-validity" command switch followed by a number: this will the number or days of validity of the certificate.
    Remember that this command will be used by Sahi to generate all certificates ( not only the sahi_example_com).

    Example : Set to 2000 days the validity of certificates
    $keytool -genkey -alias $domain -keypass $password -storepass $password -keyalg RSA -keystore $keystore -validity 2000 -dname "CN=$domain, OU=Sahi, O=Sahi, L=Bangalore, S=Karnataka, C=IN"

    I hope I was useful
  • narayannarayan Administrators
    Thanks Massimo,

    The certificates in the latest build now have a validity of 10 years.

    Regards,
    Narayan
Sign In or Register to comment.