refactor: freeze the key's x5c array

This commit is contained in:
Filip Skokan 2019-12-10 15:20:01 +01:00
parent 0e28282e3e
commit 94ec607d4c

View file

@ -57,6 +57,9 @@ class Key {
throw new TypeError('`x5c` must be an array of one or more PKIX certificates when provided')
}
x5c = [...x5c]
Object.freeze(x5c)
x5c.forEach((cert, i) => {
let publicKey
try {