Changeset 116 in bookmarks for trunk


Ignore:
Timestamp:
02/18/16 22:47:10 (9 years ago)
Author:
peter
Message:

If authentication is enabled and no digest_key is provided, generate one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/bkmkd

    r115 r116  
    4747        %DEFINES, 
    4848    }; 
     49 
     50    # if authentication is enabled and no digest_key is provided, generate one 
     51    # don't do this if it isn't needed, since this is sometimes not a fast operation 
     52    if ($config->{auth} && !$config->{digest_key}) { 
     53        warn "Generating digest authentication secret...\n"; 
     54        require Bytes::Random::Secure; 
     55        $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, ''); 
     56    } 
    4957 
    5058    # make config paths absolute before handing off to the app 
Note: See TracChangeset for help on using the changeset viewer.