1 // Copyright Joyent, Inc. and other Node contributors. 2 // 3 // Permission is hereby granted, free of charge, to any person obtaining a 4 // copy of this software and associated documentation files (the 5 // "Software"), to deal in the Software without restriction, including 6 // without limitation the rights to use, copy, modify, merge, publish, 7 // distribute, sublicense, and/or sell copies of the Software, and to permit 8 // persons to whom the Software is furnished to do so, subject to the 9 // following conditions: 10 // 11 // The above copyright notice and this permission notice shall be included 12 // in all copies or substantial portions of the Software. 13 // 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 // USE OR OTHER DEALINGS IN THE SOFTWARE. 21 22 #ifndef SRC_NODE_CONSTANTS_H_ 23 #define SRC_NODE_CONSTANTS_H_ 24 25 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 26 27 #include "node.h" 28 #include "v8.h" 29 30 #if HAVE_OPENSSL 31 32 #ifndef RSA_PSS_SALTLEN_DIGEST 33 #define RSA_PSS_SALTLEN_DIGEST -1 34 #endif 35 36 #ifndef RSA_PSS_SALTLEN_MAX_SIGN 37 #define RSA_PSS_SALTLEN_MAX_SIGN -2 38 #endif 39 40 #ifndef RSA_PSS_SALTLEN_AUTO 41 #define RSA_PSS_SALTLEN_AUTO -2 42 #endif 43 44 #if defined(NODE_OPENSSL_DEFAULT_CIPHER_LIST) 45 #define DEFAULT_CIPHER_LIST_CORE NODE_OPENSSL_DEFAULT_CIPHER_LIST 46 #else 47 // TLSv1.3 suites start with TLS_, and are the OpenSSL defaults, see: 48 // https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_ciphersuites.html 49 #define DEFAULT_CIPHER_LIST_CORE \ 50 "TLS_AES_256_GCM_SHA384:" \ 51 "TLS_CHACHA20_POLY1305_SHA256:" \ 52 "TLS_AES_128_GCM_SHA256:" \ 53 "ECDHE-RSA-AES128-GCM-SHA256:" \ 54 "ECDHE-ECDSA-AES128-GCM-SHA256:" \ 55 "ECDHE-RSA-AES256-GCM-SHA384:" \ 56 "ECDHE-ECDSA-AES256-GCM-SHA384:" \ 57 "DHE-RSA-AES128-GCM-SHA256:" \ 58 "ECDHE-RSA-AES128-SHA256:" \ 59 "DHE-RSA-AES128-SHA256:" \ 60 "ECDHE-RSA-AES256-SHA384:" \ 61 "DHE-RSA-AES256-SHA384:" \ 62 "ECDHE-RSA-AES256-SHA256:" \ 63 "DHE-RSA-AES256-SHA256:" \ 64 "HIGH:" \ 65 "!aNULL:" \ 66 "!eNULL:" \ 67 "!EXPORT:" \ 68 "!DES:" \ 69 "!RC4:" \ 70 "!MD5:" \ 71 "!PSK:" \ 72 "!SRP:" \ 73 "!CAMELLIA" 74 #endif // NODE_OPENSSL_DEFAULT_CIPHER_LIST 75 #endif // HAVE_OPENSSL 76 77 namespace node { 78 79 void DefineConstants(v8::Isolate* isolate, v8::Local<v8::Object> target); 80 } // namespace node 81 82 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 83 84 #endif // SRC_NODE_CONSTANTS_H_ 85