mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-11 07:11:00 +00:00
Add wrappers to identity methods in the ca package.
This commit is contained in:
parent
524c221c61
commit
65b4dda420
10
ca/client.go
10
ca/client.go
@ -1123,6 +1123,16 @@ func CreateIdentityRequest(commonName string, sans ...string) (*api.CertificateR
|
||||
return createCertificateRequest(commonName, sans, identityKey)
|
||||
}
|
||||
|
||||
// LoadDefaultIdentity is a wrapper for identity.LoadDefaultIdentity.
|
||||
func LoadDefaultIdentity() (*identity.Identity, error) {
|
||||
return identity.LoadDefaultIdentity()
|
||||
}
|
||||
|
||||
// WriteDefaultIdentity is a wrapper for identity.WriteDefaultIdentity.
|
||||
func WriteDefaultIdentity(certChain []api.Certificate, key crypto.PrivateKey) error {
|
||||
return identity.WriteDefaultIdentity(certChain, key)
|
||||
}
|
||||
|
||||
func createCertificateRequest(commonName string, sans []string, key crypto.PrivateKey) (*api.CertificateRequest, crypto.PrivateKey, error) {
|
||||
if len(sans) == 0 {
|
||||
sans = []string{commonName}
|
||||
|
Loading…
Reference in New Issue
Block a user