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

Does not work under Windows #32

Open
riccardobonatiaesys opened this issue Feb 14, 2024 · 13 comments
Open

Does not work under Windows #32

riccardobonatiaesys opened this issue Feb 14, 2024 · 13 comments

Comments

@riccardobonatiaesys
Copy link

riccardobonatiaesys commented Feb 14, 2024

Hello,

i succesfully compile estclient under Ubuntu (amd64) and Raspbian (armv6l) but seems that i can't compile estclient under Windows; this is the output i get:

C:\Windows\System32>go version
go version go1.22.0 windows/amd64

C:\Windows\System32>go install github.com/globalsign/est/cmd/estclient@latest
github.com/ThalesIgnite/crypto11
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:120:16: undefined: pkcs11.ObjectHandle
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:139:22: undefined: pkcs11.ObjectHandle
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:167:14: undefined: pkcs11.Ctx
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:170:16: undefined: pkcs11.TokenInfo
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:176:27: undefined: pkcs11.SessionHandle
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\aead.go:56:64: undefined: pkcs11.Mechanism
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\aead.go:56:83: undefined: pkcs11.GCMParams
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\attributes.go:15:25: undefined: pkcs11.Attribute
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\sessions.go:34:17: undefined: pkcs11.Ctx
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\sessions.go:35:16: undefined: pkcs11.SessionHandle
C:\Users\xxx.yyy\go\pkg\mod\github.com!thales!ignite\[email protected]\crypto11.go:139:22: too many errors

i am not very skilled with go.

How can it be?

Thank you very much

@toddgaunt-gs
Copy link
Collaborator

Hey @riccardobonatiaesys, have you tried compiling with WSL under Windows instead? Those errors appearing also seem to have a strange "!thales!ignite" component in the path that I don't recognize.

@riccardobonatiaesys
Copy link
Author

Hi @toddgaunt-gs , thanks for the suggestion; I tried compiling with WSL under Windows and it gave me the same strange errors that appear when compiling directly under Windows.

@toddgaunt-gs
Copy link
Collaborator

@riccardobonatiaesys sorry I'm not sure I'll be able to help very much as I don't have a Windows machine to rule that out as an issue. It looks like one of the dependencies of this project (github.com/thalesignite/pkcs11) isn't able to compile correctly on your setup. I would suggest trying this out in a clean environment with a fresh installation of Go. I have tried go1.22.0 locally to make sure it wasn't an issue with the version of Go you were using and still didn't encounter the same error:

todd.gaunt@fedora[~/go/pkg]
(2)> go1.22.0 install github.com/globalsign/est/cmd/estclient@latest                                                                                                                                                                                    [130]
go: downloading github.com/globalsign/est v1.0.6
go: downloading github.com/globalsign/tpmkeys v1.0.3
go: downloading github.com/google/go-tpm v0.3.2
go: downloading go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1
go: downloading golang.org/x/crypto v0.0.0-20200602180216-279210d13fed
go: downloading github.com/ThalesIgnite/crypto11 v1.2.1
go: downloading github.com/globalsign/pemfile v1.0.0
go: downloading github.com/go-chi/chi v4.1.2+incompatible
go: downloading golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
go: downloading github.com/thales-e-security/pool v0.0.1
go: downloading github.com/pkg/errors v0.8.1
go: downloading github.com/miekg/pkcs11 v1.0.3-0.20190429190417-a667d056470f
go: downloading golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43

@riccardobonatiaesys
Copy link
Author

@toddgaunt-gs I tried to do a clean installation without success; now I will try with an earlier version of Windows and i will update you.

@toddgaunt-gs
Copy link
Collaborator

I doubt an earlier version of Windows will work but let me know how it turns out. My gut feeling is that this is probably a Go/Windows library support issue.

@100110010111
Copy link

Just wanted to say I had the same problem on Windows. Would love to get this working.

@toddgaunt-gs
Copy link
Collaborator

Same! I don't have any Windows machines to test with so contribution would be welcome here.

@riccardobonatiaesys
Copy link
Author

riccardobonatiaesys commented Mar 21, 2024

Yes guys, sorry for the late reply...I ran tests on Windows 11 and Windows 10, both without success. I will run tests with Windows 8 and Windows 7 shortly. I will keep you updated.

@toddgaunt-gs
Copy link
Collaborator

No need to apologize! Thank you for trying it out

@riccardobonatiaesys
Copy link
Author

Hi guys, i have some (bad) news: I have just tried with Windows 7 Embedded Standard (service pack 1) and go1.20.14 386 without any success. Tomorrow i will try with Windows 8.1 but I have little hope for that.

@100110010111
Copy link

What is the value of testing on OS that no one uses?

@riccardobonatiaesys
Copy link
Author

riccardobonatiaesys commented Apr 11, 2024

What is the value of testing on OS that no one uses?

I would just like to compile the executable for later use on Windows 10/11.

@riccardobonatiaesys
Copy link
Author

Back after a while without good news: also with Windows 8.1 the error persist. What can be done to resolve the situation?

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

No branches or pull requests

3 participants