certificate auth: fix source address checking inside crypto/ssh

So we can avoid to check source address ourself

81aafe6d26

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2020-05-16 15:15:32 +02:00
parent 7ae8b2cdeb
commit 469d36d979
6 changed files with 26 additions and 50 deletions

View File

@@ -1739,6 +1739,9 @@ func TestProxyProtocolVersion(t *testing.T) {
func TestLoadHostKeys(t *testing.T) {
c := Configuration{}
c.Keys = []Key{
{
PrivateKey: ".",
},
{
PrivateKey: "missing file",
},
@@ -1761,7 +1764,7 @@ func TestLoadHostKeys(t *testing.T) {
func TestCertCheckerInitErrors(t *testing.T) {
c := Configuration{}
c.TrustedUserCAKeys = append(c.TrustedUserCAKeys, "missing file")
c.TrustedUserCAKeys = []string{".", "missing file"}
err := c.initializeCertChecker("")
assert.Error(t, err)
testfile := filepath.Join(os.TempDir(), "invalidkey")