func (e *loginProvision) switchToGPGSign(ctx *Context, key *libkb.GpgPrimaryKey, importError error) (libkb.GenericKey, error) { gk := keybase1.GPGKey{ Algorithm: key.AlgoString(), KeyID: key.ID64, Creation: key.CreatedString(), Identities: key.GetPGPIdentities(), } arg := keybase1.SwitchToGPGSignOKArg{ Key: gk, ImportError: importError.Error(), } ok, err := ctx.ProvisionUI.SwitchToGPGSignOK(ctx.GetNetContext(), arg) if err != nil { return nil, err } if !ok { return nil, fmt.Errorf("user chose not to switch to GPG sign, original import error: %s", importError) } e.G().Log.Debug("switching to GPG sign") return e.gpgSignKey(ctx, key.GetFingerprint()) }