Topic: Sahi: allowing certificates

Hi Team,

I am using Sahi for automation.
I am accessing the sites in secured areas which requires the acception of the certificates.
How can i automate the acception of certificates through Sahi.
Is there any workaround for this?

Regards,
Chejness

In God we trust...Rest we test!!

Re: Sahi: allowing certificates

Use This Command:

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

For more detail Refer this: sahi.co.in/w/httpsssl-sites-do-not-work-properly

Also you can add certificate in browser. Search around the forums you will get similar post and resolution for it.
Try with disabling the option like check for certificates and signatures of your IE advance setting tab.

Re: Sahi: allowing certificates

Chejness,

If you are using Internet Explorer, you will need to install the certificate on your browser. 
If you are using Firefox, you will need to accept the certificate permanently.

You can look at http://www.youtube.com/watch?v=zPZH5L-jkRA to see how to remove IE SSL warnings.

Join Sahi on Facebook: http://www.facebook.com/pages/Sahi/132288696813329

Tyto Software Pvt. Ltd. - Commercial support, Customization and Consulting around Sahi
support (at) sahi.co.in | narayan (at) sahi.co.in

Re: Sahi: allowing certificates

hi Narayan,
we are looking for an automated solution to avoid manual installation of certificates in IE.
We have a lot of different sites with a lot^2 expiration dates.
I'm thinking about a nightly job that erases all generated certificates, with sahi offline, and an automatic re-generation of certificates the first time site is accessed. Of course the problem is avoid IE manuality.
We are looking in Microsoft tech and friends sites ...
Any suggestion ??

Tia
Massimo

Massimo Borgogno
Consultant assioma.net S.r.l. http://www.assioma.net
Csi Piemonte Monitoring team  : http://www.csipiemonte.it

Re: Sahi: allowing certificates

One thing you can do is,

1) Create one certificate which acts as the the signer certificate and install this on IE.
2) Create all other certificates and sign it with the signer certificate. IE will not prompt for installation of certificates since it is signed by a trusted root.

You cannot sign one certifcate with another using Keytool. You will need openssl for that.

Regards,
Narayan

Join Sahi on Facebook: http://www.facebook.com/pages/Sahi/132288696813329

Tyto Software Pvt. Ltd. - Commercial support, Customization and Consulting around Sahi
support (at) sahi.co.in | narayan (at) sahi.co.in

Re: Sahi: allowing certificates

hi all
we solved ( windows only .... eh eh )  ;-)
First above all I forgot to inform you we are working on a WIN 2003 Server and OpenSSL is not intalled on this machine.
Solution , we generate the key in the keystore first , after we export the key inside a .cer file, third we use the certutil.exe tool to import the key directly inside IE.

Here our files :

************** ssl.txt *****************************
c:\sahi\bin\crea_certificato.bat $keytool $domain $password $keystore
****************************************************

************ c:\sahi\bin\crea_certificato.bat ( batch file called from ssl.txt ) **********
set keytool=%1
set domain=%2
set password=%3
set keystore=%4
cd \sahi\certs\

%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"

%keytool% -export -alias %domain% -keypass %password% -storepass %password% -keystore %keystore% -file %keystore%.cer

certutil -addstore ROOT %keystore%.cer
*********************************************************************

So we can now schedule every midnight a certificates clean-up inside the c:\sahi\certs directory in order to automatically accept new site certificates ( new site checked or new certificate due expiration )

cheers
Massimo

Massimo Borgogno
Consultant assioma.net S.r.l. http://www.assioma.net
Csi Piemonte Monitoring team  : http://www.csipiemonte.it

Re: Sahi: allowing certificates

Wow! This is great stuff! Thanks a lot, Massimo.

Regards,
Narayan

Join Sahi on Facebook: http://www.facebook.com/pages/Sahi/132288696813329

Tyto Software Pvt. Ltd. - Commercial support, Customization and Consulting around Sahi
support (at) sahi.co.in | narayan (at) sahi.co.in

Re: Sahi: allowing certificates

Automating a automation tool. Gr8 work massimo.

Re: Sahi: allowing certificates

Hi Team,

Can any one please explain step by step procedure of the following:
1. How to generate a certificate
2. Insatll the certificate on IE6
3. How can I automate the acceptance of certificates through Sahi tool?

As I need this info asap to be implemented:(

In God we trust...Rest we test!!