-
Notifications
You must be signed in to change notification settings - Fork 5
Comparing changes
Open a pull request
base repository: skeema/knownhosts
base: v1.2.2
head repository: skeema/knownhosts
compare: v1.3.0
- 8 commits
- 9 files changed
- 2 contributors
Commits on Jul 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7acc57b - Browse repository at this point
Copy the full SHA 7acc57bView commit details -
ci: send coverage to Coveralls; upgrade action versions
This commit adjusts the following parts of the GitHub Actions configuration for this repo: * Report test coverage to Coveralls via github.com/mattn/goveralls * Bump versions of actions/setup-go and actions/checkout to prevent "Node.js 16 actions are deprecated" warnings * Simplify installation command for golint * Include coverage badge in README
Configuration menu - View commit details
-
Copy full SHA for 5832aa8 - Browse repository at this point
Copy the full SHA 5832aa8View commit details
Commits on Jul 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d314bf3 - Browse repository at this point
Copy the full SHA d314bf3View commit details
Commits on Jul 7, 2024
-
certs: reimplement previous commit to maintain backwards compat
The previous commit d314bf3 added support for @cert-authority lines, but technically broke backwards compatibility due to changing the return type of one exported method. This commit adjusts that previous commit's new logic to restore backwards compatibility, and makes additional changes as follows: * Introduce new exported type HostKeyDB, which handles @cert-authority lines correctly and is returned by NewDB; old exported type HostKeyCallback (which is returned by New) omits that handling. Git-specific use-cases can likely remain with using New, since Git forges typically don't support CAs. Non-Git use-cases, such as general-purpose SSH clients, should consider switching to NewDB to get the CA logic. * When NewDB re-reads the known_hosts files to implement the CA support, it only re-reads each file a single time (vs potentially multiple times at callback execution time in d314bf3), and it reads using buffered IO similar to x/crypto/ssh/knownhosts. * This package's PublicKey struct now exports its Cert boolean field, vs keeping it private in d314bf3. * Refactor the RSA-to-algo expansion logic to simplify its handling in the CA situation. * Add test coverage for all new behaviors and @cert-authority logic.
Configuration menu - View commit details
-
Copy full SHA for 69b4a62 - Browse repository at this point
Copy the full SHA 69b4a62View commit details
Commits on Jul 9, 2024
-
Minor adjustments based on initial PR feedback
* Add new exported method HostKeyCallback.ToDB, to provide a mechanism for callers who want to conditionally enable or disable CA support, while still using a *HostKeyDB for both cases. * Clarify many doc string comments. * Add new exported function WriteKnownHostCA for writing a @cert-authority line to a known_hosts file. Previously this logic was in a test helper, but it could be useful to others, so let's export it outside of the tests.
Configuration menu - View commit details
-
Copy full SHA for 53a26cc - Browse repository at this point
Copy the full SHA 53a26ccView commit details
Commits on Jul 12, 2024
-
Merge pull request #9 from skeema/certs-backwards-compat
Backwards-compatible support for @cert-authority, implemented in a new HostKeyDB type, created with constructor NewDB.
Configuration menu - View commit details
-
Copy full SHA for 7c797a4 - Browse repository at this point
Copy the full SHA 7c797a4View commit details
Commits on Jul 16, 2024
-
host matching: handle wildcards with non-standard port (#10)
In OpenSSH, wildcard host pattern entries in a known_hosts file can match hosts regardless of their port number. However, x/crypto/ssh/knownhosts does not follow this behavior, instead requiring strict port equality; see bug golang/go#52056 for background. This commit implements a workaround in skeema/knownhosts, which is enabled when using the NewDB constructor. Conceptually, the workaround works like this: * At constructor time, when re-reading the known_hosts file (originally to look for @cert-authority lines), also look for lines that have wildcards in the host pattern and no port number specified. Track these lines in a new field of the HostKeyDB struct for later use. * When a host key callback returns no matches (KeyError with empty Want slice) and the host had a nonstandard (non-22) port number, try the callback again, this time manipulating the host arg to be on port 22. * If this second call returned nil error, that means the host key now matched a known_hosts entry on port 22, so consider the host as known. * If this second call returned a KeyError with non-empty Want slice, filter down the resulting keys to only correspond to lines with known wildcards, using the preprocessed information from the first step. This ensures we aren't incorrectly returning non-wildcard entries among the Want slice. The implementation for the latter 3 bullets gets embedded directly in the host key callback returned by HostKeyDB.HostKeyCallback, by way of some nested callback wrapping. This only happens if the first bullet actually found at least one wildcard in the file.
Configuration menu - View commit details
-
Copy full SHA for 8b8ca37 - Browse repository at this point
Copy the full SHA 8b8ca37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9485bde - Browse repository at this point
Copy the full SHA 9485bdeView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.2.2...v1.3.0