Commit Graph

143 Commits

Author SHA1 Message Date
CuriousTommy
2edd314884
Merge pull request #4 from darlinghq/gen_developer_sdk
Generate SDK Headers
2022-09-05 20:14:38 -07:00
Thomas A
a783ece150 Relocate framework header to darling-framework folder 2022-09-05 16:59:40 -07:00
Thomas A
eadc57901e Fix symbolic link 2022-09-04 13:17:22 -07:00
Thomas A
8b587edf3b Generate Headers for Security 2022-09-04 10:55:50 -07:00
Ariel Abreu
01e73738c7
Fix for Clang 13 2021-11-14 20:10:33 -05:00
Ariel Abreu
26a96f7995
Disable os_log format errors
This fixes the build with older clang versions
2021-06-24 23:21:50 -04:00
Ariel Abreu
db5fb10cca
Disable repetitive warning in Authorization.h
This file gets included in many places throughout Darling and this warning is useless and annoying.
2021-04-30 09:18:09 -04:00
Andrew Hyatt
8440f6a072 Fix unnecessary rebuilds on Ninja
Not tested on make but maybe happened there too
2021-02-09 14:22:33 -05:00
Ariel Abreu
9289fe3bbc
Use create_symlink instead of CREATE_LINK 2021-01-13 23:27:03 -05:00
Ariel Abreu
6bba4ff9b7
Disable a few things in trustd to get it working
The main things are that trustd now tries to download assets for revocations and policies, but we don't really need any of that.
2021-01-07 00:06:44 -05:00
Ariel Abreu
c188d1f130
Fix a probable typo in Apple's code?
Maybe they changed `DERParseSequenceContent` after making libDER closed-source, and therefore this would be an issue with us using the last released libDER sources.

This fixes certificate parsing and it was just a simple reversion to the old function call, which is why I think it was a typo in their updated code.
2021-01-04 12:09:50 -05:00
Ariel Abreu
af59a6bc86
Disable UID verification for MDS DBs 2021-01-04 12:03:04 -05:00
Ariel Abreu
6d17f77b75
Re-disable auditing (partially)
I had accidentally re-enabled it by updating the upstream sources and forgetting to add back our `#if[n]def DARLING` modifications.
2021-01-04 11:54:45 -05:00
Thomas A
3ceb1576a6 Refactor CMakeList To Support Only Building 64bit 2020-12-13 14:01:19 -08:00
Ariel Abreu
38bc40c87b
Fix for Clang 11+ 2020-12-01 23:47:51 -05:00
Ariel Abreu
4c14bf33ee
Another temp. hack: disable sleep watching in securityd server 2020-11-06 14:47:54 -05:00
Ariel Abreu
3da68df726
Merge branch 'update-sources' of https://github.com/darlinghq/darling-security into update-sources 2020-11-03 11:54:18 -05:00
Ariel Abreu
7b11f335f6
Temporary hack: Disable IOKit usage in IOPowerWatcher
This should actually be handled in our `iokitd`.
2020-11-03 11:54:06 -05:00
Thomas A
0f0f96ed54 Refactor CMakeLists.txt in security/OSX to use more generic arch 2020-10-04 18:51:45 -07:00
Ariel Abreu
56f4dca0b2
Fix argument to add_darling_static_library in add_security_library
It was overlooked in the search-and-replace from the last commit because I had only included `**/CMakeLists.txt`, and not `**/*.cmake`.
2020-09-28 21:18:56 -04:00
Ariel Abreu
67eb0bb1d1
Update CMakeLists for generic arch change
This was just a quick search-and-replace to get the project compiling again, but we'll need to rename some libraries and generated files to complete the architecture abstraction.
2020-09-28 13:41:17 -04:00
Ariel Abreu
18a369686e
Avoid typedef conflict when Security/oids.h has been included 2020-08-31 15:54:35 -04:00
Ariel Abreu
ffc4d35c5c
Get more of the updated Security to build
We'll build more stuff later, but for now, the stuff that was currently building is now building again (except `secd`; that one has been tangled up by more "secret" libraries since the update)

To build the rest, we'll need to enable Octagon and TrustedPeers, and I'm not sure what effect that'll have. To be honest, I'm not even sure what they do
2020-08-27 22:08:13 -04:00
Ariel Abreu
22edbe3f04 Bunch of changes to get it to compile properly 2020-07-23 15:05:53 -04:00
Ariel Abreu
50ad9cf15f Link static Security libraries strongly 2020-07-18 20:02:57 -04:00
Ariel Abreu
cb0695c5a0
Get the update Security framework to link
I had to change up quite a few things in other libraries/frameworks in terms of how they're built/linked; specifically, I had to change up Foundation, CFNetwork, and CoreTLS.

Basically, Apple makes them all depend on each other, so I had to make some of them circular (and the Security framework, too).
I had some issues with this at first because making Foundation a circular library caused the linker to segfault trying to link the 64-bit firstpass (weird, I know).
So instead, I decided to make CFNetwork circular with no siblings (which is perfectly okay), just to make it run a firstpass with no dependencies, then link Foundation to that.
Then, Security links to Foundation normally and everybody's happy.

I also had to build `libcoretls_cfhelpers`, which depends on Security, but Security also depends on it, so I think you can guess what I had to do.
(In case you can't guess: I had to make coretls_cfhelpers a circular library, as well as Security, too).

Also `libsecurity_keychain/lib/CCallbackMgr.cp` is not misspelled; it came with the `.cp` extension, but I had to tell the compiler that it's a C++ file (not sure why the non-standard extension, but whatever).
2020-07-16 13:42:32 -04:00
Ariel Abreu
bf1385e233
Partial Darling build of Security-59306.61.1
This is only the *build* of the Security framework. It does not link yet, and I also have not tried building the various executables yet.

This one required lots of edits in various places throughout the Darling codebase. It seems Apple has really changed things up from 10.13 to 10.15.

A great example of the huge difference is that libDER is no longer included with Security! I had to import it from the last version it was released and modify it slightly to fit the updated code.
Yet another example of Apple being bipolar towards open-source. I wonder what kind of secrets they could be hiding in a library made for working with an *open standard*, smh.

Also, since 10.15 included the drop of 32-bit support, Apple has now made use of many more "modern" Objective-C runtime features, such as automatic ivar synthesis.
Since we want to keep 32-bit app support in Darling but also support newer 64-bit apps and frameworks, I've put the sources using the new features into x86_64-only object libraries.
That way, we only build them for 64-bit and they're available in the 64-bit part of the final "fat" framework. This is fine because those brand new sources aren't used by any old 32-bit code (and 32-bit code can't be updated to use it, either).

Also, I'd like to point out that Apple's code uses such a mess of includes that it's ridiculous (and this is for all their projects, not just Security). Some sources require more includes than the ones listed in Xcode.
2020-07-15 11:30:18 -04:00
Ariel Abreu
c74333ad6d
Security-59306.61.1 2020-07-06 07:59:58 -04:00
Ariel Abreu
29f42375ee
Initial update to clean up include directories
"initial" because there might some additional modifications necessary later on
2020-05-14 12:57:44 -04:00
Thomas A
a4f5c297a6 Include LocalAuthentication header folder 2020-05-05 10:11:00 -07:00
Thomas A
e425d3866d Include CryptoTokenKit header folder 2020-05-04 21:26:39 -07:00
Luboš Doležel
3ecba7e588
Merge pull request #3 from facekapow/build-secd-trustd
Get `secd` and `trustd` to build
2020-04-19 12:43:47 +02:00
Ariel Abreu
6d333db00c
Merge branch 'master' into build-secd-trustd 2020-04-14 23:27:49 -04:00
Lubos Dolezel
16d14586fb Try a different approach 2020-04-13 12:45:18 +02:00
Lubos Dolezel
6447b76fc5 Reverse the link order again 2020-04-13 12:26:01 +02:00
Lubos Dolezel
3bec0f7d3f Another build fix attempt, because I can't reproduce it locally 2020-04-13 12:01:28 +02:00
Lubos Dolezel
760ea43aab Try to fix a build problem on Jenkins 2020-04-12 22:56:34 +02:00
Lubos Dolezel
f0f3b718b0 Fix a build problem 2020-04-12 20:57:05 +02:00
Ariel Abreu
4f070c85e0
Properly name secd and trustd 2020-04-08 20:11:33 -04:00
Ariel Abreu
b1722c1765
Get trustd and secd to build 2020-04-08 19:51:04 -04:00
Lubos Dolezel
b763dc9e68 Almost build /usr/libexec/securityd 2020-04-08 10:30:49 +02:00
Lubos Dolezel
04e3811f63 Build the 'security' command line tool 2020-04-01 22:50:17 +02:00
Andrew Hyatt
190edd4b44
Merge pull request #2 from CuriousTommy/remove_undefined
Remove undefined argument, Added Stubs, and Fixed DEPENDENCIES list
2020-03-31 08:21:51 -04:00
Thomas A
735c2346e0 Remove undefined argument, Added Stubs, and Fixed DEPENDENCIES list 2020-03-28 13:13:25 -07:00
Andrew Hyatt
30f90ed6e9
Add missing constant 2020-03-19 18:35:58 -04:00
Andrew Hyatt
466393c7aa
Clean up build output 2020-03-06 15:30:01 -05:00
Lubos Dolezel
1896db842b Reduce the amount of undefined symbols 2020-02-26 23:22:20 +01:00
Sergey Bugaev
2e611a40d5 Don't run securityd at load 2019-02-23 14:59:13 +03:00
Sergey Bugaev
250e8a5ce4 Disable IOKit notification handling 2019-02-23 14:56:50 +03:00
Sergey Bugaev
1d7eef9a7e Disable UID check 2019-02-23 14:56:50 +03:00