Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcrypto PKCS#11 backend: Call C_Initialize() on every hcrypto call
This is required as the PKCS#11 library needs to be reinitialized after forking. This was causing a problem with ipropd. This fix appears to incur a repeatable 10ms performance penalty on aes-test. Caching the initialization status using a once control and invalidating it on fork provided no measurable performance benefit on Solaris 11. Other approaches would not be thread-safe or would involve more intrusive code changes, such as exposing heimbase's atomics. (cherry picked from commit 934d5e0) Change-Id: I47566373f43eab3cb30a24ffbe37bbcd309a5f3e
- Loading branch information
Showing
1 changed file
with
39 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters