Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
asincu committed Sep 12, 2023
1 parent e3426ed commit 3dc8f90
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions pkg/tls/certificatemanagement/certificatebundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,6 @@ func (c *certificate) GetIssuer() CertificateInterface {
return c.issuer
}

func (c *certificate) GetCommonName() string {
cert, err := ParseCertificate(c.pem)
if err != nil {
return ""
}

return cert.Issuer.CommonName
}

// certFiles is copied from the x509 package, but re-ordered, since in practice this should run containerized
// and stop at the first entry. More at: https://go.dev/src/crypto/x509/root_linux.go for the source.
//
Expand Down
1 change: 0 additions & 1 deletion pkg/tls/certificatemanagement/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ type CertificateInterface interface {
GetCertificatePEM() []byte
GetName() string
GetNamespace() string
GetCommonName() string
}

// TrustedBundle is used to create a trusted certificate bundle of the CertificateManager CA and 0 or more Certificates.
Expand Down
9 changes: 0 additions & 9 deletions pkg/tls/certificatemanagement/keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,6 @@ func (k *KeyPair) GetIssuer() CertificateInterface {
return k.Issuer
}

func (k *KeyPair) GetCommonName() string {
cert, err := ParseCertificate(k.CertificatePEM)
if err != nil {
return ""
}

return cert.Issuer.CommonName
}

// NewKeyPair returns a KeyPair, which wraps a Secret object that contains a private key and a certificate. Whether certificate
// management is configured or not, KeyPair returns the right InitContainer, Volumemount or Volume (when applicable).
func NewKeyPair(secret *corev1.Secret, dnsNames []string, clusterDomain string) KeyPairInterface {
Expand Down

0 comments on commit 3dc8f90

Please sign in to comment.