mirror of
https://github.com/darlinghq/darling-security.git
synced 2025-03-01 06:56:12 +00:00
Build more components of Security
This commit is contained in:
parent
681533d4d0
commit
443ca774d3
@ -6,4 +6,11 @@ add_definitions(
|
||||
-DOSSPINLOCK_USE_INLINED=0
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/keychain
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/base
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/OSX/libsecurity_asn1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/trust
|
||||
)
|
||||
|
||||
add_subdirectory(OSX)
|
||||
|
@ -1 +1,2 @@
|
||||
add_subdirectory(libsecurity_asn1)
|
||||
add_subdirectory(sec)
|
||||
|
65
OSX/sec/CMakeLists.txt
Normal file
65
OSX/sec/CMakeLists.txt
Normal file
@ -0,0 +1,65 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ipc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SOSCircle/SecureObjectSync
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DSEC_IOS_ON_OSX=1
|
||||
)
|
||||
|
||||
add_library(libSecOtrOSX OBJECT
|
||||
Security/SecOTRDHKey.c
|
||||
Security/SecOTRFullIdentity.c
|
||||
Security/SecOTRMath.c
|
||||
Security/SecOTRPacketData.c
|
||||
Security/SecOTRPackets.c
|
||||
Security/SecOTRPublicIdentity.c
|
||||
Security/SecOTRSession.c
|
||||
Security/SecOTRSessionAKE.c
|
||||
Security/SecOTRUtils.c
|
||||
)
|
||||
make_fat(libSecOtrOSX)
|
||||
|
||||
add_definitions(
|
||||
-DECITEM_SHIM_OSX=1
|
||||
)
|
||||
|
||||
add_library(libSecItemShimOSX OBJECT
|
||||
Security/SecItemBackup.c
|
||||
Security/SecKeyAdaptors.c
|
||||
Security/SecCFAllocator.c
|
||||
Security/SecItem.c
|
||||
Security/SecRSAKey.c
|
||||
Security/SecDH.c
|
||||
Security/SecCTKKey.c
|
||||
SOSCircle/SecureObjectSync/SOSCloudCircle.c
|
||||
Security/SecAccessControl.c
|
||||
Security/SecKey.c
|
||||
Security/SecuritydXPC.c
|
||||
Security/SecECKey.c
|
||||
Security/SecItemConstants.c
|
||||
Security/SecPasswordGenerate.c
|
||||
)
|
||||
make_fat(libSecItemShimOSX)
|
||||
|
||||
add_library(libSecTrustOSX OBJECT
|
||||
Security/SecCertificateRequest.c
|
||||
Security/SecCertificate.c
|
||||
Security/SecDigest.c
|
||||
Security/SecBase64.c
|
||||
Security/SecCertificatePath.c
|
||||
Security/SecKey.c
|
||||
Security/SecKeyAdaptors.c
|
||||
Security/SecPolicy.c
|
||||
Security/SecPolicyLeafCallbacks.c
|
||||
Security/SecTrust.c
|
||||
Security/SecTrustStore.c
|
||||
Security/SecECKey.c
|
||||
Security/SecRSAKey.c
|
||||
Security/SecServerEncryptionSupport.c
|
||||
../utilities/src/SecInternalRelease.c
|
||||
Security/SecSignatureVerificationSupport.c
|
||||
)
|
||||
make_fat(libSecTrustOSX)
|
||||
|
@ -548,8 +548,8 @@ static CFTypeRef SecRSAPrivateKeyCopyOperationResult(SecKeyRef key, SecKeyOperat
|
||||
|
||||
// Encrypt buffer and write it to output data.
|
||||
result = CFDataCreateMutableWithScratch(kCFAllocatorDefault, ccrsa_block_size(ccrsa_ctx_public(fullkey)));
|
||||
ccerr = ccrsa_priv_crypt(fullkey, (cc_unit *)CFDataGetMutableBytePtr((CFMutableDataRef)result),
|
||||
(const cc_unit *)CFDataGetBytePtr(in1));
|
||||
//ccerr = ccrsa_priv_crypt(fullkey, (cc_unit *)CFDataGetMutableBytePtr((CFMutableDataRef)result),
|
||||
// (const cc_unit *)CFDataGetBytePtr(in1));
|
||||
} else {
|
||||
// Operation is supported.
|
||||
result = kCFBooleanTrue;
|
||||
@ -561,8 +561,8 @@ static CFTypeRef SecRSAPrivateKeyCopyOperationResult(SecKeyRef key, SecKeyOperat
|
||||
if (mode == kSecKeyOperationModePerform) {
|
||||
// Decrypt buffer and write it to output data.
|
||||
result = CFDataCreateMutableWithScratch(NULL, ccrsa_block_size(fullkey));
|
||||
ccerr = ccrsa_priv_crypt(fullkey, (cc_unit *)CFDataGetMutableBytePtr((CFMutableDataRef)result),
|
||||
(const cc_unit *)CFDataGetBytePtr(in1));
|
||||
//ccerr = ccrsa_priv_crypt(fullkey, (cc_unit *)CFDataGetMutableBytePtr((CFMutableDataRef)result),
|
||||
// (const cc_unit *)CFDataGetBytePtr(in1));
|
||||
} else {
|
||||
// Operation is supported.
|
||||
result = kCFBooleanTrue;
|
||||
|
1
OSX/sec/Security/SecureObjectSync
Symbolic link
1
OSX/sec/Security/SecureObjectSync
Symbolic link
@ -0,0 +1 @@
|
||||
../SOSCircle/SecureObjectSync
|
1
OSX/sec/libDER
Symbolic link
1
OSX/sec/libDER
Symbolic link
@ -0,0 +1 @@
|
||||
../libsecurity_keychain/libDER/libDER
|
1
OSX/sec/utilities
Symbolic link
1
OSX/sec/utilities
Symbolic link
@ -0,0 +1 @@
|
||||
../utilities/src
|
@ -48,6 +48,9 @@
|
||||
#error "unknown keystore status for this platform"
|
||||
#endif
|
||||
|
||||
#undef TARGET_HAS_KEYSTORE
|
||||
#define TARGET_HAS_KEYSTORE 0
|
||||
|
||||
#if !TARGET_HAS_KEYSTORE
|
||||
|
||||
#include <IOKit/IOReturn.h>
|
||||
|
1
include/Security/SecAsn1Coder.h
Symbolic link
1
include/Security/SecAsn1Coder.h
Symbolic link
@ -0,0 +1 @@
|
||||
../../OSX/libsecurity_asn1/lib/SecAsn1Coder.h
|
Loading…
x
Reference in New Issue
Block a user