Comparing version 1.4.0 to 1.4.1
{ | ||
"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(); | ||
}); |
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
28488
731