Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
quic: use QuicCallbackScope consistently for QuicSession
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
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

0 comments on commit 6e65f26

Please sign in to comment.