From 4f641102e701b3ec517a376b511c0a2b603487b1 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 15 Apr 2013 20:45:46 -0700 Subject: Populate the enctype table by default on new install We actually know the enctypes that are in most common use, so rather than making the user poke them into the database manually, save them a step and put them in. We still need some mechanism to remove the DES enctype and add new ones, though. Change-Id: I2eda7e29897ec16a04a10f0c7289878c853b7531 Reviewed-on: https://gerrit.stanford.edu/1068 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- perl/Wallet/Admin.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'perl') diff --git a/perl/Wallet/Admin.pm b/perl/Wallet/Admin.pm index 42476e9..3e9c9f5 100644 --- a/perl/Wallet/Admin.pm +++ b/perl/Wallet/Admin.pm @@ -131,6 +131,16 @@ sub default_data { ($r1) = $self->{schema}->resultset('Type')->populate (\@record); warn "default Type not installed" unless defined $r1; + # enctypes default rows. + @record = ([ qw/en_name/ ], + [ 'aes128-cts-hmac-sha1-96' ], + [ 'aes256-cts-hmac-sha1-96' ], + [ 'arcfour-hmac-md5' ], + [ 'des-cbc-crc' ], + [ 'des3-cbc-sha1' ]); + ($r1) = $self->{schema}->resultset('Enctype')->populate (\@record); + warn "default Enctype not installed" unless defined $r1; + return 1; } -- cgit v1.2.3