Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions DevProxy.Plugins/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
},
"Markdig": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "1cWDY3Rhd24SVe66p2ekhEPhaSAXuH3WgGn6EPNjqXL0Y4ycK7GXtq0UE5oeBYircNlqJIEQk9W2vz60hRaezA=="
"resolved": "1.3.2",
"contentHash": "fZgOC/3CswUrndjDTac70aQpYdtxbW5+5bRumR7vzvI2HJbkmgKisB1c9oT+GA6v0jB/JDR9BLa9FiPzQmaK6A=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
Expand Down Expand Up @@ -464,8 +464,8 @@
},
"Scriban": {
"type": "Transitive",
"resolved": "7.2.4",
"contentHash": "hx7WeBo0aObZ3v9ZzicZYQtu7fH+I1pRRnzQbv8r0blUhiH9Ay+60/GwkAJZJ7133dr3ZWkzqUqnSloczOf+jw=="
"resolved": "7.2.5",
"contentHash": "6HDyv0P6PVdx/prWM3Aw0QHAT/DCpkBxOovZ2iPIH4L4ZvJ13JNYJgyUI+xJ5K2agXreYTBe23AL5ZQNTqJQvA=="
},
"SharpYaml": {
"type": "Transitive",
Expand Down Expand Up @@ -528,7 +528,7 @@
"devproxy.abstractions": {
"type": "Project",
"dependencies": {
"Markdig": "[1.3.0, )",
"Markdig": "[1.3.2, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[10.0.9, )",
"Microsoft.Extensions.Configuration": "[10.0.9, )",
"Microsoft.Extensions.Configuration.Binder": "[10.0.9, )",
Expand All @@ -538,7 +538,7 @@
"Microsoft.OpenApi": "[3.7.0, )",
"Microsoft.OpenApi.YamlReader": "[3.7.0, )",
"Newtonsoft.Json.Schema": "[4.0.1, )",
"Scriban": "[7.2.4, )",
"Scriban": "[7.2.5, )",
"System.CommandLine": "[2.0.9, )",
"Unobtanium.Web.Proxy": "[0.1.5, )",
"YamlDotNet": "[18.0.0, )"
Expand Down
2 changes: 1 addition & 1 deletion DevProxy/DevProxy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PackageReference Include="Azure.Identity" Version="1.21.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.9" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.19.1" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.14.15" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="18.7.23" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="OpenTelemetry" Version="1.16.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.16.0" />
Expand Down
12 changes: 6 additions & 6 deletions DevProxy/Proxy/CertificateDiskCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ internal sealed class CertificateDiskCache : ICertificateCache

private string? rootCertificatePath;

public Task<X509Certificate2?> LoadRootCertificateAsync(string pathOrName, string password, X509KeyStorageFlags storageFlags, CancellationToken cancellationToken)
public async Task<X509Certificate2?> LoadRootCertificateAsync(string pathOrName, string password, X509KeyStorageFlags storageFlags, CancellationToken cancellationToken)
{
var path = GetRootCertificatePath(pathOrName, false);
return Task.FromResult(LoadCertificate(path, password, storageFlags));
return await LoadCertificateAsync(path, password, storageFlags, cancellationToken);
}

public async Task SaveRootCertificateAsync(string pathOrName, string password, X509Certificate2 certificate, CancellationToken cancellationToken)
Expand All @@ -31,10 +31,10 @@ public async Task SaveRootCertificateAsync(string pathOrName, string password, X
await File.WriteAllBytesAsync(path, exported, cancellationToken);
}

public Task<X509Certificate2?> LoadCertificateAsync(string subjectName, X509KeyStorageFlags storageFlags, CancellationToken cancellationToken)
public async Task<X509Certificate2?> LoadCertificateAsync(string subjectName, X509KeyStorageFlags storageFlags, CancellationToken cancellationToken)
{
var filePath = Path.Combine(GetCertificatePath(false), subjectName + DefaultCertificateFileExtension);
return Task.FromResult(LoadCertificate(filePath, string.Empty, storageFlags));
return await LoadCertificateAsync(filePath, string.Empty, storageFlags, cancellationToken);
}

public async Task SaveCertificateAsync(string subjectName, X509Certificate2 certificate, CancellationToken cancellationToken)
Expand Down Expand Up @@ -118,7 +118,7 @@ private string GetRootCertificateDirectory(bool create)
return rootCertificatePath;
}

private static X509Certificate2? LoadCertificate(string path, string password, X509KeyStorageFlags storageFlags)
private static async Task<X509Certificate2?> LoadCertificateAsync(string path, string password, X509KeyStorageFlags storageFlags, CancellationToken cancellationToken)
{
byte[] exported;

Expand All @@ -129,7 +129,7 @@ private string GetRootCertificateDirectory(bool create)

try
{
exported = File.ReadAllBytes(path);
exported = await File.ReadAllBytesAsync(path, cancellationToken);
}
catch (IOException)
{
Expand Down
38 changes: 19 additions & 19 deletions DevProxy/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
},
"Microsoft.VisualStudio.Threading": {
"type": "Direct",
"requested": "[17.14.15, )",
"resolved": "17.14.15",
"contentHash": "1DrCusT3xNLSlaJg77BsUSAzrhjdZBAvvsS0PMzyPM+fGais6SnISOhqdZQop8VVMIBLsYm2gyF9W7THjgavwA==",
"requested": "[18.7.23, )",
"resolved": "18.7.23",
"contentHash": "IiK1otNipjvDIk8SClYwOP1uRZLpVA3luVMKSTPhhjhxqv2pp8/tzfLy/IB7HW+voeEodCTHh0q9LbLIBdGNKA==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.14.15",
"Microsoft.VisualStudio.Threading.Only": "17.14.15",
"Microsoft.VisualStudio.Validation": "17.8.8"
"Microsoft.VisualStudio.Threading.Analyzers": "18.7.23",
"Microsoft.VisualStudio.Threading.Only": "18.7.23",
"Microsoft.VisualStudio.Validation": "17.13.22"
}
},
"Newtonsoft.Json": {
Expand Down Expand Up @@ -112,8 +112,8 @@
},
"Markdig": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "1cWDY3Rhd24SVe66p2ekhEPhaSAXuH3WgGn6EPNjqXL0Y4ycK7GXtq0UE5oeBYircNlqJIEQk9W2vz60hRaezA=="
"resolved": "1.3.2",
"contentHash": "fZgOC/3CswUrndjDTac70aQpYdtxbW5+5bRumR7vzvI2HJbkmgKisB1c9oT+GA6v0jB/JDR9BLa9FiPzQmaK6A=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
Expand Down Expand Up @@ -247,21 +247,21 @@
},
"Microsoft.VisualStudio.Threading.Analyzers": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "mXQPJsbuUD2ydq4/ffd8h8tSOFCXec+2xJOVNCvXjuMOq/+5EKHq3D2m2MC2+nUaXeFMSt66VS/J4HdKBixgcw=="
"resolved": "18.7.23",
"contentHash": "dyj6z8m+LFjpeH69hdnciCcRCmD0YgMlvuQEywiEshjqj/blgQ+PuWX8Vd5gkWQFoBN4e+TFxx6DvGNSv/gIKg=="
},
"Microsoft.VisualStudio.Threading.Only": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "NqONyw1RXyj9P3k5e1uU2k9kc1ptwuU5NJQzG+MPq7vQVHUzBY8HLuJf/N2Rw5H/myD96CVxziDxmjawPuzntw==",
"resolved": "18.7.23",
"contentHash": "iOaVAQLPt1KxFyYqZqKxqNu8BgQUiPLNeT8XhX+549eWaGw49e1MxjlkjTIBwvlfrU4lPp+Nm99oRpmsgN7RJw==",
"dependencies": {
"Microsoft.VisualStudio.Validation": "17.8.8"
"Microsoft.VisualStudio.Validation": "17.13.22"
}
},
"Microsoft.VisualStudio.Validation": {
"type": "Transitive",
"resolved": "17.8.8",
"contentHash": "rWXThIpyQd4YIXghNkiv2+VLvzS+MCMKVRDR0GAMlflsdo+YcAN2g2r5U1Ah98OFjQMRexTFtXQQ2LkajxZi3g=="
"resolved": "17.13.22",
"contentHash": "fC20ITOxlUpGQ0ltAxITQbeFxwuB6OjLT3lByC4+/Gm46o/Mwv9hlIVrBhiUhnqdQzUUvr4EHkdiYe7WOSMLmw=="
},
"Newtonsoft.Json.Schema": {
"type": "Transitive",
Expand All @@ -286,8 +286,8 @@
},
"Scriban": {
"type": "Transitive",
"resolved": "7.2.4",
"contentHash": "hx7WeBo0aObZ3v9ZzicZYQtu7fH+I1pRRnzQbv8r0blUhiH9Ay+60/GwkAJZJ7133dr3ZWkzqUqnSloczOf+jw=="
"resolved": "7.2.5",
"contentHash": "6HDyv0P6PVdx/prWM3Aw0QHAT/DCpkBxOovZ2iPIH4L4ZvJ13JNYJgyUI+xJ5K2agXreYTBe23AL5ZQNTqJQvA=="
},
"SharpYaml": {
"type": "Transitive",
Expand Down Expand Up @@ -347,12 +347,12 @@
"devproxy.abstractions": {
"type": "Project",
"dependencies": {
"Markdig": "[1.3.0, )",
"Markdig": "[1.3.2, )",
"Microsoft.EntityFrameworkCore.Sqlite": "[10.0.9, )",
"Microsoft.OpenApi": "[3.7.0, )",
"Microsoft.OpenApi.YamlReader": "[3.7.0, )",
"Newtonsoft.Json.Schema": "[4.0.1, )",
"Scriban": "[7.2.4, )",
"Scriban": "[7.2.5, )",
"System.CommandLine": "[2.0.9, )",
"Unobtanium.Web.Proxy": "[0.1.5, )",
"YamlDotNet": "[18.0.0, )"
Expand Down
Loading