diff options
author | James M Snell <jasnell@gmail.com> | 2020-07-30 00:19:25 +0300 |
---|---|---|
committer | gengjiawen <technicalcute@gmail.com> | 2020-08-03 15:03:06 +0300 |
commit | 6e65f26b73c67869a3ac5ee2caf0dfd011177d66 (patch) | |
tree | 6eefcb4190fbfadbcdd6b7c31dac1977870eee07 /lib/internal/quic | |
parent | d96083bad56e97ddef525c2c0db6963d70fd6f6c (diff) |
quic: use QuicCallbackScope consistently for QuicSession
PR-URL: https://github.com/nodejs/node/pull/34541
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'lib/internal/quic')
-rw-r--r-- | lib/internal/quic/core.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index 3a2bddb8278..47269ec00aa 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -2287,12 +2287,11 @@ class QuicServerSession extends QuicSession { async [kHandleOcsp](servername) { const internalState = this[kInternalState]; const { context } = this[kInternalServerState]; - const certificate = context?.context.getCertificate?.(); - const issuer = context?.context.getIssuer?.(); - return internalState.ocspHandler?.('request', { + if (!internalState.ocspHandler || !context) return undefined; + return internalState.ocspHandler('request', { servername, - certificate, - issuer + certificate: context.context.getCertificate(), + issuer: context.context.getIssuer() }); } |