Skip to content

Commit 5617b58

Browse files
committed
doc: Add OpenSSL errors to API docs
nodejs/node#34213
1 parent f86bb3f commit 5617b58

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

‎patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ index 67cd4f2adf15e7d8511f561c54163b1842e971af..7e0e1a62289289b8362870ba4869c974
4848

4949
const EVP_MD* digest = nullptr;
5050
diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc
51-
index 3517c39ad0b71a4d3efefeee2a3d55b70494bc1d..7164e539880e6d33ee1ea1fb77bae8adf4095708 100644
51+
index ee1c7931a5c83eec00fe05807ddb97572fe70cc9..8e297e57fdbc9fd42beb6e4a33cc91b9dd7316b8 100644
5252
--- a/src/crypto/crypto_common.cc
5353
+++ b/src/crypto/crypto_common.cc
5454
@@ -158,7 +158,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) {
@@ -77,7 +77,7 @@ index 3517c39ad0b71a4d3efefeee2a3d55b70494bc1d..7164e539880e6d33ee1ea1fb77bae8ad
7777
if (!SSL_client_hello_get0_ext(
7878
ssl.get(),
7979
TLSEXT_TYPE_server_name,
80-
@@ -199,15 +201,20 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) {
80+
@@ -199,6 +201,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) {
8181
if (len + 2 > rem)
8282
return nullptr;
8383
return reinterpret_cast<const char*>(buf + 5);
@@ -86,22 +86,18 @@ index 3517c39ad0b71a4d3efefeee2a3d55b70494bc1d..7164e539880e6d33ee1ea1fb77bae8ad
8686
}
8787

8888
const char* GetServerName(SSL* ssl) {
89-
return SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
89+
@@ -206,7 +210,10 @@ const char* GetServerName(SSL* ssl) {
9090
}
9191

92-
-bool SetGroups(SecureContext* sc, const char* groups) {
93-
- return SSL_CTX_set1_groups_list(sc->ctx().get(), groups) == 1;
94-
-}
95-
+ bool SetGroups(SecureContext* sc, const char* groups) {
92+
bool SetGroups(SecureContext* sc, const char* groups) {
9693
+#ifndef OPENSSL_IS_BORINGSSL
97-
+ return SSL_CTX_set1_groups_list(sc->ctx().get(), groups) == 1;
94+
return SSL_CTX_set1_groups_list(sc->ctx().get(), groups) == 1;
9895
+#endif
9996
+ return SSL_CTX_set1_curves_list(sc->ctx().get(), groups) == 1;
100-
+ }
97+
}
10198

102-
const char* X509ErrorCode(long err) { // NOLINT(runtime/int)
103-
const char* code = "UNSPECIFIED";
104-
@@ -1042,14 +1049,14 @@ MaybeLocal<Array> GetClientHelloCiphers(
99+
// When adding or removing errors below, please also update the list in the API
100+
@@ -1044,14 +1051,14 @@ MaybeLocal<Array> GetClientHelloCiphers(
105101
Environment* env,
106102
const SSLPointer& ssl) {
107103
EscapableHandleScope scope(env->isolate());

0 commit comments

Comments
 (0)