Skip to content

Commit

Permalink
Merge f7b0b89 into 2d51b4f
Browse files Browse the repository at this point in the history
  • Loading branch information
csstaub committed Aug 6, 2019
2 parents 2d51b4f + f7b0b89 commit 13c3657
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions certloader/no_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func (c *trustBundle) Reload() error {

// GetCertificate retrieves the actual underlying tls.Certificate.
func (c *trustBundle) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
return nil, nil
return new(tls.Certificate), nil
}

// GetClientCertificate retrieves the actual underlying tls.Certificate.
func (c *trustBundle) GetClientCertificate(certInfo *tls.CertificateRequestInfo) (*tls.Certificate, error) {
return nil, nil
return new(tls.Certificate), nil
}

// GetTrustStore returns the most up-to-date version of the trust store / CA bundle.
Expand Down
4 changes: 2 additions & 2 deletions certloader/no_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ func TestNoCertificate(t *testing.T) {
assert.Nil(t, err, "should read valid bundle")

c, err := cert.GetCertificate(nil)
assert.Nil(t, c, "should have nil server cert")
assert.NotNil(t, c, "should have non-nil server cert")

c, err = cert.GetClientCertificate(nil)
assert.Nil(t, c, "should have nil client cert")
assert.NotNil(t, c, "should have non-nil client cert")
}

func TestNoCertificateInvalid(t *testing.T) {
Expand Down

0 comments on commit 13c3657

Please sign in to comment.