Comparing version 2.1.3 to 2.2.0
@@ -8,3 +8,3 @@ var Reporter = require('../base').Reporter; | ||
'seq', 'seqof', 'set', 'setof', 'octstr', 'bitstr', 'objid', 'bool', | ||
'gentime', 'utctime', 'null_', 'enum', 'int', 'ia5str' | ||
'gentime', 'utctime', 'null_', 'enum', 'int', 'ia5str', 'utf8str' | ||
]; | ||
@@ -377,4 +377,6 @@ | ||
return this._decodeList(input, tag, state.args[0]); | ||
else if (tag === 'octstr' || tag === 'bitstr' || tag === 'ia5str') | ||
else if (tag === 'octstr' || tag === 'bitstr') | ||
return this._decodeStr(input, tag); | ||
else if (tag === 'ia5str' || tag === 'utf8str') | ||
return this._decodeStr(input, tag); | ||
else if (tag === 'objid' && state.args) | ||
@@ -582,2 +584,4 @@ return this._decodeObjid(input, state.args[0], state.args[1]); | ||
return this._encodeStr(data, tag); | ||
else if (tag === 'utf8str') | ||
return this._encodeStr(data, tag); | ||
else if (tag === 'objid' && state.args) | ||
@@ -584,0 +588,0 @@ return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); |
@@ -132,3 +132,3 @@ var inherits = require('inherits'); | ||
return { unused: unused, data: buffer.raw() }; | ||
} else if (tag === 'ia5str') { | ||
} else if (tag === 'ia5str' || tag === 'utf8str') { | ||
return buffer.raw().toString(); | ||
@@ -135,0 +135,0 @@ } else { |
@@ -68,3 +68,3 @@ var inherits = require('inherits'); | ||
return this._createEncoderBuffer([ str.unused | 0, str.data ]); | ||
else if (tag === 'ia5str') | ||
else if (tag === 'ia5str' || tag === 'utf8str') | ||
return this._createEncoderBuffer(str); | ||
@@ -71,0 +71,0 @@ return this.reporter.error('Encoding of string type: ' + tag + |
{ | ||
"name": "asn1.js", | ||
"version": "2.1.3", | ||
"version": "2.2.0", | ||
"description": "ASN.1 encoder and decoder", | ||
@@ -5,0 +5,0 @@ "main": "lib/asn1.js", |
@@ -40,2 +40,6 @@ var assert = require('assert'); | ||
test('utf8str', function() { | ||
this.utf8str(); | ||
}, 'hello'); | ||
test('gentime', function() { | ||
@@ -42,0 +46,0 @@ this.gentime(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82913
2376