Skip to content

Commit 0cb25b3

Browse files
authored
Use CCKeyDerivationPBKDF on iOS
1 parent 22b04df commit 0cb25b3

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

src/libraries/System.Security.Cryptography/src/System.Security.Cryptography.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,8 @@
10781078
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.KeyAgree.cs" />
10791079
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.PAL_HashAlgorithm.cs"
10801080
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.PAL_HashAlgorithm.cs" />
1081+
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Pbkdf2.cs"
1082+
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Pbkdf2.cs" />
10811083
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Random.cs"
10821084
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Random.cs" />
10831085
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.RSA.cs"
@@ -1191,6 +1193,7 @@
11911193
<Compile Include="System\Security\Cryptography\LiteHash.Apple.cs" />
11921194
<Compile Include="System\Security\Cryptography\OidLookup.NoFallback.cs" />
11931195
<Compile Include="System\Security\Cryptography\PasswordDeriveBytes.NotSupported.cs" />
1196+
<Compile Include="System\Security\Cryptography\Pbkdf2Implementation.Apple.cs" />
11941197
<Compile Include="System\Security\Cryptography\PinAndClear.cs" />
11951198
<Compile Include="System\Security\Cryptography\RandomNumberGeneratorImplementation.Apple.cs" />
11961199
<Compile Include="System\Security\Cryptography\RC2CryptoServiceProvider.Unix.cs" />
@@ -1261,8 +1264,6 @@
12611264
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Aead.cs" />
12621265
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.macOS.cs"
12631266
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Keychain.macOS.cs" />
1264-
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Pbkdf2.cs"
1265-
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.Pbkdf2.cs" />
12661267
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.SecKeyRef.macOS.cs"
12671268
Link="Common\Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.SecKeyRef.macOS.cs" />
12681269
<Compile Include="$(CommonPath)Interop\OSX\System.Security.Cryptography.Native.Apple\Interop.X509.macOS.cs"
@@ -1297,7 +1298,6 @@
12971298
<Compile Include="System\Security\Cryptography\DSAOpenSsl.cs" />
12981299
<Compile Include="System\Security\Cryptography\ECDsaOpenSsl.cs" />
12991300
<Compile Include="System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs" />
1300-
<Compile Include="System\Security\Cryptography\Pbkdf2Implementation.macOS.cs" />
13011301
<Compile Include="System\Security\Cryptography\RSAOpenSsl.cs" />
13021302
<Compile Include="System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs" />
13031303
<Compile Include="System\Security\Cryptography\X509Certificates\AppleCertificatePal.ImportExport.macOS.cs" />
@@ -1326,7 +1326,6 @@
13261326
<Compile Include="System\Security\Cryptography\DSA.Create.NotSupported.cs" />
13271327
<Compile Include="System\Security\Cryptography\DSACryptoServiceProvider.NotSupported.cs" />
13281328
<Compile Include="System\Security\Cryptography\OpenSsl.NotSupported.cs" />
1329-
<Compile Include="System\Security\Cryptography\Pbkdf2Implementation.Managed.cs" />
13301329
<Compile Include="System\Security\Cryptography\X509Certificates\AppleCertificateExporter.iOS.cs" />
13311330
<Compile Include="System\Security\Cryptography\X509Certificates\AppleCertificatePal.ImportExport.iOS.cs" />
13321331
<Compile Include="System\Security\Cryptography\X509Certificates\AppleCertificatePal.Keys.iOS.cs" />

src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(NATIVECRYPTO_SOURCES
1010
pal_ecc.c
1111
pal_hmac.c
1212
pal_keyagree.c
13+
pal_keyderivation.c
1314
pal_random.c
1415
pal_rsa.c
1516
pal_sec.c
@@ -32,7 +33,6 @@ else()
3233
${NATIVECRYPTO_SOURCES}
3334
pal_swiftbindings.o
3435
pal_keychain_macos.c
35-
pal_keyderivation_macos.c
3636
pal_seckey_macos.c
3737
pal_trust_macos.c
3838
pal_x509_macos.c

src/native/libs/System.Security.Cryptography.Native.Apple/entrypoints.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "pal_hmac.h"
1010
#include "pal_keyagree.h"
1111
#include "pal_keychain_macos.h"
12-
#include "pal_keyderivation_macos.h"
12+
#include "pal_keyderivation.h"
1313
#include "pal_random.h"
1414
#include "pal_rsa.h"
1515
#include "pal_sec.h"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
#include "pal_keyderivation_macos.h"
4+
#include "pal_keyderivation.h"
55

66
static int32_t PrfAlgorithmFromHashAlgorithm(PAL_HashAlgorithm hashAlgorithm, CCPseudoRandomAlgorithm* algorithm)
77
{

0 commit comments

Comments
 (0)