Skip to content

Commit

Permalink
test: Update SoftHSM library path for different platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed May 22, 2024
1 parent 092e32a commit 7b08a2a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import os from "os";

let lib = "/usr/local/lib/softhsm/libsofthsm2.so";
switch (os.platform()) {
case "darwin": // macOS
lib = "/usr/local/lib/softhsm/libsofthsm2.so";
break;
case "linux":
lib = "/usr/lib/softhsm/libsofthsm2.so";
break;
case "win32": // Windows
lib = "C:\\SoftHSM2\\lib\\softhsm2-x64.dll";
break;
}
export default {
init: {
lib: "/usr/local/lib/softhsm/libsofthsm2.so",
lib,
libName: "SoftHSM",
pin: "12345",
vendor: "",
Expand Down

0 comments on commit 7b08a2a

Please sign in to comment.