est icon indicating copy to clipboard operation
est copied to clipboard

Does not work under Windows

Open riccardobonatiaesys opened this issue 1 year ago • 13 comments

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

riccardobonatiaesys avatar Feb 14 '24 15:02 riccardobonatiaesys

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.

toddgaunt-gs avatar Feb 21 '24 13:02 toddgaunt-gs

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.

riccardobonatiaesys avatar Feb 21 '24 15:02 riccardobonatiaesys

@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

toddgaunt-gs avatar Feb 21 '24 16:02 toddgaunt-gs

@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.

riccardobonatiaesys avatar Feb 21 '24 17:02 riccardobonatiaesys

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.

toddgaunt-gs avatar Feb 21 '24 20:02 toddgaunt-gs

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

100110010111 avatar Mar 19 '24 14:03 100110010111

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

toddgaunt-gs avatar Mar 20 '24 19:03 toddgaunt-gs

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.

riccardobonatiaesys avatar Mar 21 '24 08:03 riccardobonatiaesys

No need to apologize! Thank you for trying it out

toddgaunt-gs avatar Mar 21 '24 11:03 toddgaunt-gs

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.

riccardobonatiaesys avatar Apr 11 '24 09:04 riccardobonatiaesys

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

100110010111 avatar Apr 11 '24 10:04 100110010111

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 avatar Apr 11 '24 11:04 riccardobonatiaesys

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

riccardobonatiaesys avatar May 20 '24 07:05 riccardobonatiaesys