Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions tss-esapi-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ must therefore link to all of them at build time.

The paths to the libraries are discovered using `pkg-config` - make sure they
are discoverable in this way on your system. Our build script looks for
`tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `4.1.3` is
required for all of them.
`tss2-sys`, `tss2-esys`, `tss2-tctildr` and `tss2-mu`. A minimum version of `4.1.3` is
required for all of them. On windows `tss2-tcti-tbs` is also required.

Having installed the open-source implementation libraries at `/usr/local/lib` (by default), it
might happen that `pkg-config` can not find them. Run the following command if that is the
Expand Down Expand Up @@ -51,8 +51,12 @@ environment variable `TPM_TSS_SOURCE_PATH` or it will be retrieved from
Github during the build. The version to retrieve can be controlled by setting
the `TPM2_TSS_SOURCE_VERSION` environment variable.
[!IMPORTANT]
On windows it might be necessary to manually create the VERSION file
when a local source is being used.
* The `bundled` feature will make it possible to build the crate without
having to worry about the `tpm2-tss` library dependencies. But it is still
necessary to make the shared libraries available to the executable that uses
the library.
* On Windows it might be necessary to manually create the `VERSION` file
when a local source is being used.

To enable this feature:

Expand Down
6 changes: 2 additions & 4 deletions tss-esapi-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,10 +869,8 @@ pub mod tpm2_tss {
"release" => "Release",
_ => panic!("Unknown cargo profile: {}", profile),
};
println!(
"cargo:rustc-link-search=dylib={}",
_source_path.join("x64").join(build_string).display()
);
let lib_out_path: PathBuf = _source_path.join("x64").join(build_string);
println!("cargo:rustc-link-search=all={}", lib_out_path.display());
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions tss-esapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ The crate currently offers the following features:
* `rustcrypto-full` (disabled by default) - provides conversion from all
supported elliptic curves, rsa or hashes.
Support for individual hash, rsa or curves can be pulled individually.
* `bundled` - Downloads, builds and dynamically links against the tpm2-tss libraries.
This means that the executable using the crate needs to have the tpm2-tss shared
libraries available to the executable. This can be achieved by copying the shared libraries
to the same folder as the executable or by adding the path to them to the appropriate environmental
variable e.g. `LD_LIBRARY_PATH`, `DYLD_FALLBACK_LIBRARY_PATH` or `PATH`.

## Cross compiling

Expand Down