This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(certificate): Remove the Certificater interface in favor of a st…
…ruct. (#4536) Currently there is a Certificater interface that is used to abstract a Certificate. There are 3 identical implementations of Certificate, and some misuse between treating a certificater as either a pointer or a struct. This PR simplifies this by consolidating to a single implementation of Certificate, and removing the need for an interface all together. Signed-off-by: Sean Teeling <[email protected]>
- Loading branch information
Showing
48 changed files
with
391 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package certificate | ||
|
||
import ( | ||
time "time" | ||
|
||
"github.com/openservicemesh/osm/pkg/certificate/pem" | ||
) | ||
|
||
// GetCommonName returns the Common Name of the certificate | ||
func (c *Certificate) GetCommonName() CommonName { | ||
return c.CommonName | ||
} | ||
|
||
// GetSerialNumber returns the serial number of the certificate | ||
func (c *Certificate) GetSerialNumber() SerialNumber { | ||
return c.SerialNumber | ||
} | ||
|
||
// GetExpiration returns the expiration time of the certificate | ||
func (c *Certificate) GetExpiration() time.Time { | ||
return c.Expiration | ||
} | ||
|
||
// GetCertificateChain returns the certificate chain of the certificate | ||
func (c *Certificate) GetCertificateChain() pem.Certificate { | ||
return c.CertChain | ||
} | ||
|
||
// GetPrivateKey returns the private key of the certificate | ||
func (c *Certificate) GetPrivateKey() pem.PrivateKey { | ||
return c.PrivateKey | ||
} | ||
|
||
// GetIssuingCA returns the issuing CA of the certificate | ||
func (c *Certificate) GetIssuingCA() pem.RootCertificate { | ||
return c.IssuingCA | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.