summaryrefslogtreecommitdiff
path: root/libtac/lib/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtac/lib/connect.c')
-rw-r--r--libtac/lib/connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libtac/lib/connect.c b/libtac/lib/connect.c
index ef4d706..1494976 100644
--- a/libtac/lib/connect.c
+++ b/libtac/lib/connect.c
@@ -153,7 +153,11 @@ int tac_connect_single(struct addrinfo *server, char *key) {
retval = fd;
/* set current tac_secret */
- tac_secret = key;
+ tac_encryption = 0;
+ if (key != NULL && strcmp(key, "") != 0) {
+ tac_encryption = 1;
+ tac_secret = key;
+ }
free(ip);