EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to extract a key from “KeyInfo” element?

To extract a key from “KeyInfo” element you need to use the following code (C# notation):

for (int i = 0; i < ElXMLVerifier.Signature.KeyInfo.Count; i++)
  if (ElXMLVerifier.Signature.KeyInfo[i] is TElXMLKeyInfoX509Data)
  {
    TElXMLKeyInfoX509Data x509Data = (TElXMLKeyInfoX509Data) ElXMLVerifier.Signature.KeyInfo[i];
    ...
    // check x509Data.Certificate and CertStorage properties for raw certificate data and other properties like IssuerRDNs, SerialNumbers… that reference a certificate
  }

if (ElXMLVerifier.Signature.KeyInfo[i] is TElXMLKeyInfoRSAData)
...

Return to the list

|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!