GeezerVison is showing github.com — crypto,https,tls: end OpenSSL engine support · nodejs/node@a2cd8aa
File treeExpand file treeCollapse file tree Open diff view settings openssl-client-cert-engine
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/ncrypto/engine.cc -105Lines changed: 0 additions & 105 deletions Collapse file Copy file name to clipboardExpand all lines: deps/ncrypto/ncrypto.gyp -35Lines changed: 0 additions & 35 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | 'ncrypto.cc', | 6 | 6 | 'ncrypto.h', | 7 | 7 | ], | 8 | | - 'ncrypto_engine_sources': [ | 9 | | - 'engine.cc', | 10 | | - 'ncrypto.h', | 11 | | - ], | 12 | 8 | # OpenSSL may be configured with --api below 3.0. Keep 3.0 deprecation | 13 | 9 | # checks where supported without exceeding its configured API level. | 14 | 10 | 'ncrypto_openssl3_api_compat': | | 17 | 13 | 'OPENSSL_API_COMPAT=<(ncrypto_openssl3_api_compat)', | 18 | 14 | 'OPENSSL_NO_DEPRECATED', | 19 | 15 | ], | 20 | | - 'ncrypto_engine_defines': [ | 21 | | - 'OPENSSL_API_COMPAT=<(ncrypto_openssl3_api_compat)', | 22 | | - 'OPENSSL_SUPPRESS_DEPRECATED', | 23 | | - 'NCRYPTO_ENGINE_COMPAT=1', | 24 | | - ], | 25 | 16 | }, | 26 | 17 | 'targets': [ | 27 | 18 | { | | 46 | 37 | 'conditions': [ | 47 | 38 | ['openssl_is_boringssl=="false"', { | 48 | 39 | 'defines': [ '<@(ncrypto_strict_defines)' ], | 49 | | - 'dependencies': [ | 50 | | - 'ncrypto_engine', | 51 | | - ], | 52 | 40 | }], | 53 | 41 | ['node_shared_openssl=="false"', { | 54 | 42 | 'dependencies': [ | | 58 | 46 | ] | 59 | 47 | }, | 60 | 48 | ], | 61 | | - 'conditions': [ | 62 | | - ['openssl_is_boringssl=="false"', { | 63 | | - 'targets': [ | 64 | | - { | 65 | | - 'target_name': 'ncrypto_engine', | 66 | | - 'type': 'static_library', | 67 | | - 'include_dirs': ['.'], | 68 | | - 'defines': [ | 69 | | - 'NCRYPTO_BSSL_LIBDECREPIT_MISSING=<(ncrypto_bssl_libdecrepit_missing)', | 70 | | - '<@(ncrypto_engine_defines)', | 71 | | - ], | 72 | | - 'sources': [ '<@(ncrypto_engine_sources)' ], | 73 | | - 'conditions': [ | 74 | | - ['node_shared_openssl=="false"', { | 75 | | - 'dependencies': [ | 76 | | - '../openssl/openssl.gyp:openssl' | 77 | | - ] | 78 | | - }], | 79 | | - ] | 80 | | - }, | 81 | | - ], | 82 | | - }], | 83 | | - ], | 84 | 49 | } |
Collapse file Copy file name to clipboardExpand all lines: deps/ncrypto/ncrypto.h -43Lines changed: 0 additions & 43 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 23 | 23 | #include <string_view> | 24 | 24 | #include <unordered_map> | 25 | 25 | #include <vector> | 26 | | -#if defined(NCRYPTO_ENGINE_COMPAT) && NCRYPTO_ENGINE_COMPAT && \ | 27 | | - !defined(OPENSSL_NO_ENGINE) | 28 | | -#include <openssl/engine.h> | 29 | | -#endif // NCRYPTO_ENGINE_COMPAT && !OPENSSL_NO_ENGINE | 30 | | - | 31 | 26 | #ifndef OPENSSL_VERSION_PREREQ | 32 | 27 | #define OPENSSL_VERSION_PREREQ(maj, min) \ | 33 | 28 | (OPENSSL_VERSION_NUMBER >= (((maj) << 28) | ((min) << 20))) | @@ -2109,44 +2104,6 @@ class MacCache final { | 2109 | 2104 | }; | 2110 | 2105 | #endif | 2111 | 2106 |
| 2112 | | -#ifndef OPENSSL_NO_ENGINE | 2113 | | -class EnginePointer final { | 2114 | | - public: | 2115 | | - EnginePointer() = default; | 2116 | | - | 2117 | | - explicit EnginePointer(void* engine_, bool finish_on_exit = false); | 2118 | | - EnginePointer(EnginePointer&& other) noexcept; | 2119 | | - EnginePointer& operator=(EnginePointer&& other) noexcept; | 2120 | | - NCRYPTO_DISALLOW_COPY(EnginePointer) | 2121 | | - ~EnginePointer(); | 2122 | | - | 2123 | | - inline operator bool() const { return engine != nullptr; } | 2124 | | - inline void setFinishOnExit() { finish_on_exit = true; } | 2125 | | - | 2126 | | - void reset(void* engine_ = nullptr, bool finish_on_exit_ = false); | 2127 | | - | 2128 | | - bool setAsDefault(uint32_t flags, CryptoErrorList* errors = nullptr); | 2129 | | - bool init(bool finish_on_exit = false); | 2130 | | - EVPKeyPointer loadPrivateKey(const char* key_name); | 2131 | | - bool setClientCertEngine(SSL_CTX* ctx); | 2132 | | - | 2133 | | - void* release(); | 2134 | | - | 2135 | | - // Retrieve an OpenSSL Engine instance by name. If the name does not | 2136 | | - // identify a valid named engine, the returned EnginePointer will be | 2137 | | - // empty. | 2138 | | - static EnginePointer getEngineByName(const char* name, | 2139 | | - CryptoErrorList* errors = nullptr); | 2140 | | - | 2141 | | - // Call once when initializing OpenSSL at startup for the process. | 2142 | | - static void initEnginesOnce(); | 2143 | | - | 2144 | | - private: | 2145 | | - void* engine = nullptr; | 2146 | | - bool finish_on_exit = false; | 2147 | | -}; | 2148 | | -#endif // !OPENSSL_NO_ENGINE | 2149 | | - | 2150 | 2107 | // ============================================================================ | 2151 | 2108 | // FIPS | 2152 | 2109 | bool isFipsEnabled(); | |
Collapse file Copy file name to clipboardExpand all lines: deps/ncrypto/unofficial.gni +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,11 +26,7 @@ template("ncrypto_gn_build") { | 26 | 26 | source_set(target_name) { | 27 | 27 | forward_variables_from(invoker, "*") | 28 | 28 | public_configs = [ ":ncrypto_config" ] | 29 | | - defines = [ | 30 | | - "NCRYPTO_ENGINE_COMPAT=1", | 31 | | - "OPENSSL_SUPPRESS_DEPRECATED", | 32 | | - ] | 33 | | - sources = gypi_values.ncrypto_sources + gypi_values.ncrypto_engine_sources | | 29 | + sources = gypi_values.ncrypto_sources | 34 | 30 | deps = [ "$node_openssl_path" ] | 35 | 31 | } | 36 | 32 | } |
Collapse file Copy file name to clipboardExpand all lines: doc/api/crypto.md -89Lines changed: 0 additions & 89 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6601,42 +6601,6 @@ added: v15.6.0 | 6601 | 6601 | * `utilization` {number} The calculated ratio of `used` to `total` | 6602 | 6602 | allocated bytes. | 6603 | 6603 |
| 6604 | | -### `crypto.setEngine(engine[, flags])` | 6605 | | - | 6606 | | -<!-- YAML | 6607 | | -added: v0.11.11 | 6608 | | -changes: | 6609 | | - - version: | 6610 | | - - v22.4.0 | 6611 | | - - v20.16.0 | 6612 | | - pr-url: https://github.com/nodejs/node/pull/53329 | 6613 | | - description: Custom engine support in OpenSSL 3 is deprecated. | 6614 | | ---> | 6615 | | - | 6616 | | -* `engine` {string} | 6617 | | -* `flags` {crypto.constants} **Default:** `crypto.constants.ENGINE_METHOD_ALL` | 6618 | | - | 6619 | | -Load and set the `engine` for some or all OpenSSL functions (selected by flags). | 6620 | | -Support for custom engines in OpenSSL is deprecated from OpenSSL 3. | 6621 | | - | 6622 | | -`engine` could be either an id or a path to the engine's shared library. | 6623 | | - | 6624 | | -The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` | 6625 | | -is a bit field taking one of or a mix of the following flags (defined in | 6626 | | -`crypto.constants`): | 6627 | | - | 6628 | | -* `crypto.constants.ENGINE_METHOD_RSA` | 6629 | | -* `crypto.constants.ENGINE_METHOD_DSA` | 6630 | | -* `crypto.constants.ENGINE_METHOD_DH` | 6631 | | -* `crypto.constants.ENGINE_METHOD_RAND` | 6632 | | -* `crypto.constants.ENGINE_METHOD_EC` | 6633 | | -* `crypto.constants.ENGINE_METHOD_CIPHERS` | 6634 | | -* `crypto.constants.ENGINE_METHOD_DIGESTS` | 6635 | | -* `crypto.constants.ENGINE_METHOD_PKEY_METHS` | 6636 | | -* `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` | 6637 | | -* `crypto.constants.ENGINE_METHOD_ALL` | 6638 | | -* `crypto.constants.ENGINE_METHOD_NONE` | 6639 | | - | 6640 | 6604 | ### `crypto.setFips(bool)` | 6641 | 6605 |
| 6642 | 6606 | <!-- YAML | @@ -7463,59 +7427,6 @@ See the [list of SSL OP Flags][] for details. | 7463 | 7427 | </tr> | 7464 | 7428 | </table> | 7465 | 7429 |
| 7466 | | -### OpenSSL engine constants | 7467 | | - | 7468 | | -<table> | 7469 | | - <tr> | 7470 | | - <th>Constant</th> | 7471 | | - <th>Description</th> | 7472 | | - </tr> | 7473 | | - <tr> | 7474 | | - <td><code>ENGINE_METHOD_RSA</code></td> | 7475 | | - <td>Limit engine usage to RSA</td> | 7476 | | - </tr> | 7477 | | - <tr> | 7478 | | - <td><code>ENGINE_METHOD_DSA</code></td> | 7479 | | - <td>Limit engine usage to DSA</td> | 7480 | | - </tr> | 7481 | | - <tr> | 7482 | | - <td><code>ENGINE_METHOD_DH</code></td> | 7483 | | - <td>Limit engine usage to DH</td> | 7484 | | - </tr> | 7485 | | - <tr> | 7486 | | - <td><code>ENGINE_METHOD_RAND</code></td> | 7487 | | - <td>Limit engine usage to RAND</td> | 7488 | | - </tr> | 7489 | | - <tr> | 7490 | | - <td><code>ENGINE_METHOD_EC</code></td> | 7491 | | - <td>Limit engine usage to EC</td> | 7492 | | - </tr> | 7493 | | - <tr> | 7494 | | - <td><code>ENGINE_METHOD_CIPHERS</code></td> | 7495 | | - <td>Limit engine usage to CIPHERS</td> | 7496 | | - </tr> | 7497 | | - <tr> | 7498 | | - <td><code>ENGINE_METHOD_DIGESTS</code></td> | 7499 | | - <td>Limit engine usage to DIGESTS</td> | 7500 | | - </tr> | 7501 | | - <tr> | 7502 | | - <td><code>ENGINE_METHOD_PKEY_METHS</code></td> | 7503 | | - <td>Limit engine usage to PKEY_METHS</td> | 7504 | | - </tr> | 7505 | | - <tr> | 7506 | | - <td><code>ENGINE_METHOD_PKEY_ASN1_METHS</code></td> | 7507 | | - <td>Limit engine usage to PKEY_ASN1_METHS</td> | 7508 | | - </tr> | 7509 | | - <tr> | 7510 | | - <td><code>ENGINE_METHOD_ALL</code></td> | 7511 | | - <td></td> | 7512 | | - </tr> | 7513 | | - <tr> | 7514 | | - <td><code>ENGINE_METHOD_NONE</code></td> | 7515 | | - <td></td> | 7516 | | - </tr> | 7517 | | -</table> | 7518 | | - | 7519 | 7430 | ### Other OpenSSL constants | 7520 | 7431 |
| 7521 | 7432 | <table> | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/deprecations.md +11-7Lines changed: 11 additions & 7 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4111,20 +4111,25 @@ that are shorter than the default authentication tag length (i.e., shorter than | 4111 | 4111 |
| 4112 | 4112 | <!-- YAML | 4113 | 4113 | changes: | | 4114 | + - version: REPLACEME | | 4115 | + pr-url: https://github.com/nodejs/node/pull/64777 | | 4116 | + description: End-of-Life. | 4114 | 4117 | - version: | 4115 | 4118 | - v22.4.0 | 4116 | 4119 | - v20.16.0 | 4117 | 4120 | pr-url: https://github.com/nodejs/node/pull/53329 | 4118 | 4121 | description: Documentation-only deprecation. | 4119 | 4122 | --> | 4120 | 4123 |
| 4121 | | -Type: Documentation-only | | 4124 | +Type: End-of-Life | 4122 | 4125 |
| 4123 | | -OpenSSL 3 has deprecated support for custom engines with a recommendation to | 4124 | | -switch to its new provider model. The `clientCertEngine` option for | 4125 | | -`https.request()`, [`tls.createSecureContext()`][], and [`tls.createServer()`][]; | 4126 | | -the `privateKeyEngine` and `privateKeyIdentifier` for [`tls.createSecureContext()`][]; | 4127 | | -and [`crypto.setEngine()`][] all depend on this functionality from OpenSSL. | | 4126 | +The `crypto.setEngine()` API and the `crypto.constants.ENGINE_METHOD_*` | | 4127 | +constants have been removed. The `clientCertEngine` option for | | 4128 | +[`https.request()`][], [`tls.createSecureContext()`][], and | | 4129 | +[`tls.createServer()`][] and the `privateKeyEngine` and `privateKeyIdentifier` | | 4130 | +options for [`tls.createSecureContext()`][] now throw | | 4131 | +`ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED` when used. There is no direct | | 4132 | +replacement API in Node.js. OpenSSL's provider model replaces engines upstream. | 4128 | 4133 |
| 4129 | 4134 | ### DEP0184: Instantiating `node:zlib` classes without `new` | 4130 | 4135 |
| @@ -4887,7 +4892,6 @@ Type: Documentation-only | 4887 | 4892 | [`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback | 4888 | 4893 | [`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback | 4889 | 4894 | [`crypto.scrypt()`]: crypto.md#cryptoscryptpassword-salt-keylen-options-callback | 4890 | | -[`crypto.setEngine()`]: crypto.md#cryptosetengineengine-flags | 4891 | 4895 | [`decipher.final()`]: crypto.md#decipherfinaloutputencoding | 4892 | 4896 | [`decipher.setAuthTag()`]: crypto.md#deciphersetauthtagbuffer-encoding | 4893 | 4897 | [`dirent.parentPath`]: fs.md#direntparentpath | |
|