| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tofu: Use stricter file permissions | Adnan Maolood | 2021-03-09 | 1 | -1/+1 |
| | | |||||
| * | tofu: Create path if not exists | Noah Kleiner | 2021-03-09 | 1 | -0/+5 |
| | | | | | | This commit is a follow-up to 56774408 which does not take into account the case that the parent directory of the known_hosts file does not already exist. | ||||
| * | tofu: Fix known host unmarshaling | Adnan Maolood | 2021-03-06 | 1 | -23/+6 |
| | | |||||
| * | tofu: Use base64-encoded sha256 fingerprints | Adnan Maolood | 2021-03-06 | 1 | -65/+17 |
| | | |||||
| * | tofu: Fix format in error message | Adnan Maolood | 2021-03-06 | 1 | -1/+1 |
| | | |||||
| * | tofu: Automatically create file in KnownHosts.Load | Adnan Maolood | 2021-03-06 | 1 | -1/+1 |
| | | |||||
| * | tofu: Remove expiration timestamp from known hosts | Adnan Maolood | 2021-03-04 | 1 | -28/+6 |
| | | |||||
| * | tofu: Update documentation | Adnan Maolood | 2021-02-23 | 1 | -1/+2 |
| | | |||||
| * | tofu: Implement PersistentHosts | Adnan Maolood | 2021-01-25 | 1 | -11/+84 |
| | | |||||
| * | tofu: Fix example | Adnan Maolood | 2021-01-14 | 1 | -1/+1 |
| | | |||||
| * | tofu: Update documentation | Adnan Maolood | 2021-01-14 | 1 | -7/+21 |
| | | |||||
| * | tofu: Update documentation | Adnan Maolood | 2021-01-14 | 1 | -1/+5 |
| | | |||||
| * | tofu: Rename KnownHosts.Hosts to Entries | Adnan Maolood | 2021-01-14 | 1 | -2/+2 |
| | | |||||
| * | Add KnownHosts.Hosts function | Adnan Maolood | 2021-01-14 | 1 | -0/+16 |
| | | |||||
| * | tofu: Add KnownHosts.Load function | Adnan Maolood | 2021-01-14 | 1 | -0/+11 |
| | | |||||
| * | tofu: Add NewHostsFile function | Adnan Maolood | 2021-01-14 | 1 | -4/+26 |
| | | |||||
| * | tofu: Protect HostWriter with a mutex | Adnan Maolood | 2021-01-14 | 1 | -4/+8 |
| | | |||||
| * | tofu: Refactor known hosts | Adnan Maolood | 2021-01-14 | 1 | -149/+92 |
| | | | | | | | | | This commit introduces the KnownHosts struct, whose purpose is simply to store known hosts entries. The HostWriter struct is now in charge of appending hosts to files, and the two are not dependent on each other. Users are now responsible for opening the known hosts file and closing it when they are finished with it. | ||||
| * | tofu: Rename KnownHost to Host | Adnan Maolood | 2021-01-14 | 1 | -47/+47 |
| | | |||||
| * | tofu: Refactor | Hugo Wetterberg | 2021-01-14 | 1 | -76/+248 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes underlying file handling and known hosts parsing. A known hosts file opened through Load() never closed the underlying file. During known hosts parsing most errors were unchecked, or just led to the line being skipped. I removed the KnownHosts type, which didn't really have a role after the refactor. The embedding of KnownHosts in KnownHosts file has been removed as it also leaked the map unprotected by the mutex. The Fingerprint type is now KnownHost and has taken over the responsibility of marshalling and unmarshalling. SetOutput now takes a WriteCloser so that we can close the underlying writer when it's replaced, or when it's explicitly closed through the new Close() function. KnownHostsFile.Add() now also writes the known host to the output if set. I think that makes sense expectation-wise for the type. Turned WriteAll() into WriteTo() to conform with the io.WriterTo interface. Load() is now Open() to better reflect the fact that a file is opened, and kept open. It can now also return errors from the parsing process. The parser does a lot more error checking, and this might be an area where I've changed a desired behaviour as invalid entries no longer are ignored, but aborts the parsing process. That could be changed to a warning, or some kind of parsing feedback. I added KnownHostsFile.TOFU() to fill the developer experience gap that was left after the client no longer knows about KnownHostsFile. It implements a basic non-interactive TOFU flow. | ||||
| * | Move tofu.go to a subpackagev0.1.11 | Adnan Maolood | 2021-01-10 | 1 | -0/+158 |