mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-19 17:52:27 +00:00
Switch issued check to inspect certificate length
Kubernetes-commit: 94fd1d76ca0e8992b000fbb6b1562c11c37df7cb
This commit is contained in:
committed by
Kubernetes Publisher
parent
e72c3d3ce2
commit
198e8f5ee4
@@ -374,6 +374,9 @@ func getCurrentCertificateOrBootstrap(
|
||||
if err != nil {
|
||||
return nil, false, fmt.Errorf("unable to parse certificate data: %v", err)
|
||||
}
|
||||
if len(certs) < 1 {
|
||||
return nil, false, fmt.Errorf("no cert data found")
|
||||
}
|
||||
bootstrapCert.Leaf = certs[0]
|
||||
|
||||
if _, err := store.Update(bootstrapCertificatePEM, bootstrapKeyPEM); err != nil {
|
||||
|
Reference in New Issue
Block a user