Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

feat(keys): implement duffle keys export <PATH> --armored #510

Closed
wants to merge 1 commit into from
Closed

feat(keys): implement duffle keys export <PATH> --armored #510

wants to merge 1 commit into from

Conversation

bacongobbler
Copy link
Contributor

closes #459

Signed-off-by: Matthew Fisher matt.fisher@microsoft.com

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
newfile := filepath.Join(dirname, "save.gpg")
is.NoError(kr.SavePublic(newfile, false, true))

t.Skip("Go openpgp bug with armored keys? gpg --import seems to work fine.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @technosophos (or anyone else that knows openpgp well enough), would you mind helping me figure this odd bug out? It looks like we can export armored keys into the right format, but for some reason it can't be imported back in. Disabling this skip ends in the following error which is similar to helm/helm#2843:

--- FAIL: TestKeyRing_SavePublicArmored (0.00s)
    c:\Users\me\code\go\src\github.com\deis\duffle\pkg\signature\keyring_test.go:235: 
        	Error Trace:	keyring_test.go:235
        	Error:      	Received unexpected error:
        	            	openpgp: invalid data: tag byte does not have MSB set
        	Test:       	TestKeyRing_SavePublicArmored
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x6a28b1]

goroutine 6 [running]:
testing.tRunner.func1(0xc0000e6100)
	C:/ProgramData/Fish/Barrel/go/1.11/go/src/testing/testing.go:792 +0x38e
panic(0x6f4420, 0x99d6b0)
	C:/ProgramData/Fish/Barrel/go/1.11/go/src/runtime/panic.go:513 +0x1c7
github.com/deis/duffle/pkg/signature.TestKeyRing_SavePublicArmored(0xc0000e6100)
	C:/Users/me/code/go/src/github.com/deis/duffle/pkg/signature/keyring_test.go:236 +0x2d1
testing.tRunner(0xc0000e6100, 0x766840)
	C:/ProgramData/Fish/Barrel/go/1.11/go/src/testing/testing.go:827 +0xc6
created by testing.(*T).Run
	C:/ProgramData/Fish/Barrel/go/1.11/go/src/testing/testing.go:878 +0x35a
FAIL	github.com/deis/duffle/pkg/signature	0.227s

@bacongobbler
Copy link
Contributor Author

Whoops... didn't see #498. Closing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --ascii/-a option to duffle key export
1 participant