Index: /trunk/bin/bkmkd
===================================================================
--- /trunk/bin/bkmkd	(revision 117)
+++ /trunk/bin/bkmkd	(revision 118)
@@ -47,12 +47,4 @@
         %DEFINES,
     };
-
-    # if authentication is enabled and no digest_key is provided, generate one
-    # don't do this if it isn't needed, since this is sometimes not a fast operation
-    if ($config->{auth} && !$config->{digest_key}) {
-        warn "Generating digest authentication secret...\n";
-        require Bytes::Random::Secure;
-        $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, '');
-    }
 
     # make config paths absolute before handing off to the app
Index: /trunk/lib/BookmarksApp.pm
===================================================================
--- /trunk/lib/BookmarksApp.pm	(revision 117)
+++ /trunk/lib/BookmarksApp.pm	(revision 118)
@@ -122,4 +122,13 @@
         $config->{realm} ||= 'Bookmarks';
         $config->{htdigest} or die "No htdigest configured for authentication\n";
+
+        # if authentication is enabled and no digest_key is provided, generate one
+        # don't do this if it isn't needed, since this is sometimes not a fast operation
+        if (!$config->{digest_key}) {
+            warn "Generating digest authentication secret...\n";
+            require Bytes::Random::Secure;
+            $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, '');
+        }
+
         open my $htdigest, '<', $config->{htdigest} or die "Can't open $$config{htdigest}\n";
         while (my $credentials = <$htdigest>) {
