forked from TrueCloudLab/certificates
Fix linter error importShadow
This commit is contained in:
parent
304bb5b97a
commit
dfdc9c06ed
2 changed files with 5 additions and 5 deletions
|
@ -246,14 +246,14 @@ func (c *linkedCaClient) GetCertificateData(serial string) (*db.CertificateData,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
var provisioner *db.ProvisionerData
|
||||
var pd *db.ProvisionerData
|
||||
if p := resp.Provisioner; p != nil {
|
||||
provisioner = &db.ProvisionerData{
|
||||
pd = &db.ProvisionerData{
|
||||
ID: p.Id, Name: p.Name, Type: p.Type.String(),
|
||||
}
|
||||
}
|
||||
return &db.CertificateData{
|
||||
Provisioner: provisioner,
|
||||
Provisioner: pd,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ func (a *Authority) RemoveProvisioner(ctx context.Context, id string) error {
|
|||
|
||||
// CreateFirstProvisioner creates and stores the first provisioner when using
|
||||
// admin database provisioner storage.
|
||||
func CreateFirstProvisioner(ctx context.Context, db admin.DB, password string) (*linkedca.Provisioner, error) {
|
||||
func CreateFirstProvisioner(ctx context.Context, adminDB admin.DB, password string) (*linkedca.Provisioner, error) {
|
||||
if password == "" {
|
||||
pass, err := ui.PromptPasswordGenerate("Please enter the password to encrypt your first provisioner, leave empty and we'll generate one")
|
||||
if err != nil {
|
||||
|
@ -318,7 +318,7 @@ func CreateFirstProvisioner(ctx context.Context, db admin.DB, password string) (
|
|||
},
|
||||
},
|
||||
}
|
||||
if err := db.CreateProvisioner(ctx, p); err != nil {
|
||||
if err := adminDB.CreateProvisioner(ctx, p); err != nil {
|
||||
return nil, admin.WrapErrorISE(err, "error creating provisioner")
|
||||
}
|
||||
return p, nil
|
||||
|
|
Loading…
Reference in a new issue