-
Notifications
You must be signed in to change notification settings - Fork 135
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
panic: interface conversion: interface is nil, not crypto.Signer #384
Comments
Could you please see if you have more than 1 key sets in your local environment by running |
Hello @aysylu , I have deleted all local keys and re-run "go run create_attestation.go" but still reported the above error. |
Hi @codingandcoding , would the changes in #388 fix your issue? (They should have similar effect as deleting existing keys, but in a more robust way). |
Hi @aysylu and @ooq , I suspect that there is a problem with the "createEntityFromKeys" method in "pkg/kritis/attestation/attestation.go" when executed to "err := e.Identities[uid.Id].SelfSignature.SignUserId(uid.Id, e. PrimaryKey, e.PrivateKey, &pgpConfig) "this line of code, the program is terminated, there is no return value. |
@codingandcoding thanks for reporting the issue! We're looking into this and were able to reproduce in some environments, but not all. @ooq is looking into this further. Just to confirm: @codingandcoding you ran the |
Hi @aysylu and @ooq Thank you for your efforts. I confirmed that I ran attestation_created.sh correctly. I seem to have found the cause of this problem. Execute to
|
@codingandcoding That's good news! |
@codingandcoding if you'd like to add some log statements to help with debugging (and a potential fix if you have one in mind), I'd be happy to take a look at the PR, merge the log statements and release as |
I know this is an old issue, but I was having a similar problem. I described a potential resolution for at least this piece in #594 (comment) |
When I execute "go run create_attestation.go" I get the following problem: panic: interface conversion: interface is nil, not crypto.Signer. The error details are as follows:
2019/08/11 22:54:34 Connecting to Grafeas server
2019/08/11 22:54:34 Created note name:"projects/kritis/notes/att" short_description:"Generic Attestation Policy Attestor" long_description:"Generic Attestation Policy Attestor deployed in default namespace" create_time:<seconds:1565535274 nanos:142102098 > update_time:<seconds:1565535274 nanos:142102098 > attestation_authority:<hint:<human_readable_name:"attestation" > > in project kritis
2019/08/11 22:54:34 Listing notes...
2019/08/11 22:54:34 [name:"projects/kritis/notes/att" short_description:"Generic Attestation Policy Attestor" long_description:"Generic Attestation Policy Attestor deployed in default namespace" create_time:<seconds:1565535274 nanos:142102098 > update_time:<seconds:1565535274 nanos:142102098 > attestation_authority:<hint:<human_readable_name:"attestation" > > ]
2019/08/11 22:54:34 Retrieved secret for 'attestor': &{0xc00030f3d0 attestor}
2019/08/11 22:54:34 Created fingerprint: F51A1EFDA6A2B60230033CFD7ED98F12A0FDAEEB
panic: interface conversion: interface is nil, not crypto.Signer
goroutine 1 [running]:
github.com/grafeas/kritis/vendor/golang.org/x/crypto/openpgp/packet.(*Signature).Sign(0xc0004ca000, 0x151b480, 0xc000418a00, 0xc000274d00, 0x203c4a0, 0xc000418a00, 0x0)
/root/go/src/github.com/grafeas/kritis/vendor/golang.org/x/crypto/openpgp/packet/signature.go:521 +0x119
github.com/grafeas/kritis/vendor/golang.org/x/crypto/openpgp/packet.(*Signature).SignUserId(0xc0004ca000, 0x0, 0x0, 0xc000404780, 0xc000274d00, 0x203c4a0, 0xc000330d80, 0x7f2339bf8400)
/root/go/src/github.com/grafeas/kritis/vendor/golang.org/x/crypto/openpgp/packet/signature.go:583 +0xb0
github.com/grafeas/kritis/pkg/kritis/attestation.createEntityFromKeys(0xc000404780, 0xc000274d00, 0xc00031bb30, 0x40ced5, 0x7f233c485018)
/root/go/src/github.com/grafeas/kritis/pkg/kritis/attestation/attestation.go:156 +0x2eb
github.com/grafeas/kritis/pkg/kritis/attestation.CreateMessageAttestation(0xc00030f3d0, 0xc0004c80e0, 0xdf, 0xe0, 0xc0004c80e0, 0xdf, 0x0)
/root/go/src/github.com/grafeas/kritis/pkg/kritis/attestation/attestation.go:102 +0x51
github.com/grafeas/kritis/pkg/kritis/util.CreateAttestationSignature(0x1386296, 0x5f, 0xc0001f6f20, 0x1, 0x1, 0xc00041f3b0, 0x28)
/root/go/src/github.com/grafeas/kritis/pkg/kritis/util/util.go:83 +0xe0
main.createOccRequest(0xc0000c9ce0, 0x1)
/root/go/src/github.com/grafeas/kritis/docs/standalone/create_attestation.go:135 +0x248
main.main()
/root/go/src/github.com/grafeas/kritis/docs/standalone/create_attestation.go:96 +0x687
exit status 2
Has anyone encountered this problem? Is there any solution please help me?
The text was updated successfully, but these errors were encountered: