Highlighted
Established Member..
Established Member..
398 views

web_service_set_security with X509 - Certificate with IDValue not found

 
Hello,
I am trying to build a test using the WS protocol and I need to use the X509 security.  I have built the following comand based on the Function Reference and plugged in my own values.  I have also installed my certificate in the personal keystore using the Windows certmgr.msf program: 

    web_service_set_security(  
        SECURITY_TOKEN,
            "Type=X509",
            "LogicalName=MySecToken",
            "StoreName=My",
            "IDType=SubjectName",
            "IDValue=/C=US/ST=MyState/L=MyCity/O=My Company Name/OU=My Company Name/CN=COMPANY",
            "StoreLocation=CurrentUser",
            "Add=True",
        MESSAGE_SIGNATURE,
            "UseToken=MySecToken",
            "TargetPath=//soap:Body/View",
            "SignatureOptions=IncludeBody|IncludeAddressing|IncludeTimestamp",
            "TransformAlgorithm=http://www.w3.org/2001/10/xml-exc-c14n#",
            "CanonicalizationAlgorithm= http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/#WithComments",
        ENCRYPTED_DATA ,
            "EncryptionType=Content",
            "KeyAlgorithm=RSA15",
            "SessionAlgorithm=TripleDES",
        WS_ADDRESSING,
            "Version=WSA1.0",
        TIME_STAMP,
            "Exclude=False",
        LAST);
The error I keep getting is:  Failed to create "MySecToken" token. Certificate with "IDValue" of "/C=US/ST=MyState/L=MyCity/O=My Company Name/OU=My Company Name/CN=COMPANY" not found.
I have tried several different values for the IDValue, including just the CN value.  Each time I get the same 'not found' error for the cert.  I have confirmed it is finding the store itself though.  I have also tried using the Base64Hash or Base64KeyID versions, but I get the same not found error.  I have confirmed the cert exists in the Key Store.  
I saw another post from a few years ago where another person had a similar issue, but I didn't see a resolution posted.  
Can someone please help point me in the right direction with this, please?
 
I am using HP Virtual User Generator - Version 12.02, Build 2739 on Windows 7.
 
Thanks,
Damien
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Re: web_service_set_security with X509 - Certificate with IDValue not found

Good day Damien.

Assuming you tried to edit web_service_set_security() only directly from script body, which is not easiest approach.

Try following:  

    Select web_service_set_security(), call context menu by right mouse click. 

    In context menu - press on “Show Arguments” item,

    press the button located to the right from “Certificate” textfield – “Select Certificate” dialog will be opened.

    Set “location”, “name”, “field” filters to “All”, press “Find” button.

    Select required certificate from found list, press “Ok”.

Also, from "Show arguments" dialog you may specify other arguments related to X509 signing\encryption.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.