(name, value)
| 72 | } |
| 73 | |
| 74 | function validateKeyOrCertOption(name, value) { |
| 75 | if (typeof value !== 'string' && !isArrayBufferView(value)) { |
| 76 | throw new ERR_INVALID_ARG_TYPE( |
| 77 | name, |
| 78 | [ |
| 79 | 'string', |
| 80 | 'Buffer', |
| 81 | 'TypedArray', |
| 82 | 'DataView', |
| 83 | ], |
| 84 | value, |
| 85 | ); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | function setKey(context, key, passphrase, name) { |
| 90 | validateKeyOrCertOption(`${name}.key`, key); |
no outgoing calls
no test coverage detected
searching dependent graphs…