This commit is contained in:
Alistair Smith
2025-05-06 11:33:11 -07:00
parent f4d7d7b8e1
commit 90b3df2aac

View File

@@ -279,6 +279,7 @@ const SocketHandlers = {
if (self._requestCert || self._rejectUnauthorized) {
if (verifyError) {
self.authorized = false;
// TODO: authorizationError should be error instance?
self.authorizationError = verifyError.code || verifyError.message;
if (self._rejectUnauthorized) {
self.destroy(verifyError);
@@ -301,7 +302,7 @@ const SocketHandlers = {
},
binaryType: "buffer",
// TODO: We can improve the type of the socket here
} satisfies SocketHandler<import("net").Socket & { [Key in PropertyKey]: unknown }, "buffer">;
} satisfies SocketHandler<import("node:tls").TLSSocket & { [Key in PropertyKey]: unknown }, "buffer">;
const SocketEmitEndNT = (self, _err?) => {
if (!self[kended]) {