Share this page

# ws_sign_saml_assertion

Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

Signs an SAML assertion.

    int ws_sign_saml_assertion( const char * AssertionContent, const char * CertificateFile, [const char * CertificatePassword,] const char * OutParam );

AssertionContent | The unsigned assertion. If a signed assertion is specified, the function replaces the signature with a new signature.
CertificateFile | The name of a certificate file. If the file is in the script directory, enter only the file name. Otherwise, enter the full path to the certificate file.
CertificatePassword | Password for the certificate file.
OutParam | A parameter containing the signed SAML assertion.

The ws_sign_saml_assertion function signs a Security Assertion Markup Language (SAML) assertion.

All the arguments are mandatory except for the password for the certificate. If a password is not supplied, it is assumed that the certificate file does not need a password and the CertificatePassword argument is empty.

## Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure. Note that in many cases, this return value indicates the technical success of the function, and not the result. For example, a function that registers a string to be found in a subsequent step returns LR_PASS to indicate that the registration was successful. This does not indicate that the string was found in the server response.

## Parameterization

All attribute values of ws_sign_saml_assertion can be parameterized except as noted in the descriptions of the attributes.

## Example

This example shows signing of an unsigned assertion.

Copy code

    ws_sign_saml_assertion(
            "AssertionContent=<Assertion AssertionID=...> ... </Assertion>" ,
            "CertificateFile=Client Private.pfx",
            "CertificatePassword=wse2qs",
            "OutParam=param1"
            );

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: