IPWorks Encrypt 2020 Kotlin Edition

Questions / Feedback?

Xmlsig Configuration

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

XMLSig Configuration Settings

KeyName:   The name of the key used to sign the XML.

This setting optionally holds the key name which may be useful to the recipient to help identify the key used to create the signature. This may be set before calling Sign. When calling VerifySignature this may be queried inside the SignatureInfo event.

Note that this value is only informative, it does not affect processing.

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the Status event. Possible values are:

0 (None)No events are logged.
1 (Info - default)Informational events are logged.
2 (Verbose)Detailed data is logged.
3 (Debug)Debug data is logged.

NormalizeLineEndings:   Whether to normalize line endings when calculating the reference digest.

This setting specifies whether to normalize line endings when calculating the reference digest. When set to True all line endings will be converted to LF. The default value is True.

PreserveWhitespace:   Whether to preserve whitespace in the signature.

This setting specifies whether whitespace is preserved when canonicalizing XML. The default value is False.

ReadFromProgressEvent:   Whether to read input data from inside the progress event.

When set to True this setting allows input data to be specified from within the Progress event. The component will repeatedly fire the Progress event to ask for data. Inside the event set InputXML when the Operation parameter of the event is 1 (Read). When all data has been provided set the IsEOF parameter of the event to True. This allows input data to be chunked and provided piece by piece. The default value is False.

SignatureRelationship:   Whether the signature is a child or sibling of the SignatureXPath.

This setting specifies whether the created signature is included as a child or sibling of the element specified by SignatureXPath. If this is set to 0 (default), the signature is inserted as a child of the element. If this is set to 1, the signature is inserted as a sibling after the element. The default value is 0 (child).

Example: SignatureRelationship is set to 0 (child - default)

xmlsig1.SignatureXPath = "/root/node1";

//produces XML like:
<root>
  <node1>
    <ds:Signature>...</ds:Signature>
  </node1>
  <node2></node2>
  <node3></node3>
</root>

Example: SignatureRelationship is set to 1 (sibling)

xmlsig1.SignatureXPath = "/root/node1";
xmlsig1.Config("SignatureRelationship=1");

//produces XML like:
<root>
  <node1></node1>
  <ds:Signature>...</ds:Signature>
  <node2></node2>
  <node3></node3>
</root>

SignerCertCount:   The number of parsed signer certificates when verifying a signature.

This setting is populated when calling VerifySignature. It holds the number of signer certificates that were parsed from the message. In most cases a single certificate is present and SignerCert is populated. In some cases, multiple certificates in a chain may be present, in that case each parsed certificate can be accessed via this property and SignerCertEncoded. For instance:

int certCount = Int32.Parse(xmlsig.Config("SignerCertCount"));
for(int i=0;i<certCount;i++)
{
  Console.WriteLine(xmlsig.Config("SignerCertEncoded[ " + i + "]"));
}
SignerCertEncoded[i]:   The parsed signer certificate.

This setting is used in conjunction with SignerCertCount to retrieve the base64 encoded signer certificate parsed from the message. Valid values for the index are from 0 to SignerCertCount - 1. SignerCertEncoded

WriteToProgressEvent:   Whether to write output data so it is accessible from inside the progress event.

When set to True this setting allows output data to be obtained from within the Progress event. The component will repeatedly fire the Progress event to provide output data. Inside the event check OutputXML when the Operation parameter of the event is 2 (Write). The IsEOF parameter should be checked inside the event to determine when all output data has been provided. This allows output data to be chunked and obtained piece by piece. The default value is False.

Base Configuration Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Tells the component whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g. RuntimeLicense, License File).
  • License Type: The type of license installed (e.g. Royalty Free, Single Server).
UseDaemonThreads:   Whether threads created by the component are daemon threads.

If set to True (default), when the component creates a thread the thread's Daemon property will be explicitly set to True. When set to False the component will not set the Daemon property on the created thread. The default value is True.

UseInternalSecurityAPI:   Tells the component whether or not to use the system security libraries or an internal implementation.

By default the component will use the system security libraries to perform cryptographic functions. Setting this to True tells the component to use the internal implementation instead of using the system's security API.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Kotlin Edition - Version 20.0 [Build 7941]