Skip to content

Commit be7d8c9

Browse files
committed
cryptoki-sys: Expose GetInterface and GetInterfaceList for PKCS#11 3.0 API
Signed-off-by: Jakub Jelen <[email protected]>
1 parent 41ec7af commit be7d8c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cryptoki-sys/build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ mod generate {
9191
.dynamic_library_name("Pkcs11")
9292
// The PKCS11 library works in a slightly different way to most shared libraries. We have
9393
// to call `C_GetFunctionList`, which returns a list of pointers to the _actual_ library
94-
// functions. This is the only function we need to create a binding for.
94+
// functions (in PKCS #11 before 3.0). The PKCS #11 3.0 introduces the new functions
95+
// `C_GetInterface` and `C_GetInterfaceList` to request the hew functions from 3.0 API.
96+
// These are the only function we need to create a binding for.
9597
.allowlist_function("C_GetFunctionList")
98+
.allowlist_function("C_GetInterfaceList")
99+
.allowlist_function("C_GetInterface")
96100
// This is needed because no types will be generated if `allowlist_function` is used.
97101
// Unsure if this is a bug.
98102
.allowlist_type("*")

0 commit comments

Comments
 (0)