nghttpx: Generate stateless reset secret
This commit is contained in:
parent
37bd9ffc48
commit
fe4c6e4c56
12
src/shrpx.cc
12
src/shrpx.cc
|
@ -1549,7 +1549,17 @@ void fill_default_config(Config *config) {
|
|||
}
|
||||
|
||||
auto &quicconf = config->quic;
|
||||
{ quicconf.timeout.idle = 30_s; }
|
||||
{
|
||||
quicconf.timeout.idle = 30_s;
|
||||
|
||||
auto &stateless_resetconf = quicconf.stateless_reset;
|
||||
// TODO Find better place to do this and error handling.
|
||||
if (RAND_bytes(stateless_resetconf.secret.data(),
|
||||
stateless_resetconf.secret.size()) != 1) {
|
||||
LOG(FATAL) << "Unable to generate stateless reset secret";
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
auto &loggingconf = config->logging;
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue