check if the received server config is expired

This commit is contained in:
Marten Seemann
2016-11-16 11:51:10 +07:00
parent 0b736b2cce
commit f9013edb77
4 changed files with 32 additions and 1 deletions

View File

@@ -119,6 +119,10 @@ func (h *cryptoSetupClient) handleREJMessage(cryptoData map[Tag][]byte) error {
return err
}
if h.serverConfig.IsExpired() {
return qerr.CryptoServerConfigExpired
}
// now that we have a server config, we can use its OBIT value to generate a client nonce
if len(h.nonc) == 0 {
err = h.generateClientNonce()