SK_PrepareWebServiceResponse()

This function is used to decrypt/verify a web service response using RSA public-key cryptography.

Applies to:

Win32, Win64

Syntax-VB:

Declare Function SK_PrepareWebServiceResponse(ByVal flags As Long, ByVal Clientkey As String, ByVal Server As String, ByVal cAs String, ByVal responseBuffer As String, ByRef responseBufferSize As Long) As Long

Syntax-C:

LONG SK_PrepareWebServiceResponse(LONG flags, LPSTR clientKey, LPSTR serverKey, LPSTR originalrequest , LPSTR requestBuffer, LPLONG requestBufferSize);

Arguments:

<flags> is a parameter with available options, defined as:

Flag

Value

Description

SK_WEBSERVICES_FLAGS_USE_ENCRYPTION

1

Use RSA public-key cryptography to encrypt the web service request.  (Usually required)

SK_WEBSERVICES_FLAGS_USE_SIGNATURE

2

Use RSA public-key cryptography to digitally sign the web service request. (Usually required)

<clientKey> The client's private key data for the encryption key set used for encryption and signing.

<serverKey> The server's public keydatafor the encryption key set used for encryption and signing.

<originalResponse> Encrypted/signed web service response to decrypt/verify.

<responseBuffer> Output buffer to place the decrypted web service response.

<responseBufferSize> The size of the <responseBuffer>. This buffer should be pre-initialized to at least 16384characters (16KB).

Returns:

If successful a return value of SWKERR_NONE [0] is returned. Otherwise a value listed in SK_GetErrorStr() is returned.

If successful, the <originalResponse> will be decrypted/verified and copied to the <responseBuffer> output parameter.

Description:

This function uses RSA public-key cryptography to decrypt/verify an encrypted web service response returned by SK_CallWebService().  The SK_WEBSERVICES_FLAGS_USE_ENCRYPTION and SK_WEBSERVICES_FLAGS_USE_SIGNATURE flags are generally required.

The necessary encryption key data (<clientKey> and <serverKey>) can be found in SOLO Sever, under the Authors / Products / Encryption Key Data menu option.

See Also:

SK_PrepareWebServiceRequest(), and SK_CallWebService()