Remove the ASN.1 encoding section, which doesn't work.
authorRyan Sleevi <sleevi@google.com
Thu, 06 Mar 2014 00:00:00 -0800
changeset 164 8fafe3f5cf27
parent 163 d37caf182536
child 165 9f1f378595fc
Remove the ASN.1 encoding section, which doesn't work.
spec/Overview-WebCryptoAPI.xml
spec/Overview.html
--- a/spec/Overview-WebCryptoAPI.xml	Thu Mar 06 17:36:48 2014 -0800
+++ b/spec/Overview-WebCryptoAPI.xml	Thu Mar 06 00:00:00 2014 -0800
@@ -669,339 +669,6 @@
           </li>
         </ol>
         <p>
-          When this specification says to <dfn id="concept-encode-an-asn1-structure">encode an ASN.1
-          structure</dfn>, the user agent must perform the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>structure</var> be the ASN.1 structure to be encoded.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>data</var> be an object containing the data to be encoded into the
-                <var>structure</var>.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>structure</var> is an ASN.1 SEQUENCE:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an object, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If <var>structure</var> includes any non-optional field for which there is
-                        no property of <var>data</var> with the same name, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for a field of
-                        <var>structure</var> with name <var>fieldName</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        the property of <var>data</var> with the name <var>fieldName</var> as the data
-                        to be encoded and the syntax
-                        specified for <var>fieldName</var> in <var>structure</var> as the
-                        ASN.1 structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is an ASN.1 CHOICE:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an object, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If no property of <var>data</var> has a name which matches one of the fields
-                        of <var>structure</var>, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If more than one property of <var>data</var> has a name which matches one of
-                        the fields of <var>struture</var>, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for the unique field of
-                        <var>structure</var> with a name that is also the name of a property of
-                        <var>data</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        this property of <var>data</var> as the data
-                        to be encoded and the syntax
-                        specified for this field in <var>structure</var> as the ASN.1 structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is an ASN.1 SEQUENCE OF or SET OF:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an array, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding the elements of
-                        <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for each element of
-                        <var>data</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        the element of <var>data</var> as the data
-                        to be encoded and the syntax
-                        specified for set or sequence elements by <var>structure</var> as the ASN.1
-                        structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is defined as having type ANY:</dt>
-                <dd>
-                  Let <var>result</var> be equal to <var>data</var>.
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is an object or array, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var>
-                        according to the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a> using the format for type
-                        <var>structure</var>.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-              </dl>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>
-              </p>
-            </li>
-          </ol>
-          <div class="ednote">
-            <p>
-              The above algorithm is not complete, in the sense that it cannot encode all possible
-              ASN.1 structures. However, it is sufficient for the ASN.1 structures presently used
-              in this document.
-            </p>
-          </div>
-        </p>
-        <p>
-          When this specification says to <dfn id="concept-encode-a-subjectPublicKeyInfo">encode
-          a subjectPublicKeyInfo</dfn> the user agent must run the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>oid</var> be an Object Identifier identifying the public key algorithm.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>parameters</var> be the algorithm parameters and <var>parametersType</var>
-                be the ASN.1 type of the parameters.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>publicKey</var> be an octet string containing the public key.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>parameters</var> is not null:</dt>
-                <dd>
-                  <p>
-                    Let <var>encodedParameters</var> be the result of
-                    <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a>
-                    using <var>parametersType</var> as <var>structure</var> and <var>parameters</var>
-                    as <var>data</var>.
-                  </p>
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>Let <var>encodedParameters</var> be null</dd>.
-              </dl>
-            </li>
-            <li>
-              <p>
-                Let <var>algorithmIdentifier</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>algorithmIdentifier</var> to be
-                <var>oid</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                If <var>encodedParameters</var> is not null, set the <code>parameters</code>
-                property of <var>algorithmIdentifier</var> to be <var>encodedParameters</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>subjectPublicKeyInfo</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>subjectPublicKeyInfo</var> to be
-                <var>algorithmIdentifier</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>subjectPublicKey</code> property of <var>subjectPublicKeyInfo</var>
-                to be <var>publicKey</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>result</var> be the result of
-                <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a> using
-                the ASN.1 structure of subjectPublicKeyInfo, as specified in
-                <a href="#RFC5280">RFC 5280</a> as <var>structure</var> and
-                <var>subjectPublicKeyInfo</var> as <var>data</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>.
-              </p>
-            </li>
-          </ol>
-        </p>
-        <p>
-          When this specification says to <dfn id="concept-encode-a-privateKeyInfo">encode a
-          privateKeyInfo</dfn> the user agent must run the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>oid</var> be an Object Identifier identifying the private key algorithm.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>parameters</var> be the algorithm parameters and <var>parametersType</var>
-                be the ASN.1 type of the parameters.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>privateKey</var> be an octet string containing the private key.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>parameters</var> is not null:</dt>
-                <dd>
-                  <p>
-                    Let <var>encodedParameters</var> be the result of
-                    <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a>
-                    using <var>parametersType</var> as <var>structure</var> and <var>parameters</var>
-                    as <var>data</var>.
-                  </p>
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>Let <var>encodedParameters</var> be null</dd>.
-              </dl>
-            </li>
-            <li>
-              <p>
-                Let <var>algorithmIdentifier</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>algorithmIdentifier</var> to be
-                <var>oid</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                If <var>encodedParameters</var> is not null, set the <code>parameters</code>
-                property of <var>algorithmIdentifier</var> to be <var>encodedParameters</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>privateKeyInfo</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>privateKeyAlgorithm</code> property of <var>privateKeyInfo</var> to be
-                <var>algorithmIdentifier</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>privateKey</code> property of <var>privateKeyInfo</var>
-                to be <var>privateKey</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>result</var> be the result of
-                <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a> using
-                the ASN.1 structure of PrivateKeyInfo, as specified in
-                <a href="#RFC5208">RFC 5208</a> as <var>structure</var> and
-                <var>privateKeyInfo</var> as <var>data</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>.
-              </p>
-            </li>
-          </ol>
-        </p>
-        <p>
           When this specification says to calculate the <dfn id="concept-usage-intersection">usage
           intersection</dfn> of two arrays, <var>a</var> and <var>b</var> the result shall be an
           array containing each <a href="#dfn-RecognizedKeyUsage">recognised key usage value</a>
--- a/spec/Overview.html	Thu Mar 06 17:36:48 2014 -0800
+++ b/spec/Overview.html	Thu Mar 06 00:00:00 2014 -0800
@@ -44,7 +44,7 @@
         communications.
       </p>
   
-      <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 18 further editorial notes in the document.</p></div>
+      <div class="ednote"><div class="ednoteHeader">Editorial note</div><p>There are 17 further editorial notes in the document.</p></div>
     </div>
 
     <div class="section">
@@ -677,339 +677,6 @@
           </li>
         </ol>
         <p>
-          When this specification says to <dfn id="concept-encode-an-asn1-structure">encode an ASN.1
-          structure</dfn>, the user agent must perform the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>structure</var> be the ASN.1 structure to be encoded.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>data</var> be an object containing the data to be encoded into the
-                <var>structure</var>.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>structure</var> is an ASN.1 SEQUENCE:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an object, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If <var>structure</var> includes any non-optional field for which there is
-                        no property of <var>data</var> with the same name, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for a field of
-                        <var>structure</var> with name <var>fieldName</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        the property of <var>data</var> with the name <var>fieldName</var> as the data
-                        to be encoded and the syntax
-                        specified for <var>fieldName</var> in <var>structure</var> as the
-                        ASN.1 structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is an ASN.1 CHOICE:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an object, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If no property of <var>data</var> has a name which matches one of the fields
-                        of <var>structure</var>, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        If more than one property of <var>data</var> has a name which matches one of
-                        the fields of <var>struture</var>, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for the unique field of
-                        <var>structure</var> with a name that is also the name of a property of
-                        <var>data</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        this property of <var>data</var> as the data
-                        to be encoded and the syntax
-                        specified for this field in <var>structure</var> as the ASN.1 structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is an ASN.1 SEQUENCE OF or SET OF:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is not an array, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding the elements of
-                        <var>data</var> according to
-                        <var>structure</var> using the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a>, where the value for each element of
-                        <var>data</var> is obtained by performing
-                        the steps to
-                        <a href="#concept-encode-an-asn1-structure">encode an ASN.1 structure</a> with
-                        the element of <var>data</var> as the data
-                        to be encoded and the syntax
-                        specified for set or sequence elements by <var>structure</var> as the ASN.1
-                        structure to be
-                        encoded.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-                <dt>If <var>structure</var> is defined as having type ANY:</dt>
-                <dd>
-                  Let <var>result</var> be equal to <var>data</var>.
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>
-                  <ol>
-                    <li>
-                      <p>
-                        If <var>data</var> is an object or array, 
-                        then <a href="#concept-return-an-error">return an error</a> named
-                        <a href="#dfn-DataError"><code>DataError</code></a>.
-                      </p>
-                    </li>
-                    <li>
-                      <p>
-                        Let <var>result</var> be the result of encoding <var>data</var>
-                        according to the Distinguished Encoding Rules of
-                        <a href="#X690">X.690 (11/08)</a> using the format for type
-                        <var>structure</var>.
-                      </p>
-                    </li>
-                  </ol>
-                </dd>
-              </dl>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>
-              </p>
-            </li>
-          </ol>
-          <div class="ednote"><div class="ednoteHeader">Editorial note</div>
-            <p>
-              The above algorithm is not complete, in the sense that it cannot encode all possible
-              ASN.1 structures. However, it is sufficient for the ASN.1 structures presently used
-              in this document.
-            </p>
-          </div>
-        </p>
-        <p>
-          When this specification says to <dfn id="concept-encode-a-subjectPublicKeyInfo">encode
-          a subjectPublicKeyInfo</dfn> the user agent must run the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>oid</var> be an Object Identifier identifying the public key algorithm.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>parameters</var> be the algorithm parameters and <var>parametersType</var>
-                be the ASN.1 type of the parameters.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>publicKey</var> be an octet string containing the public key.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>parameters</var> is not null:</dt>
-                <dd>
-                  <p>
-                    Let <var>encodedParameters</var> be the result of
-                    <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a>
-                    using <var>parametersType</var> as <var>structure</var> and <var>parameters</var>
-                    as <var>data</var>.
-                  </p>
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>Let <var>encodedParameters</var> be null</dd>.
-              </dl>
-            </li>
-            <li>
-              <p>
-                Let <var>algorithmIdentifier</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>algorithmIdentifier</var> to be
-                <var>oid</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                If <var>encodedParameters</var> is not null, set the <code>parameters</code>
-                property of <var>algorithmIdentifier</var> to be <var>encodedParameters</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>subjectPublicKeyInfo</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>subjectPublicKeyInfo</var> to be
-                <var>algorithmIdentifier</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>subjectPublicKey</code> property of <var>subjectPublicKeyInfo</var>
-                to be <var>publicKey</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>result</var> be the result of
-                <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a> using
-                the ASN.1 structure of subjectPublicKeyInfo, as specified in
-                <a href="#RFC5280">RFC 5280</a> as <var>structure</var> and
-                <var>subjectPublicKeyInfo</var> as <var>data</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>.
-              </p>
-            </li>
-          </ol>
-        </p>
-        <p>
-          When this specification says to <dfn id="concept-encode-a-privateKeyInfo">encode a
-          privateKeyInfo</dfn> the user agent must run the following steps:
-          <ol>
-            <li>
-              <p>
-                Let <var>oid</var> be an Object Identifier identifying the private key algorithm.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>parameters</var> be the algorithm parameters and <var>parametersType</var>
-                be the ASN.1 type of the parameters.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>privateKey</var> be an octet string containing the private key.
-              </p>
-            </li>
-            <li>
-              <dl class="switch">
-                <dt>If <var>parameters</var> is not null:</dt>
-                <dd>
-                  <p>
-                    Let <var>encodedParameters</var> be the result of
-                    <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a>
-                    using <var>parametersType</var> as <var>structure</var> and <var>parameters</var>
-                    as <var>data</var>.
-                  </p>
-                </dd>
-                <dt>Otherwise:</dt>
-                <dd>Let <var>encodedParameters</var> be null</dd>.
-              </dl>
-            </li>
-            <li>
-              <p>
-                Let <var>algorithmIdentifier</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>algorithm</code> property of <var>algorithmIdentifier</var> to be
-                <var>oid</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                If <var>encodedParameters</var> is not null, set the <code>parameters</code>
-                property of <var>algorithmIdentifier</var> to be <var>encodedParameters</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>privateKeyInfo</var> be a new internal object.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>privateKeyAlgorithm</code> property of <var>privateKeyInfo</var> to be
-                <var>algorithmIdentifier</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Set the <code>privateKey</code> property of <var>privateKeyInfo</var>
-                to be <var>privateKey</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Let <var>result</var> be the result of
-                <a href="#concept-encode-an-asn1-structure">encoding an ASN.1 structure</a> using
-                the ASN.1 structure of PrivateKeyInfo, as specified in
-                <a href="#RFC5208">RFC 5208</a> as <var>structure</var> and
-                <var>privateKeyInfo</var> as <var>data</var>.
-              </p>
-            </li>
-            <li>
-              <p>
-                Return <var>result</var>.
-              </p>
-            </li>
-          </ol>
-        </p>
-        <p>
           When this specification says to calculate the <dfn id="concept-usage-intersection">usage
           intersection</dfn> of two arrays, <var>a</var> and <var>b</var> the result shall be an
           array containing each <a href="#dfn-RecognizedKeyUsage">recognised key usage value</a>