MCPcopy
hub / github.com/smallstep/cli / mustReadSSHPublicKey

Function mustReadSSHPublicKey

token/options_test.go:113–123  ·  view source on GitHub ↗
(t *testing.T, filename string)

Source from the content-addressed store, hash-verified

111}
112
113func mustReadSSHPublicKey(t *testing.T, filename string) ssh.PublicKey {
114 t.Helper()
115
116 b, err := os.ReadFile(filename)
117 require.NoError(t, err)
118
119 pub, _, _, _, err := ssh.ParseAuthorizedKey(b)
120 require.NoError(t, err)
121
122 return pub
123}
124
125func serializeAndWriteNebulaCert(t *testing.T, tempDir string, cert nebula.Certificate) (string, []byte) {
126 file, err := os.CreateTemp(tempDir, "nebula-test-cert-*")

Callers 1

TestOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…