[Pkg-javascript-commits] [node-asn1.js] 68/202: node: do not require key at `.null_()`

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:18:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-asn1.js.

commit afab94475218cde0d86e4e7f3a489701d46bfbf4
Author: Fedor Indutny <fedor at indutny.com>
Date:   Fri Nov 7 20:14:59 2014 +0300

    node: do not require key at `.null_()`
---
 lib/asn1/base/node.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/asn1/base/node.js b/lib/asn1/base/node.js
index 8b771a2..41b9f7a 100644
--- a/lib/asn1/base/node.js
+++ b/lib/asn1/base/node.js
@@ -462,6 +462,9 @@ Node.prototype._encode = function encode(data, reporter, parent) {
     result = this._encodeChoice(data, reporter);
   } else if (state.children) {
     content = state.children.map(function(child) {
+      if (child._baseState.tag === 'null_')
+        return child._encode(null, reporter, data);
+
       if (child._baseState.key === null)
         return reporter.error('Child should have a key');
       var prevKey = reporter.enterKey(child._baseState.key);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-asn1.js.git



More information about the Pkg-javascript-commits mailing list