(type = 'default')
| 188 | |
| 189 | // TODO(joyeecheung): support X509Certificate output? |
| 190 | function getCACertificates(type = 'default') { |
| 191 | validateString(type, 'type'); |
| 192 | |
| 193 | switch (type) { |
| 194 | case 'default': |
| 195 | return cacheDefaultCACertificates(); |
| 196 | case 'bundled': |
| 197 | return cacheBundledRootCertificates(); |
| 198 | case 'system': |
| 199 | return cacheSystemCACertificates(); |
| 200 | case 'extra': |
| 201 | return cacheExtraCACertificates(); |
| 202 | default: |
| 203 | throw new ERR_INVALID_ARG_VALUE('type', type); |
| 204 | } |
| 205 | } |
| 206 | exports.getCACertificates = getCACertificates; |
| 207 | |
| 208 | function setDefaultCACertificates(certs) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…