summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2013-04-15 20:45:46 -0700
committerRuss Allbery <rra@stanford.edu>2013-04-16 15:53:45 -0700
commit4f641102e701b3ec517a376b511c0a2b603487b1 (patch)
tree20c3f1b9ffde8459dd40d7b7e5b1c2e70a7b4101
parentc8dd7ebf733112d32a98ec01a0cf0dd148f9e956 (diff)
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 <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
-rw-r--r--perl/Wallet/Admin.pm10
1 files changed, 10 insertions, 0 deletions
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;
}