Cache web authentication results
Add a short-lived, HMAC-keyed cache for validated principals and invalidate entries when principals become stale. Improve duplicate SSH key errors and enable Ed25519 streaming verification.
This commit is contained in:
+8
-1
@@ -356,7 +356,14 @@ static int add_key(const char *username)
|
||||
secure_wipe(blob, sizeof(blob));
|
||||
secure_wipe(line, sizeof(line));
|
||||
if (error != ESP_OK) {
|
||||
printf("Could not add SSH key: %s\n", esp_err_to_name(error));
|
||||
if (error == USER_DATABASE_ERR_DUPLICATE_SSH_KEY) {
|
||||
printf("Could not add SSH key: that public key is already assigned to an account.\n");
|
||||
} else if (error == ESP_ERR_NO_MEM) {
|
||||
printf("Could not add SSH key: the account already has %u keys.\n",
|
||||
USER_DATABASE_MAX_SSH_KEYS_PER_USER);
|
||||
} else {
|
||||
printf("Could not add SSH key: %s\n", esp_err_to_name(error));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
revoke_user_network_sessions(username);
|
||||
|
||||
Reference in New Issue
Block a user