Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing Public Key in Keyring. #8454

Closed
4 tasks
jgimeno opened this issue Jan 27, 2021 · 3 comments
Closed
4 tasks

Error importing Public Key in Keyring. #8454

jgimeno opened this issue Jan 27, 2021 · 3 comments
Assignees
Labels
C:Keys Keybase, KMS and HSMs T:Bug

Comments

@jgimeno
Copy link
Contributor

jgimeno commented Jan 27, 2021

Summary of Bug

There is a problem when trying to import a Public key into the Keyring that was generated with old Keyring which were saved in database.

Version

Steps to Reproduce

pubkeyArmor, err := legacyKb.ExportPubKey(keyName)
if err != nil {
    return err
}

if err := keyring.ImportPubKey(keyName, pubkeyArmor); err != nil {
    return err
}

We export the Public Key from a legacykb and import it back in the new keyring.

The new Keyring uses internally:

	pubKey, err := legacy.PubKeyFromBytes(pubBytes)
	if err != nil {
		return err
	}

Which gives the error:

unmarshal to types.PubKey failed after 4 bytes (unrecognized prefix bytes 02669815): 0266981512EBBCDE96BB024594135859F81A967E0CDDBC620C23420DC92F11F061

Probably related to: #7987


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alessio
Copy link
Contributor

alessio commented Jan 27, 2021

CC'ing @chengwenxi @fedekunze

@alessio alessio added C:Keys Keybase, KMS and HSMs regression labels Jan 27, 2021
@alessio
Copy link
Contributor

alessio commented Jan 27, 2021

@zmanian

@sahith-narahari
Copy link
Contributor

Fixed in #8436

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Keys Keybase, KMS and HSMs T:Bug
Projects
None yet
Development

No branches or pull requests

4 participants