summaryrefslogtreecommitdiff
path: root/libtac/lib/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtac/lib/crypt.c')
-rw-r--r--libtac/lib/crypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libtac/lib/crypt.c b/libtac/lib/crypt.c
index 04d29a6..d06f4f7 100644
--- a/libtac/lib/crypt.c
+++ b/libtac/lib/crypt.c
@@ -91,7 +91,7 @@ void _tac_crypt(u_char *buf, HDR *th, int length) {
u_char *pad;
/* null operation if no encryption requested */
- if(th->encryption == TAC_PLUS_ENCRYPTED_FLAG) {
+ if((tac_secret != NULL) && (th->encryption == TAC_PLUS_ENCRYPTED_FLAG)) {
pad = _tac_md5_pad(length, th);
for (i=0; i<length; i++) {