diff --git a/.vscode/launch.json b/.vscode/launch.json index 7591523d..9cda9402 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net8.0/JustEat.ApplePayJS.dll", + "program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net9.0/JustEat.ApplePayJS.dll", "args": [], "cwd": "${workspaceRoot}/src/ApplePayJS", "stopAtEntry": false, diff --git a/Directory.Build.props b/Directory.Build.props index eb2fc0cb..f2729fd0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ git $(PackageProjectUrl).git latest - 8.0.0 + 9.0.0 diff --git a/global.json b/global.json index c8aeb425..0122a333 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.404", + "version": "9.0.100", "allowPrerelease": false } } diff --git a/src/ApplePayJS/ApplePayJS.csproj b/src/ApplePayJS/ApplePayJS.csproj index d6413004..f668e407 100644 --- a/src/ApplePayJS/ApplePayJS.csproj +++ b/src/ApplePayJS/ApplePayJS.csproj @@ -12,7 +12,7 @@ applepay true JustEat.ApplePayJS - net8.0 + net9.0 latest JustEat.ApplePayJS diff --git a/src/ApplePayJS/Clients/MerchantCertificate.cs b/src/ApplePayJS/Clients/MerchantCertificate.cs index 28a8a5f2..47d6e371 100644 --- a/src/ApplePayJS/Clients/MerchantCertificate.cs +++ b/src/ApplePayJS/Clients/MerchantCertificate.cs @@ -62,7 +62,7 @@ private static X509Certificate2 LoadCertificateFromBase64String(string encoded, return X509Certificate2.GetCertContentType(rawData) switch { - X509ContentType.Pfx => new X509Certificate2(rawData, password), + X509ContentType.Pfx => X509CertificateLoader.LoadPkcs12(rawData, password), _ => throw new NotSupportedException("The format of the encoded Apple Pay merchant certificate is not supported."), }; } @@ -71,7 +71,7 @@ private static X509Certificate2 LoadCertificateFromDisk(string? fileName, string { try { - return new X509Certificate2( + return X509CertificateLoader.LoadPkcs12FromFile( fileName ?? string.Empty, password); } diff --git a/src/ApplePayJS/package-lock.json b/src/ApplePayJS/package-lock.json index e47361a4..c320f908 100644 --- a/src/ApplePayJS/package-lock.json +++ b/src/ApplePayJS/package-lock.json @@ -1,6 +1,6 @@ { "name": "justeatapplepayjs", - "version": "8.0.0", + "version": "9.0.0", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/src/ApplePayJS/package.json b/src/ApplePayJS/package.json index def338d4..d9bcdaac 100644 --- a/src/ApplePayJS/package.json +++ b/src/ApplePayJS/package.json @@ -1,7 +1,7 @@ { "name": "justeatapplepayjs", "private": true, - "version": "8.0.0", + "version": "9.0.0", "devDependencies": { "@types/applepayjs": "3.0.0", "@types/jquery": "3.3.34", diff --git a/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj b/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj index 0a008a25..43828a8a 100644 --- a/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj +++ b/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 false @@ -11,7 +11,7 @@ - + diff --git a/tests/ApplePayJS.Tests/TestFixture.cs b/tests/ApplePayJS.Tests/TestFixture.cs index e51f8dfc..e9c1df71 100644 --- a/tests/ApplePayJS.Tests/TestFixture.cs +++ b/tests/ApplePayJS.Tests/TestFixture.cs @@ -64,7 +64,7 @@ protected override void ConfigureWebHost(IWebHostBuilder builder) builder.ConfigureKestrel( (kestrelOptions) => kestrelOptions.ConfigureHttpsDefaults( - (connectionOptions) => connectionOptions.ServerCertificate = new X509Certificate2("localhost-dev.pfx", "Pa55w0rd!"))); + (connectionOptions) => connectionOptions.ServerCertificate = X509CertificateLoader.LoadPkcs12FromFile("localhost-dev.pfx", "Pa55w0rd!"))); // Configure the server address for the server to listen on for HTTP requests builder.UseUrls("https://127.0.0.1:0");