Socket
Socket
Sign inDemoInstall

sdp

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sdp - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "sdp",
"version": "1.4.0",
"version": "1.4.1",
"description": "SDP parsing and serialization utilities",

@@ -5,0 +5,0 @@ "main": "sdp.js",

@@ -236,6 +236,7 @@ /* eslint-env node */

// Note: a=setup line is ignored since we use the 'auto' role.
// Note2: 'algorithm' is not case sensitive except in Edge.
var dtlsParameters = {
role: 'auto',
fingerprints: [{
algorithm: fpLine.split(' ')[0],
algorithm: fpLine.split(' ')[0].toLowerCase(),
value: fpLine.split(' ')[1]

@@ -242,0 +243,0 @@ }]

@@ -215,1 +215,15 @@ /* jshint node: true */

});
test('getDtlsParameters', function(t) {
var fp = 'a=fingerprint:sha-256 so:me:th:in:g1\r\n';
var dtlsParameters = SDPUtils.getDtlsParameters(fp, '');
t.ok(dtlsParameters.role === 'auto', 'set role to "auto"');
t.ok(dtlsParameters.fingerprints.length === 1, 'parsed one fingerprint');
t.ok(dtlsParameters.fingerprints[0].algorithm === 'sha-256', 'extracted algorithm');
t.ok(dtlsParameters.fingerprints[0].value === 'so:me:th:in:g1', 'extracted value');
// test that values are lowercased
t.ok(SDPUtils.getDtlsParameters(fp.replace('sha-256', 'SHA-256'), '').fingerprints[0].algorithm === 'sha-256',
'algorithm value is extracted as lower-case');
t.end();
});
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