Lines Matching defs:secret
163 edns_cookie_server_hash(const uint8_t* in, const uint8_t* secret, int v4,
166 v4?siphash(in, 20, secret, hash, 8):siphash(in, 32, secret, hash, 8);
171 edns_cookie_server_write(uint8_t* buf, const uint8_t* secret, int v4,
180 (void)edns_cookie_server_hash(buf, secret, v4, hash);
186 const uint8_t* secret, size_t secret_len, int v4,
208 if(memcmp(edns_cookie_server_hash(hash_input, secret, v4, hash),
245 /** Read the cookie secret file */
250 char secret[UNBOUND_COOKIE_SECRET_SIZE * 2 + 2/*'\n' and '\0'*/];
261 log_err("Could not read cookie-secret-file '%s': %s",
267 /* cookie secret file exists and is readable */
271 if( fgets(secret, sizeof(secret), f) == NULL ) { break; }
272 secret_len = strlen(secret);
274 log_assert( secret_len <= sizeof(secret) );
275 secret_len = secret[secret_len - 1] == '\n' ? secret_len - 1 : secret_len;
278 secret[secret_len] = '\0';
279 decoded_len = hex_pton(secret, cookie_secrets->cookie_secrets[count].cookie_secret,
340 uint8_t* secret, size_t secret_len)
347 /* New cookie secret becomes the staging secret (position 1)
349 * secret. If the UNBOUND_COOKIE_HISTORY_SIZE > 2 then all staging cookies
354 , secret, UNBOUND_COOKIE_SECRET_SIZE);
356 explicit_bzero(secret, UNBOUND_COOKIE_SECRET_SIZE);
364 , secret, UNBOUND_COOKIE_SECRET_SIZE);
367 explicit_bzero(secret, UNBOUND_COOKIE_SECRET_SIZE);
375 /* The staging secret becomes the active secret.
376 * The active secret becomes a staging secret.
378 * one position up and the previously active secret becomes the last
379 * staging secret.
396 /* Drops a staging cookie secret. If there are more than one, it will
397 * drop the last staging secret. */