-
Notifications
You must be signed in to change notification settings - Fork 53
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
Adds a TBS TctiNameConf. #545
Conversation
7732d39
to
bc05e83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff :)
When parallaxsecond#477 got merged it became possible to build using a path to the ```tpm2-tss``` installation instead of depending on ```pkg-config```. This made it possible to build under Windows. To further increase the support for the windows platform this commit moves the option for TBS TCTI that is being introduced in parallaxsecond#523 into a separate commit. This commit also updates the documentation regarding building using an installation folder. Co-authored-by: Thomas Epperson <thomas.epperson@gmail.com> Signed-off-by: Jesper Brynolf <jesper.brynolf@gmail.com>
Thanks for the PR. It's something that's really needed. I tried building it on my Windows computer and after making the correct folder structure (setting up correct OpenSSL dirs and moving files around was a chore but doable) I still get the error: I'm wondering how far should the instructions go explaining all steps required 🤔 Edit: just for the record I fixed that by Edit 2: everything compiled and I copied dirs where necessary. I've created this sample program: use tss_esapi::Context;
use tss_esapi::TctiNameConf;
fn main() -> tss_esapi::Result<()> {
let mut context = Context::new(TctiNameConf::Tbs)?;
println!("Hello, world: {:?}", context.get_tpm_property(tss_esapi::constants::PropertyTag::DayOfYear)?);
// also get_random
Ok(())
} But it fails at runtime:
The tss version is 4.1.0 (actually 55 commits ahead from their Any ideas? Maybe downgrading to 4.0.1? 🤔 I'm wondering if @uglyoldbob can test this PR. It'd be really nice :) |
@wiktor-k I should be able to test it on Saturday morning. |
Thank you! 🙏 It would be greatly appreciated! |
I tested it with a test app. And it seems to work fine for me. |
Okay, I'm going to approve it not to have the code bitrot. Still, if you'd be able to confirm it's working even afterwards @uglyoldbob it'd be nice. All in all I don't think this PR is particularly dangerous and it clearly improves things. |
Oh it looks like tpm2-tss was updated to supported visual studio 2019/2022. I was expecting the bundled feature to still be in this pull request. I'll have to take some more time later to do the support for that. |
No as I
No, as I mentioned. This was only for the TCTI part so that it will be possible to run things you build from an installation folder on windows as well. If you want I can try to adapt the |
When #477 got merged it became possible to build
using a path to the
tpm2-tss
installationinstead of depending on
pkg-config
.This made it possible to build under Windows. To
further increase the support for the windows
platform this commit moves the option for TBS
TCTI that is being introduced in #523 into a
separate commit.
This commit also updates the documentation
regarding building using an installation
folder.