* Validates that every requested key usage is allowed for `subject`. * @param {string} subject * @param {SafeSet } usagesSet * @param {string[]} allowed
(subject, usagesSet, allowed)
| 45 | * @param {string[]} allowed |
| 46 | */ |
| 47 | function verifyAcceptableKeyUse(subject, usagesSet, allowed) { |
| 48 | if (hasAnyNotIn(usagesSet, allowed)) { |
| 49 | throw lazyDOMException( |
| 50 | `Unsupported key usage for ${subject} key`, |
| 51 | 'SyntaxError'); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Converts a usage list to a set and validates it against `allowed`. |
no test coverage detected
searching dependent graphs…