From 913c5ef0336fddc2656555749268eeb9856964a6 Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Fri, 30 Oct 2015 20:15:31 -0700 Subject: [PATCH] add build tag files for pkcs11 dlopen lib Signed-off-by: Jessica Frazelle Signed-off-by: David Lawrence Signed-off-by: Jessica Frazelle (github: endophage) --- signer/api/ecdsa_hardware_crypto_service.go | 1 - signer/api/pkcs11_darwin.go | 12 ++++++++++++ signer/api/pkcs11_linux.go | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 signer/api/pkcs11_darwin.go create mode 100644 signer/api/pkcs11_linux.go diff --git a/signer/api/ecdsa_hardware_crypto_service.go b/signer/api/ecdsa_hardware_crypto_service.go index 8029241d82..4b68240f0a 100644 --- a/signer/api/ecdsa_hardware_crypto_service.go +++ b/signer/api/ecdsa_hardware_crypto_service.go @@ -22,7 +22,6 @@ import ( ) const ( - pkcs11Lib = "/usr/local/lib/libykcs11.so" USER_PIN = "123456" SO_USER_PIN = "010203040506070801020304050607080102030405060708" ) diff --git a/signer/api/pkcs11_darwin.go b/signer/api/pkcs11_darwin.go new file mode 100644 index 0000000000..eba8a4ee2c --- /dev/null +++ b/signer/api/pkcs11_darwin.go @@ -0,0 +1,12 @@ +// +build pkcs11,darwin + +package api + +var ( + pkcs11Lib = "/usr/local/lib/libykcs11.dylib" +) + +func init() { + // TODO(diogomonica): all the crap for darwin to configure + // the variable pkcs11 to find the right one in the right dir +} diff --git a/signer/api/pkcs11_linux.go b/signer/api/pkcs11_linux.go new file mode 100644 index 0000000000..acade89b11 --- /dev/null +++ b/signer/api/pkcs11_linux.go @@ -0,0 +1,12 @@ +// +build pkcs11,linux + +package api + +var ( + pkcs11Lib = "/usr/local/lib/libykcs11.so" +) + +func init() { + // TODO(diogomonica): all the crap for linux to configure + // the variable pkcs11 to find the right one in the right dir +}