(options)
| 95 | } |
| 96 | |
| 97 | function createSecureContext(options) { |
| 98 | options ||= kEmptyObject; |
| 99 | const { |
| 100 | honorCipherOrder, |
| 101 | minVersion, |
| 102 | maxVersion, |
| 103 | secureProtocol, |
| 104 | } = options; |
| 105 | |
| 106 | let { secureOptions } = options; |
| 107 | |
| 108 | if (honorCipherOrder) |
| 109 | secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE; |
| 110 | |
| 111 | const c = new SecureContext(secureProtocol, secureOptions, |
| 112 | minVersion, maxVersion); |
| 113 | |
| 114 | configSecureContext(c.context, options); |
| 115 | |
| 116 | return c; |
| 117 | } |
| 118 | |
| 119 | // Translate some fields from the handle's C-friendly format into more idiomatic |
| 120 | // javascript object representations before passing them back to the user. Can |
no test coverage detected
searching dependent graphs…