xml.CryptoKey.CreateFromNode

Constructor of a new CryptoKey object depending on a url and from a XML node, according to the XML-Signature and XML-Encryption specification.

Syntax

xml.CryptoKey.CreateFromNode(
   url STRING,
   node xml.DomNode )
  RETURNING object xml.CryptoKey
  1. url defines a key identifier restricted to PUBLIC/PRIVATE keys.
  2. node is an ELEMENT node whose local name is either:
    • DSAKeyValue or RSAKeyValue and belonging to the XML-Signature namespace http://www.w3.org/2000/09/xmldsig#

    • RSAKeyPair and belonging to the XKMS 2.0 namespacehttp://www.w3.org/2002/03/xkms#

Usage

Returns a CryptoKey object or NULL.

If the local name is RSAKeyValue or RSAKeyPair, the URL must be a RSA key. If the local name is DSAKeyValue, the URL must be a DSA key.

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.