Create backup file during migration from ACME V1 to ACME V2
This commit is contained in:
parent
f0589b310f
commit
a2e03e3bd0
5 changed files with 96 additions and 22 deletions
|
@ -134,10 +134,16 @@ func migrateACMEData(fileName string) (*acme.Account, error) {
|
|||
if accountFromNewFormat == nil {
|
||||
// convert ACME json file to KV store (used for backward compatibility)
|
||||
localStore := acme.NewLocalStore(fileName)
|
||||
|
||||
account, err = localStore.Get()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = acme.RemoveAccountV1Values(account)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
account = accountFromNewFormat
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue