Skip to content

Commit 921fb1f

Browse files
avivkellermootari
authored andcommitted
tls: fix 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED' typo
Co-Authored-By: Fabian Iwand <[email protected]> PR-URL: nodejs#52627 Fixes: nodejs#52448 Refs: nodejs#23188 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
1 parent 919af16 commit 921fb1f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

doc/api/errors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2803,9 +2803,9 @@ event is emitted before continuing.
28032803
Attempting to set a TLS protocol `minVersion` or `maxVersion` conflicts with an
28042804
attempt to set the `secureProtocol` explicitly. Use one mechanism or the other.
28052805

2806-
<a id="ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED"></a>
2806+
<a id="ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED"></a>
28072807

2808-
### `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED`
2808+
### `ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED`
28092809

28102810
Failed to set PSK identity hint. Hint may be too long.
28112811

doc/api/tls.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ changes:
22102210
* `pskIdentityHint` {string} optional hint to send to a client to help
22112211
with selecting the identity during TLS-PSK negotiation. Will be ignored
22122212
in TLS 1.3. Upon failing to set pskIdentityHint `'tlsClientError'` will be
2213-
emitted with `'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED'` code.
2213+
emitted with `'ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED'` code.
22142214
* ...: Any [`tls.createSecureContext()`][] option can be provided. For
22152215
servers, the identity options (`pfx`, `key`/`cert`, or `pskCallback`)
22162216
are usually required.

src/crypto/crypto_tls.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ void TLSWrap::SetPskIdentityHint(const FunctionCallbackInfo<Value>& args) {
14131413
Utf8Value hint(isolate, args[0].As<String>());
14141414

14151415
if (!SSL_use_psk_identity_hint(p->ssl_.get(), *hint)) {
1416-
Local<Value> err = node::ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED(isolate);
1416+
Local<Value> err = node::ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED(isolate);
14171417
p->MakeCallback(env->onerror_string(), 1, &err);
14181418
}
14191419
}

src/node_errors.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void OOMErrorHandler(const char* location, const v8::OOMDetails& details);
104104
V(ERR_SCRIPT_EXECUTION_TIMEOUT, Error) \
105105
V(ERR_STRING_TOO_LONG, Error) \
106106
V(ERR_TLS_INVALID_PROTOCOL_METHOD, TypeError) \
107-
V(ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED, Error) \
107+
V(ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED, Error) \
108108
V(ERR_VM_MODULE_CACHED_DATA_REJECTED, Error) \
109109
V(ERR_VM_MODULE_LINK_FAILURE, Error) \
110110
V(ERR_WASI_NOT_STARTED, Error) \
@@ -202,7 +202,7 @@ ERRORS_WITH_CODE(V)
202202
"--experimental-print-required-tla.") \
203203
V(ERR_SCRIPT_EXECUTION_INTERRUPTED, \
204204
"Script execution was interrupted by `SIGINT`") \
205-
V(ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED, "Failed to set PSK identity hint") \
205+
V(ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED, "Failed to set PSK identity hint") \
206206
V(ERR_WASI_NOT_STARTED, "wasi.start() has not been called") \
207207
V(ERR_WORKER_INIT_FAILED, "Worker initialization failure") \
208208
V(ERR_PROTO_ACCESS, \

test/parallel/test-tls-psk-errors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const tls = require('tls');
1717
});
1818
server.on('tlsClientError', (err) => {
1919
assert.ok(err instanceof Error);
20-
assert.strictEqual(err.code, 'ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED');
20+
assert.strictEqual(err.code, 'ERR_TLS_PSK_SET_IDENTITY_HINT_FAILED');
2121
server.close();
2222
});
2323
server.listen(0, () => {

0 commit comments

Comments
 (0)