summaryrefslogtreecommitdiffstats
path: root/src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs
diff options
context:
space:
mode:
authorWouter Tinus <win.acme.simple@gmail.com>2020-07-17 13:20:35 +0200
committerWouter Tinus <win.acme.simple@gmail.com>2020-07-17 13:20:35 +0200
commit8f25cf58df2766cbd74333bf3d3870bbc2187c7e (patch)
tree6fd25a36a2982dab224263d516d1bd9f6ecb4b53 /src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs
parent489284e7d285b118e271f9c044a33377bbf16e3d (diff)
downloadletsencrypt-win-simple-8f25cf58df2766cbd74333bf3d3870bbc2187c7e.zip
letsencrypt-win-simple-8f25cf58df2766cbd74333bf3d3870bbc2187c7e.tar.gz
letsencrypt-win-simple-8f25cf58df2766cbd74333bf3d3870bbc2187c7e.tar.bz2
use more async I/O apis
Diffstat (limited to 'src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs')
-rw-r--r--src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs b/src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs
index 8636eca..03ca169 100644
--- a/src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs
+++ b/src/main.lib/Plugins/StorePlugins/PfxFile/PfxFile.cs
@@ -40,7 +40,7 @@ namespace PKISharp.WACS.Plugins.StorePlugins
private string PathForIdentifier(string identifier) => Path.Combine(_path, $"{identifier.Replace("*", "_")}.pfx");
- public Task Save(CertificateInfo input)
+ public async Task Save(CertificateInfo input)
{
_log.Information("Copying certificate to the pfx folder");
var dest = PathForIdentifier(input.CommonName);
@@ -51,7 +51,7 @@ namespace PKISharp.WACS.Plugins.StorePlugins
input.Certificate
};
collection.AddRange(input.Chain.ToArray());
- File.WriteAllBytes(dest, collection.Export(X509ContentType.Pfx, _password));
+ await File.WriteAllBytesAsync(dest, collection.Export(X509ContentType.Pfx, _password));
}
catch (Exception ex)
{
@@ -63,7 +63,6 @@ namespace PKISharp.WACS.Plugins.StorePlugins
Name = PfxFileOptions.PluginName,
Path = _path
});
- return Task.CompletedTask;
}
public Task Delete(CertificateInfo input) => Task.CompletedTask;