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.

Problems with HTTPS/SSL on Sahi in Windows XP

edited November -1 in Sahi - Open Source
Hi!
I m trying Sahi on Windows XP.
But the last release sahi_20080627.zip cames with the directory /certs empty and the program is not able to generate the certs it needs.
I set the PATH to point correctly to keytool, but it did not work.
I modified the file /config/sahi.properties to put:
keytool.path="C:/Archivos de programa/Java/jre1.6.0_07/bin/keytool"
But it did not work (whitespaces, ",

Comments

  • The keytool.path property doesn't work correctly. It's best to leave it as keytool.exe.

    You need to run the Java keytool.exe manually.

    First, copy the line that looks like this to Notepad or something:

    keytool.exe -genkey -alias login.yahoo.com -keypass sahipassword -storepass sahipassword -keyalg RSA -keystore C:\Documents and Settings\User\Desktop\sahi\certs\login_yahoo_com -dname "CN=login.yahoo.com, OU=Sahi, O=Sahi, L=Bangalore, S=Karnataka, C=IN"

    Next, add quotes around the -keystore parameter so that the command looks like this:

    keytool.exe -genkey -alias login.yahoo.com -keypass sahipassword -storepass sahipassword -keyalg RSA -keystore "C:\Documents and Settings\User\Desktop\sahi\certs\login_yahoo_com" -dname "CN=login.yahoo.com, OU=Sahi, O=Sahi, L=Bangalore, S=Karnataka, C=IN"

    Third, open a command prompt and navigate to your Java/bin directory. It's probably C:\Program Files\Java\bin

    Fourth, copy the command you modified in Notepad and paste it to the command prompt window. Or type it in by hand if you want.

    Last, hit enter to execute the command.

    That should get you going.
  • what must the keystore format be in?
  • Maybe I missunderstand this post, I have a certificate that I already use to authenticate to the website, it is in a pfx format, how do I import this using keytool?
  • I managed to do a conversion to pem and der. This is the error I get, I have tried pfx, der and pem formats:

    keytool error: java.io.IOException: Invalid keystore format
  • Hi i am trying to test Htps site please let me know what i need to do. please tel me the steps so that i can understand easly
  • MagUiMagUi Members
    edited March 2009
    Hi! I had the same problem with certs when I try to use Sahi on my first time on https. The way that I fix the problem was adding the file "keytool.exe" (of Java) on the enrivonment variables of Windows.

    This are the steps for do that:

    1) Do a right click on icon "My Computer" and select "Properties"
    2) On tab "Advanced", click on "Environment Variables" button
    3) On "System Variables", select "Path" and edit
    4) On "Variable value" add in the end of that line (separated with ; ) the path where the file "keytool.exe" is (in my case is "C:\Program Files\Java\j2re1.4.2_03\bin" ).
    5) Click on "ok" of all opened windows.

    Now try to use sahi again.

    Hope that works for you too :)
  • Hi,
    after trying a million of combinations of \,\\,/,',", i found this to be a working solution when you have blanks in your pathname:
    keytool.path=C:\\\\Program Files\\\\Java\\\\jre6\\\\bin\\\\keytool.exe
    
    Gerhard
Sign In or Register to comment.