Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh/communicator_test fails in 2030 #21727

Open
bmwiedemann opened this issue Jun 14, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@bmwiedemann
Copy link

commented Jun 14, 2019

Terraform Version

0.11.11

Expected Behavior

build+tests should succeed anytime in the future

Actual Behavior

build fails in 2030

Debug Output

2034/07/16 21:34:21 [WARN] ssh: handshake failed: ssh: cert has expired
--- FAIL: TestHostCert (0.00s)
    communicator_test.go:340: ssh: handshake failed: ssh: cert has expired

Steps to Reproduce

in openSUSE or Debian do

osc co openSUSE:Factory/terraform ; cd $_
osc build --build-opt=--vm-custom-opt="--rtc base=2030-02-01T00:00:00" --noservice --vm-type=kvm --clean

Additional Context

Using ssh-keygen -L -f $FILE to decode the cert in ./communicator/ssh/communicator_test.go line 57 shows the expiry of 2030-01-01T05:00

        Type: ssh-rsa-cert-v01@openssh.com host certificate
        Public key: RSA-CERT SHA256:NaCSsxvUtzC+lJK7JLwZ/8FojyAKpGXAJUs51ZqRnOE
        Signing CA: RSA SHA256:6IVexLqB3lfZtvBUi29wV0Mw/R3Qk4YMSjCsTgtKM/c
        Key ID: "ca-test"
        Serial: 0
        Valid: from 2018-02-13T20:21:56 to 2030-01-01T05:00:00
        Principals:
                127.0.0.1

This bug was found while working on reproducible builds for openSUSE.

Background:
As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future.
The usual offset is +15 years, because that is how long I expect some software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.

@mildwonkey mildwonkey added the build label Jun 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.