Re: LR 11.52 - Replay error: InternetSetOption for INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT (423 Views)
Reply
Occasional Visitor
Rahul_Ujjainwal
Posts: 1
Registered: ‎04-24-2014
Message 1 of 4 (504 Views)

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}"));

Advisor
Lancer_
Posts: 12
Registered: ‎06-15-2014
Message 2 of 4 (464 Views)

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

Respected Contributor
ChauNguyen
Posts: 222
Registered: ‎05-08-2014
Message 3 of 4 (460 Views)

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


If you find this or or any post resolves your issue, please be sure to mark it as an accepted solution and give Kudos to the author for their assistance.
Respected Contributor
ChauNguyen
Posts: 222
Registered: ‎05-08-2014
Message 4 of 4 (423 Views)

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


If you find this or or any post resolves your issue, please be sure to mark it as an accepted solution and give Kudos to the author for their assistance.
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.