Commit 278373f6 authored by Leigh Stoller's avatar Leigh Stoller

Do not barf if there is no existing encrypted certificate to reuse,

just create a new one.
parent 3ebffb34
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -207,21 +207,18 @@ if (defined($options{"c"}) || defined($options{"C"})) {
if (defined($options{"c"})) {
$old_password = $options{"c"};
}
else {
$target_user->SSLPassPhrase(1, \$old_password) == 0
or fatal("No password for encrypted SSL key");
}
#
# Make sure its all escaped since any printable char is allowed.
#
if ($old_password =~ /^([\040-\176]*)$/) {
$old_password = $1;
}
else {
die("Tainted argument: $old_password\n");
elsif ($target_user->SSLPassPhrase(1, \$old_password) == 0) {
#
# Make sure its all escaped since any printable char is allowed.
#
if ($old_password =~ /^([\040-\176]*)$/) {
$old_password = $1;
}
else {
fatal("Tainted password: $old_password");
}
$old_password =~ s/\'/\'\\\'\'/g;
}
$old_password =~ s/\'/\'\\\'\'/g;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment