olastor / age-plugin-fido2-hmac

Age plugin to encrypt files with fido2 tokens using the hmac-secret extension and non-discoverable credentials.
MIT License
35 stars 2 forks source link

openssl/ec.h error building on M2 Mac #12

Closed ghost closed 3 months ago

ghost commented 3 months ago

Hi, Thanks for this great plugin. I was happily using the previous version on my M2 Mac. I first tried to use the new version by downloading from the releases page but got a format error with both the Darwin assets. Next, I tried to build but got an error 'openssl/ec.h not found'. I have mediocre skills and will probably need to spend many hours on this. Can you pl. check?

olastor commented 3 months ago

@highesteem Thanks for feedback! My first guess is that maybe you need to install libfido2 (brew install libfido2). The error came when switching from v0.1.x to v0.2.x, right?

olastor commented 3 months ago

(misclicked the close button)

olastor commented 3 months ago

got a format error with both the Darwin assets

If possible, could you please post the error?

ghost commented 3 months ago

libfido2 is already installed. Prolly has something to do with the location/version of openssl, I'm looking.

ghost commented 3 months ago

zsh: exec format error: ./age-plugin-fido2-hmac

olastor commented 3 months ago

@highesteem That seems like the build for your os/arch doesn't work properly :thinking: . I can't test on darwin, but I'll check if there's something wrong in the CI build.

olastor commented 3 months ago

@highesteem I think I found the issue. The build was at some point separated from packaging the binary and this step didn't have the proper env variables set. I'll try to fix that and push a new release.

olastor commented 3 months ago

@highesteem can you please checkout the latest release? I've also updated the installation instructions in the README. Please reopen if there are still issues.

openssl/ec.h error

This seems to be the same as reported here: https://github.com/keys-pub/go-libfido2/issues/38 . The libfido2 go bindings fixed that, but didn't create a new release. So I now pinned a newer version of the package. So building from source should now work for you, too.

ghost commented 3 months ago

Works perfectly now, thanks!