Commit 95b41985 authored by Evan Hunt's avatar Evan Hunt
Browse files

- build pkcs11 tools when compiling --with-pkcs11=yes

- add PKCS11_PROVIDER environment variable as a method for specifying
  the provider.
parent e7424513
......@@ -40,6 +40,11 @@ main(int argc, char *argv[])
};
extern char *optarg;
extern int optopt;
char *pk11_provider;
pk11_provider = getenv("PKCS11_PROVIDER");
if (pk11_provider != NULL)
pk11_libname = pk11_provider;
while ((c = getopt(argc, argv, ":m:s:i:l:p:")) != -1) {
switch (c) {
......
......@@ -80,6 +80,11 @@ main(int argc, char *argv[])
CK_ULONG privatekey_attrcnt = 7;
extern char *optarg;
extern int optopt;
char *pk11_provider;
pk11_provider = getenv("PKCS11_PROVIDER");
if (pk11_provider != NULL)
pk11_libname = pk11_provider;
while ((c = getopt(argc, argv, ":Pm:s:b:ei:l:p:")) != -1) {
switch (c) {
......
......@@ -39,6 +39,11 @@ main(int argc, char *argv[])
};
extern char *optarg;
extern int optopt;
char *pk11_provider;
pk11_provider = getenv("PKCS11_PROVIDER");
if (pk11_provider != NULL)
pk11_libname = pk11_provider;
while ((c = getopt(argc, argv, ":m:s:i:l:p:P")) != -1) {
switch (c) {
......
......@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.482 $)
AC_REVISION($Revision: 1.483 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
......@@ -718,29 +718,29 @@ case "$use_pkcs11" in
no|'')
AC_MSG_RESULT(disabled)
USE_PKCS11=''
PKCS11_TOOLS=''
;;
yes|*)
AC_MSG_RESULT(using OpenSSL with PKCS11 support)
USE_PKCS11='-DUSE_PKCS11'
PKCS11_TOOLS=pkcs11
;;
esac
AC_SUBST(USE_PKCS11)
AC_SUBST(PKCS11_TOOLS)
AC_MSG_CHECKING(for PKCS11 tools)
case "$use_pkcs11" in
no|yes|'')
AC_MSG_RESULT(disabled)
PKCS11_PROVIDER="undefined"
PKCS11_TOOLS=''
;;
*)
AC_MSG_RESULT(PKCS11 provider is "$use_pkcs11")
PKCS11_PROVIDER="$use_pkcs11"
PKCS11_TOOLS=pkcs11
;;
esac
AC_SUBST(PKCS11_PROVIDER)
AC_SUBST(PKCS11_TOOLS)
AC_MSG_CHECKING(for GSSAPI library)
AC_ARG_WITH(gssapi,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment