Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asn1.js

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asn1.js - npm Package Compare versions

Comparing version 2.1.3 to 2.2.0

8

lib/asn1/base/node.js

@@ -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();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc