Session_Sign
This API signs message text using RSA or EC private key.
URL
./Session_Sign
Input Parameters
Parameters | Description |
---|---|
keyname | Name of RSA or EC key pair containing private key. |
messagetext | Message to sign. It must be in the same format as specified in the messageformat parameter. |
transformation | Transformation to be used. Provide one of the RSA/EC signing transformations supported by CADP for Java. |
format | Format to be used. This is an optional parameter. Supported signing CMS formats are: — cms/detached/der/enveloped — cms/detached/der — cms/detached/smime/enveloped — cms/detached/smime. |
messageformat | Message format to be used. This is an optional parameter. Supported message formats are: — HEX — STR(default) |
Note
The following transformations don't support CMS format:
— SHA1withRSAPSSPadding
— SHA256withRSAPSSPadding
— SHA384withRSAPSSPadding
— SHA512withRSAPSSPadding
— ECDSA
— SHA1withECDSA
— SHA256withECDSA
— SHA384withECDSA
— SHA512withECDSA
— RSA
— RSAPSSPaddingSHA1
— RSAPSSPaddingSHA256
— RSAPSSPaddingSHA384
— RSAPSSPaddingSHA512For KeySecure 8.12.5 onward, following transformations are added to sign the data based on pre-calculated hash: RSA, RSAPSSPaddingSHA1, RSAPSSPaddingSHA256, RSAPSSPaddingSHA384, and RSAPSSPaddingSHA512. These transformations support saltlength parameter.
Sample SOAP Parameters
<prot:Session_Sign>
<keyname>certpkcs12</keyname>
<messagetext>eqwewewqeqqeqeqwe</messagetext>
<transformation>SHA1withECDSA</transformation>
<!--Optional:-->
<messageformat>STR</messageformat>
</prot:Session_Sign>
Output
Signature in Hex.
<ns2:Session_SignResponse xmlns:ns2="http://dsws.org/protectappws/">3082087B06092A864886F70D010703A082086C30820868020100318201C0308201BC0201003081A330819B310B3009060355040613025553310B3009060355040813024341311530130603550407130C526564776F6F64204369747931143012060355040A130B536166656E657420496E6331143012060355040B130B456E67696E656572696E67311230100603550403140973616D706C655F63613128302606092A864886F70D010901161973616D706C655F636140736166656E65742D696E632E636F6D020300A6E9300D06092A864886F70D010101050004820100096B5A17F59CA76C8DB69E280F5A6EC599651385C36A35175A2ED5B8018A2C63EF6EE3FE93C614D6848EAD8AC6AF42F68A921199621A7CDCAB9B886385F476DD9F76DD57F9[… sample truncated for brevity … ] E8BD38E8FD7E9057F49F82E5610C32A29A512977F4E191480C639E9333D57F50A042C5D6665423AC42BC12C587C27620D4838045D590309B95318A9395948B38ED1CE76753058E8A17</ns2:Session_SignResponse>