Update go dependencies
This commit is contained in:
parent
15ffb51394
commit
bb4d483837
1621 changed files with 86368 additions and 284392 deletions
33
vendor/github.com/zakjan/cert-chain-resolver/certUtil/chain_test.go
generated
vendored
33
vendor/github.com/zakjan/cert-chain-resolver/certUtil/chain_test.go
generated
vendored
|
|
@ -1,33 +0,0 @@
|
|||
package certUtil
|
||||
|
||||
import (
|
||||
"crypto/x509"
|
||||
"testing"
|
||||
"os"
|
||||
"io/ioutil"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestFetchCertificateChain(t *testing.T) {
|
||||
file, err := os.Open("../tests/comodo.der.crt")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
data, err := ioutil.ReadAll(file)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
cert, err := x509.ParseCertificate(data)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
certs, err := FetchCertificateChain(cert)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
assert.Equal(t, 3, len(certs))
|
||||
}
|
||||
11
vendor/github.com/zakjan/cert-chain-resolver/certUtil/io_test.go
generated
vendored
11
vendor/github.com/zakjan/cert-chain-resolver/certUtil/io_test.go
generated
vendored
|
|
@ -1,11 +0,0 @@
|
|||
package certUtil
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIsPEM(t *testing.T) {
|
||||
assert.True(t, IsPEM([]byte("-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----")))
|
||||
assert.False(t, IsPEM([]byte("xxx")))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue