summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openssl-model.lua15
1 files changed, 1 insertions, 14 deletions
diff --git a/openssl-model.lua b/openssl-model.lua
index 2a02129..07ab963 100644
--- a/openssl-model.lua
+++ b/openssl-model.lua
@@ -783,21 +783,8 @@ getconfigfile = function()
end
setconfigfile = function(filedetails)
- filedetails.value.filename.value = configfile
- filedetails.value.filecontent.value = string.gsub(format.dostounix(filedetails.value.filecontent.value), "\n+$", "")
-
-- validate
- local success = true
-
- if success then
- fs.write_file(configfile, filedetails.value.filecontent.value)
- filedetails = getconfigfile()
- config = nil
- else
- filedetails.errtxt = "Failed to set configuration file"
- end
-
- return filedetails
+ return modelfunctions.setfiledetails(filedetails, {configfile})
end
checkenvironment = function(set)