gittuf/internal/testartifacts/ssh.go
Lukas Puehringer ad47487011 Remove testutils and setup ssh tests inline
Follow Aditya's suggestion to "embed" all needed testfiles (ssh keys and
askpass script) as bytes and write them to a tmp dir where needed:
https://github.com/gittuf/gittuf/pull/414#discussion_r1618647676

Removes previously added testutils.go

**Interesting discovery**
In order to sign with an "rsa" key, ssh-keygen seems to expect an
"rsa.pub" in the same directory. This is not the case for encrypted rsa,
no for plaintext or encrypted ecdsa or ed25519.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2024-05-29 18:05:52 +02:00

41 lines
880 B
Go

// SPDX-License-Identifier: Apache-2.0
package artifacts
import _ "embed"
//go:embed testdata/keys/ssh/rsa.pem
var SSHRSAPublic []byte
//go:embed testdata/keys/ssh/rsa.pub
var SSHRSAPublicSSH []byte
//go:embed testdata/keys/ssh/rsa
var SSHRSAPrivate []byte
//go:embed testdata/keys/ssh/rsa_enc
var SSHRSAPrivateEnc []byte
//go:embed testdata/keys/ssh/ecdsa.pem
var SSHECDSAPublic []byte
//go:embed testdata/keys/ssh/ecdsa.pub
var SSHECDSAPublicSSH []byte
//go:embed testdata/keys/ssh/ecdsa
var SSHECDSAPrivate []byte
//go:embed testdata/keys/ssh/ecdsa_enc
var SSHECDSAPrivateEnc []byte
//go:embed testdata/keys/ssh/ed25519.pem
var SSHED25519Public []byte
//go:embed testdata/keys/ssh/ed25519.pub
var SSHED25519PublicSSH []byte
//go:embed testdata/keys/ssh/ed25519
var SSHED25519Private []byte
//go:embed testdata/keys/ssh/ed25519_enc
var SSHED25519PrivateEnc []byte