Lines Matching defs:secret

135 edns_cookie_server_hash(const uint8_t* in, const uint8_t* secret, int v4,
138 v4?siphash(in, 20, secret, hash, 8):siphash(in, 32, secret, hash, 8);
143 edns_cookie_server_write(uint8_t* buf, const uint8_t* secret, int v4,
152 (void)edns_cookie_server_hash(buf, secret, v4, hash);
158 const uint8_t* secret, size_t secret_len, int v4,
180 if(memcmp(edns_cookie_server_hash(hash_input, secret, v4, hash),
217 /** Read the cookie secret file */
222 char secret[UNBOUND_COOKIE_SECRET_SIZE * 2 + 2/*'\n' and '\0'*/];
233 log_err("Could not read cookie-secret-file '%s': %s",
239 /* cookie secret file exists and is readable */
243 if( fgets(secret, sizeof(secret), f) == NULL ) { break; }
244 secret_len = strlen(secret);
246 log_assert( secret_len <= sizeof(secret) );
247 secret_len = secret[secret_len - 1] == '\n' ? secret_len - 1 : secret_len;
250 secret[secret_len] = '\0';
251 decoded_len = hex_pton(secret, cookie_secrets->cookie_secrets[count].cookie_secret,
312 uint8_t* secret, size_t secret_len)
319 /* New cookie secret becomes the staging secret (position 1)
321 * secret. If the UNBOUND_COOKIE_HISTORY_SIZE > 2 then all staging cookies
326 , secret, UNBOUND_COOKIE_SECRET_SIZE);
328 explicit_bzero(secret, UNBOUND_COOKIE_SECRET_SIZE);
336 , secret, UNBOUND_COOKIE_SECRET_SIZE);
339 explicit_bzero(secret, UNBOUND_COOKIE_SECRET_SIZE);
347 /* The staging secret becomes the active secret.
348 * The active secret becomes a staging secret.
350 * one position up and the previously active secret becomes the last
351 * staging secret.
368 /* Drops a staging cookie secret. If there are more than one, it will
369 * drop the last staging secret. */