Performance Center Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

Vugen p12 certificate issue

Go to solution
Vito Fresiello
Occasional Contributor

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!




Vito Fresiello
Occasional Contributor

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="
      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?






Re: Vugen p12 certificate issue

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 ?


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
Vito Fresiello
Occasional Contributor

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.
Vito Fresiello
Occasional Contributor

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

- 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.


**.:  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")

//Add this to "OnDomLoad" event