mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-14 21:43:27 +00:00
Merge pull request #71002 from awly/certutil-cleanup
Remove unused funcs in certutil Kubernetes-commit: d399e079f2726f1f667343e0ad862b18abf9977a
This commit is contained in:
commit
d56d3df33a
104
Godeps/Godeps.json
generated
104
Godeps/Godeps.json
generated
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/client-go",
|
"ImportPath": "k8s.io/client-go",
|
||||||
"GoVersion": "go1.11",
|
"GoVersion": "go1.11",
|
||||||
"GodepVersion": "v80-k8s-r1",
|
"GodepVersion": "v80",
|
||||||
"Packages": [
|
"Packages": [
|
||||||
"./..."
|
"./..."
|
||||||
],
|
],
|
||||||
@ -404,207 +404,207 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||||
"Rev": "a33c8200050fc0751848276811abf3fc029b3133"
|
"Rev": "2a7c9300402896b3c073f2f47df85527c94f83a0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/klog",
|
"ImportPath": "k8s.io/klog",
|
||||||
|
@ -260,34 +260,6 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a
|
|||||||
return certBuffer.Bytes(), keyBuffer.Bytes(), nil
|
return certBuffer.Bytes(), keyBuffer.Bytes(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// FormatBytesCert receives byte array certificate and formats in human-readable format
|
|
||||||
func FormatBytesCert(cert []byte) (string, error) {
|
|
||||||
block, _ := pem.Decode(cert)
|
|
||||||
c, err := x509.ParseCertificate(block.Bytes)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("failed to parse certificate [%v]", err)
|
|
||||||
}
|
|
||||||
return FormatCert(c), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// FormatCert receives certificate and formats in human-readable format
|
|
||||||
func FormatCert(c *x509.Certificate) string {
|
|
||||||
var ips []string
|
|
||||||
for _, ip := range c.IPAddresses {
|
|
||||||
ips = append(ips, ip.String())
|
|
||||||
}
|
|
||||||
altNames := append(ips, c.DNSNames...)
|
|
||||||
res := fmt.Sprintf(
|
|
||||||
"Issuer: CN=%s | Subject: CN=%s | CA: %t\n",
|
|
||||||
c.Issuer.CommonName, c.Subject.CommonName, c.IsCA,
|
|
||||||
)
|
|
||||||
res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter)
|
|
||||||
if len(altNames) > 0 {
|
|
||||||
res += fmt.Sprintf("\nAlternate Names: %v", altNames)
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
func ipsToStrings(ips []net.IP) []string {
|
func ipsToStrings(ips []net.IP) []string {
|
||||||
ss := make([]string, 0, len(ips))
|
ss := make([]string, 0, len(ips))
|
||||||
for _, ip := range ips {
|
for _, ip := range ips {
|
||||||
|
Loading…
Reference in New Issue
Block a user