nghttpx: Fix crash if no keying materials are specified in file

This commit is contained in:
Tatsuhiro Tsujikawa 2021-09-24 18:19:01 +09:00
parent 7271537a15
commit f6da0d342a
1 changed files with 7 additions and 0 deletions

View File

@ -290,6 +290,13 @@ read_quic_secret_file(const StringRef &path) {
return nullptr;
}
if (kms.empty()) {
LOG(WARN)
<< "frontend-quic-secret-file: no keying materials are present in file "
<< path;
return nullptr;
}
return qkms;
}
#endif // ENABLE_HTTP3