Skip to content

Commit

Permalink
quic: use QuicCallbackScope consistently for QuicSession
Browse files Browse the repository at this point in the history
PR-URL: #34541
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
jasnell authored and gengjiawen committed Aug 3, 2020
1 parent d96083b commit 6e65f26
Show file tree
Hide file tree
Showing 2 changed files with 190 additions and 96 deletions.
9 changes: 4 additions & 5 deletions lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
});
}

Expand Down
Loading

0 comments on commit 6e65f26

Please sign in to comment.