Commit Graph

128 Commits

Author SHA1 Message Date
Ariel Abreu
3cfffcf2c5
Build secd 2023-09-20 21:18:11 -04:00
Thomas A
09d01249fb Fix Building For Security-59754.140.13
* Restore missing darling specific changes from previous release
* Use <CarbonCore/MacErrors.h> instead.
* Fixed building for i386
* Adjusted location of where some files are now stored at.
2023-04-23 12:48:26 -07:00
Thomas A
c7819c1bc8 Add symbol links for header/def files 2023-04-23 12:48:26 -07:00
Thomas A
6beec0389b Restore Darling Specific Changes 2023-04-22 22:21:49 -07:00
Thomas A
9bba1c54a7 Update Source To Security-59754.140.13 2022-12-12 19:51:23 -08:00
Thomas A
a8ddb01e80 Add static acm library 2022-11-20 12:23:24 -08:00
Thomas A
a783ece150 Relocate framework header to darling-framework folder 2022-09-05 16:59:40 -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
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
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
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
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
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
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
Lubos Dolezel
1896db842b Reduce the amount of undefined symbols 2020-02-26 23:22:20 +01: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
Sergey Bugaev
c543d9f835 Disable auditing 2019-02-23 14:56:50 +03:00
Sergey Bugaev
21687cb12e Install mdsinfo resources 2019-02-23 14:50:32 +03:00
Andrew Hyatt
1619da17c7 Build securityd
darlinghq/darling#463
2019-01-15 00:18:09 -05:00
Andrew Hyatt
976379d436 Fix _kSecAttrAccess not being exported
The issue is that the exported symbols list from Apple is
preprocessed. For whatever reason, it isn't being properly
preprocessed. The solution was to join the #included
ones together manually and get rid of the #if, etc.
The result of this is SEC_MANUAL.exp.

darlinghq/darling#445
2019-01-06 01:21:14 -05:00
Viktor Oreshkin
0cacc90a39 Fix build clang5 r292518 (C++ DR1310) 2017-11-01 21:49:54 +03:00
Andrew Hyatt
7a8917ecd6 Properly export symbols 2017-08-21 20:00:07 -07:00
Andrew Hyatt
c94c4e3db3 Link to CF using the new way 2017-08-10 17:45:22 -07:00
Lubos Dolezel
6071c49698 Use -dead_strip, eliminate some unresolved symbols 2017-08-08 22:22:59 +02:00