Skip to content

Commit

Permalink
chore(cryptoki-sys): move header to vendor dir
Browse files Browse the repository at this point in the history
Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
  • Loading branch information
Direktor799 committed Oct 22, 2024
1 parent 7d4f491 commit 54ee6ab
Show file tree
Hide file tree
Showing 3 changed files with 344 additions and 328 deletions.
4 changes: 2 additions & 2 deletions cryptoki-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mod generate {
}

builder = builder
.header("pkcs11.h")
.header("vendor/pkcs11.h")
.dynamic_library_name("Pkcs11")
// The PKCS11 library works in a slightly different way to most shared libraries. We have
// to call `C_GetFunctionList`, which returns a list of pointers to the _actual_ library
Expand All @@ -96,7 +96,7 @@ mod generate {
// This is needed because no types will be generated if `allowlist_function` is used.
// Unsure if this is a bug.
.allowlist_type("*")
.allowlist_file("pkcs11.h")
.allowlist_file("vendor/pkcs11.h")
// See this issue: https://github.com/parallaxsecond/rust-cryptoki/issues/12
.blocklist_type("max_align_t")
// Derive the `Debug` trait for the generated structs where possible.
Expand Down
7 changes: 7 additions & 0 deletions cryptoki-sys/vendor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Vendor

This is downloaded from https://github.com/latchset/pkcs11-headers/blob/b131b9e4599db6e0287a3d74f6768e08a0c82d23/public-domain/3.0/pkcs11.h:

```shell
wget https://raw.githubusercontent.com/latchset/pkcs11-headers/b131b9e4599db6e0287a3d74f6768e08a0c82d23/public-domain/3.0/pkcs11.h
```
Loading

0 comments on commit 54ee6ab

Please sign in to comment.