aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-21 12:41:55 -0800
committerelijah <elijah@riseup.net>2012-11-21 12:41:55 -0800
commit7443553abaf4d27c14741e108541560018a64507 (patch)
tree19acb731955ad68c393461ae4bcad12dd3d02f2d /lib
parent1a24ed66086814abf63cd6bc71eaeb755e7e36cd (diff)
downloadleap_cli-7443553abaf4d27c14741e108541560018a64507.tar.gz
leap_cli-7443553abaf4d27c14741e108541560018a64507.tar.bz2
clean up dh params generated by certtool.
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/ca.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/ca.rb b/lib/leap_cli/commands/ca.rb
index 1e69c90..5aa0cde 100644
--- a/lib/leap_cli/commands/ca.rb
+++ b/lib/leap_cli/commands/ca.rb
@@ -73,6 +73,8 @@ module LeapCli; module Commands
if cmd_exists?('certtool')
log 0, 'Generating DH parameters (takes a long time)...'
output = assert_run!('certtool --generate-dh-params --sec-param high')
+ output.sub! /.*(-----BEGIN DH PARAMETERS-----.*-----END DH PARAMETERS-----).*/m, '\1'
+ output << "\n"
write_file!(:dh_params, output)
else
log 0, 'Generating DH parameters (takes a REALLY long time)...'