Re: Vugen p12 certificate issue (1308 Views)
Reply
Occasional Advisor
Vito Fresiello
Posts: 13
Registered: ‎05-05-2011
Message 1 of 6 (1,379 Views)
Accepted Solution

Vugen p12 certificate issue

Hi all, I'm using Vugen 9.52, and I'm trying to record a web script on a page that needs the certificate in p12 format.

I installed the p12 certficate in IE (the first one in "Personal" certificate folder) and the page IT OPENS correctly...

but when I try to use Vugen, the application ask me for the certificate several times, through the classic Vugen certificate request window,  then it failes to open the page.

 

The recording log reports : SSL Request      ( a80:1194)] Unable to export client certificate to a file,using index 1

 

and the index 1 is correct (the certificate is the 1st one in the IE list).

 

Any ideas?

 

Thanks a lot!

 

 

 

Occasional Advisor
Vito Fresiello
Posts: 13
Registered: ‎05-05-2011
Message 2 of 6 (1,354 Views)

Re: Vugen p12 certificate issue

I have an update.

 

Converting the certificate to PEM, I've been able to record the script using Vugen WinSock.

The problem is in replay. From run log i have:

Action.c(27):   Encountered an error with X509 certificate:
      ctx = 0167CF30
      err = "unable to get local issuer certificate"
      cert name = "/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware"
      depth = 2
      Err code = 20
      [MsgId: MMSG-26000]

 

 

Any idea about why it works in recording and not in replay?

Any idea on how to resolve?

 

BR

 

 

Valued Contributor
SPP_PC
Posts: 182
Registered: ‎04-06-2011
Message 3 of 6 (1,343 Views)

Re: Vugen p12 certificate issue

[ Edited ]

Have you tried recording by setting the Port mapping for mentioned server.

LR will accept certs in PEM format.

Why Winsock ? Is the app on  HTTPS ?

Valued Contributor
SPP_PC
Posts: 182
Registered: ‎04-06-2011
Message 4 of 6 (1,341 Views)

Re: Vugen p12 certificate issue

On the other hand, you may want to try out web_set_sockets_option function call, Go through the function reference. Hope this helps
Occasional Advisor
Vito Fresiello
Posts: 13
Registered: ‎05-05-2011
Message 5 of 6 (1,308 Views)

Re: Vugen p12 certificate issue

Yes I used the port mapping in recording. The app it is https. Basically the problem were on the certificate file, it was corrupted.
Occasional Advisor
Vito Fresiello
Posts: 13
Registered: ‎05-05-2011
Message 6 of 6 (1,308 Views)

Re: Vugen p12 certificate issue

I fixed the problem using the PEM certifcate loading it from a file, instead of using the one stored in the browser.

-  web_set_certificate_ex("CertFilePath=C:\\CERT.pem",); **

Of course I configured the port mapping  in recording.

The web set socket option gives the info of "openssl VERIFY:", but anyway is convenient top be used in the script for
troubleshooting:  

- web_set_sockets_option("LOAD_VERIFY_FILE","C:\\CERT.pem"); **

The main issue was in recording, after fixing the certificate problems: Vugen was not recording correctly
the LoginServlet int the "web_submit_data" function. It has been necessary to interpret the response from the web server
and fill manually some fields.

  Regards!

**.:  Vugen is escaping with the “\” so the Certificate Paths,
as C:\FOLDER\CERT_PATH.pem needs to be written in the script as C:\\FOLDER\\CERT_PATH.pem. Including the PATHS in the tree view the script will point to the correct cert path ( you will have something as "C:FOLDERCERT_PATH.pem")

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.