summary refs log tree commit diff
path: root/crypto/src/pkcs/Pkcs12Store.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-11-23 21:08:34 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-11-23 21:08:34 +0700
commit29a112bef25c63c03da142e665f027f00bd496b0 (patch)
treef5e2d730f84fc9f720a1e20b6b381c2bdefbee71 /crypto/src/pkcs/Pkcs12Store.cs
parentRound 4 modifications to HQC + removed some redundancy (diff)
downloadBouncyCastle.NET-ed25519-29a112bef25c63c03da142e665f027f00bd496b0.tar.xz
Use FixedTimeEquals
Diffstat (limited to 'crypto/src/pkcs/Pkcs12Store.cs')
-rw-r--r--crypto/src/pkcs/Pkcs12Store.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/pkcs/Pkcs12Store.cs b/crypto/src/pkcs/Pkcs12Store.cs
index bf7e68363..9cb81a412 100644
--- a/crypto/src/pkcs/Pkcs12Store.cs
+++ b/crypto/src/pkcs/Pkcs12Store.cs
@@ -202,7 +202,7 @@ namespace Org.BouncyCastle.Pkcs
                 byte[] mac = CalculatePbeMac(algId.Algorithm, salt, itCount, password, false, data);
                 byte[] dig = dInfo.GetDigest();
 
-                if (!Arrays.ConstantTimeAreEqual(mac, dig))
+                if (!Arrays.FixedTimeEquals(mac, dig))
                 {
                     if (password.Length > 0)
                         throw new IOException("PKCS12 key store MAC invalid - wrong password or corrupted file.");
@@ -210,7 +210,7 @@ namespace Org.BouncyCastle.Pkcs
                     // Try with incorrect zero length password
                     mac = CalculatePbeMac(algId.Algorithm, salt, itCount, password, true, data);
 
-                    if (!Arrays.ConstantTimeAreEqual(mac, dig))
+                    if (!Arrays.FixedTimeEquals(mac, dig))
                         throw new IOException("PKCS12 key store MAC invalid - wrong password or corrupted file.");
 
                     wrongPkcs12Zero = true;