Discuss this help topic in SecureBlackbox Forum

XML: Add key name to signature

The KeyName element contains a string value (in which white space is significant), that may be used by the signer to communicate a key identifier to the recipient. Typically, KeyName contains an identifier, related to the key pair, which is used to sign the message, but KeyName may also contain other protocol-related information, that indirectly identifies a key pair. Common uses of KeyName include simple string names for keys, a key index, a distinguished name (DN), an email address, etc.

To add KeyName element to the signature you need to use KeyName property of TElXMLSigner class. When validating a signature using TElXMLVerifier class you can use KeyName property to read this value.

C#:


TElXMLSigner Signer = new TElXMLSigner();
...
Signer.KeyName = "Name of the Key";

Delphi:

var
  Signer : TElXMLSigner;
...
Signer := TElXMLSigner.Create(nil);
Signer.KeyName := 'Name of the Key';

How To articles about XML signing (XMLDSig and XAdES)

Discuss this help topic in SecureBlackbox Forum