Browse Source

Don't delete ssl key and cert if a user asked not to

Erin Bleiweiss 4 months ago
parent
commit
cff6231aa5
No account linked to committer's email address
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      msfdb

+ 4
- 2
msfdb View File

@@ -577,8 +577,10 @@ def delete_web_service
577 577
   stop_web_service
578 578
 
579 579
   File.delete(@ws_pid) if web_service_pid_status == WebServicePIDStatus::INACTIVE
580
-  File.delete(@options[:ssl_key]) if File.file?(@options[:ssl_key])
581
-  File.delete(@options[:ssl_cert]) if File.file?(@options[:ssl_cert])
580
+  if @options[:delete_existing_data]
581
+    File.delete(@options[:ssl_key]) if File.file?(@options[:ssl_key])
582
+    File.delete(@options[:ssl_cert]) if File.file?(@options[:ssl_cert])
583
+  end
582 584
 end
583 585
 
584 586
 def reinit_web_service

Loading…
Cancel
Save