Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Golang support #2

Open
tobuh opened this issue Dec 17, 2020 · 3 comments
Open

Golang support #2

tobuh opened this issue Dec 17, 2020 · 3 comments

Comments

@tobuh
Copy link

tobuh commented Dec 17, 2020

Just a question before deep diving into this:
Did someone tried to use this for Golang bindings?

I just made a short run: commenting out the python specific things in mu_binding.i, manually added some cgo pkg-config instructions. But it resulted in "panic: runtime error: invalid memory address or nil pointer dereference" on Fapi_Initialize.

@johnandersen777
Copy link
Member

We've gone back and forth on the underlying framework for tpm2-pytss (the Python bindings). We started with SWIG which should support N languages, which is why these bindings are in a separate repo from tpm2-pytss. We're now switching to Cython which is Python specific for the Python bindings. As such we may not continue to maintain these interface definitions.

There is a library written in Golang naively: https://github.com/google/go-tpm. It only has a subset of spec's functionality but the fact that it's native to Golang may be an upside for you. If you find that it is missing functionality please let us know here (in this issue or somewhere else) so that we can make sure we have bindings that work for your usage.

@tobuh
Copy link
Author

tobuh commented Jan 25, 2021

Actually, I'm trying to stay compatible between tpm2-tss (resp. tpm2-tools) and my Golang implementation which is why I wanted to take a look into this swig repo.

EDIT: got my answer here ...
google/go-tpm#233 (comment)

@tobuh
Copy link
Author

tobuh commented Feb 2, 2021

@pdxjohnny
Could you please take a look at google/go-tpm#234 ?

There is a setup described, that I really needed to work with a Golang app. Maybe you have an idea.

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

No branches or pull requests

2 participants