DerToXmlDoc (String function): Difference between revisions
m (Automatically generated page update) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:String:DerToXmlDoc subtitle}} | {{Template:String:DerToXmlDoc subtitle}} | ||
DER (Distinguished Encoding Rules) provide a way to uniquely encode an ASN.1 type value as a string of eight-bit octets. | |||
<var>DerToXmlDoc</var> converts such a string to an <var>[[XmlDoc]]</var>. | |||
==Syntax== | ==Syntax== | ||
{{Template:String:DerToXmlDoc syntax}} | {{Template:String:DerToXmlDoc syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%doc</th> | ||
<td>An <var>XmlDoc</var> object variable to contain the decoded value of the method object, <var class="term">string</var>. </td></tr> | |||
<tr><th>string</th> | <tr><th>string</th> | ||
<td>string</td></tr> | <td> A DER encoded string.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
==Examples== | ==Examples== | ||
[[PemToString (Stringlist function)#Examples|The PemToString example]] loads a <var>Longstring</var> with the contents of the base64 encoded CRL (Certificate Revocation List). If that <var>Longstring</var> is <code>%ls</code> below, the following statement converts that string to the XmlDoc whose contents are printed thereafter: | |||
<p class="code">%ls:derToXmlDoc:print</code> </p> | |||
The result is shown in part below: | |||
<p class="code"><Sequence> | |||
<Sequence> | |||
<Sequence> | |||
<ObjectIdentifier>1.2.840.113549.1.1.4</ObjectIdentifier> | |||
<Null/> | |||
</Sequence> | |||
<Sequence> | |||
... | |||
<Set> | |||
<Sequence> | |||
<ObjectIdentifier>2.5.4.8</ObjectIdentifier> | |||
<PrintableString>QLD</PrintableString> | |||
</Sequence> | |||
</Set> | |||
... | |||
<UTCTime>20010115162657.000Z</UTCTime> | |||
<UTCTime>20010214162657.000Z</UTCTime> | |||
<Sequence> | |||
<Sequence> | |||
<Integer>1</Integer> | |||
<UTCTime>19951009233205.000Z</UTCTime> | |||
</Sequence> | |||
<Sequence> | |||
<Integer>3</Integer> | |||
<UTCTime>19951201010000.000Z</UTCTime> | |||
</Sequence> | |||
... </p> | |||
The ellipses indicate snipped content and are not part of the XmlDoc. | |||
==See also== | ==See also== | ||
{{Template:String:DerToXmlDoc footer}} | {{Template:String:DerToXmlDoc footer}} |
Revision as of 22:17, 13 April 2012
Convert DER encoded data to XML (String class)
[Introduced in Sirius Mods 8.0]
DER (Distinguished Encoding Rules) provide a way to uniquely encode an ASN.1 type value as a string of eight-bit octets.
DerToXmlDoc converts such a string to an XmlDoc.
Syntax
%doc = string:DerToXmlDoc Throws InvalidBerData
Syntax terms
%doc | An XmlDoc object variable to contain the decoded value of the method object, string. |
---|---|
string | A DER encoded string. |
Usage notes
Examples
The PemToString example loads a Longstring with the contents of the base64 encoded CRL (Certificate Revocation List). If that Longstring is %ls
below, the following statement converts that string to the XmlDoc whose contents are printed thereafter:
%ls:derToXmlDoc:print
The result is shown in part below:
<Sequence> <Sequence> <Sequence> <ObjectIdentifier>1.2.840.113549.1.1.4</ObjectIdentifier> <Null/> </Sequence> <Sequence> ... <Set> <Sequence> <ObjectIdentifier>2.5.4.8</ObjectIdentifier> <PrintableString>QLD</PrintableString> </Sequence> </Set> ... <UTCTime>20010115162657.000Z</UTCTime> <UTCTime>20010214162657.000Z</UTCTime> <Sequence> <Sequence> <Integer>1</Integer> <UTCTime>19951009233205.000Z</UTCTime> </Sequence> <Sequence> <Integer>3</Integer> <UTCTime>19951201010000.000Z</UTCTime> </Sequence> ...
The ellipses indicate snipped content and are not part of the XmlDoc.