vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Refuse an expired key on the client's clock too
9a561940442ab0e78fb7ea0f3dfcc3444334c447 · Keenan Nemetz · 15d ago · parent 546b225e
Refuse an expired key on the client's clock too A signature backdated before expiry is still rejected by a client whose clock says the key has expired, so check the real time as well as the pinned signing time. Also use the secret command's from-file option in the setup recipe.
scripts/sign-release.py +8−5
| @@ -132,11 +132,14 @@ def secret_key(home: Path, wanted: str | None) -> tuple[str, int, int]: | |||
| 132 | 132 | def signing_time(epoch: int, created: int, expires: int, fingerprint: str) -> int: | |
| 133 | 133 | """The signature time, pinned to the tag but never before the key existed.""" | |
| 134 | 134 | when = max(epoch, created) | |
| 135 | if expires and when > expires: | ||
| 136 | sys.exit( | ||
| 137 | f"the release key {fingerprint} expired at {time.strftime('%Y-%m-%d', time.gmtime(expires))}; " | ||
| 138 | "rotate it before signing a release" | ||
| 139 | ) | ||
| 135 | if expires: | ||
| 136 | expired = time.strftime("%Y-%m-%d", time.gmtime(expires)) | ||
| 137 | # A signature made with a fake clock before expiry is still rejected by a | ||
| 138 | # client whose clock says the key has expired, so check both clocks. | ||
| 139 | if time.time() > expires or when > expires: | ||
| 140 | sys.exit( | ||
| 141 | f"the release key {fingerprint} expired at {expired}; rotate it before signing a release" | ||
| 142 | ) | ||
| 140 | 143 | return when | |
| 141 | 144 | ||
| 142 | 145 | ||