LoadRunner Support Forum
Showing results for 
Search instead for 
Do you mean 

LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

Occasional Visitor

LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

Dear Support Team,

 

I am getting below error while replaying script:

InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

 

Same script is working for me on my local mahcine but not working on Load Injector.

 

I tried recording the script on LG machine  - so that certificate get recorded; but no luck.

 

Can you please help.

 

Scrip is like:

 

 

 

web_set_certificate_ex("CertFilePath=WinINetCert1.pem", 
        "CertFormat=PEM", 
        "KeyFilePath=WinINetCert1.pem", 
        "KeyFormat=PEM", 
        "Password=abcdef", 
        "CertIndex=1", 
        LAST);

 

    // Create Base64 encoded string
    
    b64_encode_string( "userid:pswd", "BasicAuth" );

 

web_custom_request("Custom_HTTP_Auth",
    "Method=GET",
    "EncType=text/xml; charset=\"UTF-8\"",
    "URL=_https url..",
     LAST);
 


 
// Add HTTP Authorization header "Authorization: Basic XXXXXXXXXXXXXXXXXX==\r\n"
web_add_header("Authorization", lr_eval_string("Basic {BasicAuth}"));

4 REPLIES
Advisor

Re: LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

Hi,

 

It's looks like select certificate failed to me, and as your script mentioned cert file and key file before, can this specific pem file be accessed on LG machine?

 

BR,

Lancer

Esteemed Contributor

Re: LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

[ Edited ]

Hi Rahul,

 

Could you please share the failed script with full extended log?

As you mentioned, the script is working in your local machine but didn't work on other machine.

Please check in both machine, you run the script with Socket replay mode or Winlnet replay mode?

You can check it in Run Time Setting/ Internet Protocol/ Preference/ Advanced: Winlnet replay instead of Sockets.

 

Thanks and Regards,

Chau Nguyen

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Highlighted
Esteemed Contributor

Re: LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

Hi,

 

In  WinInet recording when client certificate is not exportable (we create invalid (empty) PEM file and web_set_certificate step that uses it) .

Could you please check whether the WinINetCert1.pem is empty?

If so, you need to use "CertIndex" argument only.

 

web_set_certificate_ex(

//        "CertFilePath=WinINetCert1.pem",

//        "CertFormat=PEM",

//        "KeyFilePath=WinINetCert1.pem",

//        "KeyFormat=PEM",

//        "Password=abcdef",

        "CertIndex=1",

        LAST);

 

Regards,

Chau Nguyen

Regards,

Chau Nguyen | SW Technical Support Consultant.
LoadRunner and Performance Center


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Advisor

Re: LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT

Hi All,

I Have same issue, but at last found the solution. the certificate needs to be installed in your browser. then only the certificate index is working.

for me it worked like this.

Steps to solve:

1.Recorded with client side certificate authentication installed in browser

2. script reply : working fine

3. copy the script in other machine : getting the error "INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT"

4. install the certificate in new machine's browser

5.Run the script again it works fine