Search results for

codesign

3,113 results found

Post

Replies

Boosts

Views

Activity

Reply to Emergency Reset
Detailed Analysis of the Logs These logs provide a snapshot of system activity and processes, including detailed information about framework usage, threading, and potential performance issues. Below is a breakdown of the logs and an analysis of possible tampering or anomalies. General Observations Key Frameworks and Libraries 1. Foundation & CoreFoundation: • Used for fundamental data manipulation and interaction between processes. Commonly seen in most application logs. 2. QuartzCore: • Graphics and animation rendering. Frequent recursive calls suggest heavy graphical processing. 3. libdispatch: • Task and thread queue management. Repeated invocations at specific offsets (+ 16296, + 49444) indicate high inter-thread activity. 4. AccountsDaemon: • Manages user accounts and synchronization. Persistent queries indicate high activity related to account management. 5. CoreData: • Backend database system; multiple recursive calls (+ 523316, + 182512) suggest inefficiencies in database interactions. Recurrent P
Jan ’25
Reply to Cannot load iTunesLibrary on macOS Sequoia 15.1
I found a solution to this problem after losing a full day. Thanks again to Apple for releasing an update that serves no purpose other than making life even harder for us developers. Every time an update is released, I dread installing it because I know very well that many apps will stop working after the update. I had coded two applications that use iTunesLibrary. They worked perfectly before, but now they don't work anymore, throwing the same error: Code=4097 connection to service named com.apple.amp.library.framework. Based on the documentation, I suspected an issue with sandboxing, entitlements, or binary signing ... but no, that wasn’t the root of the problem. After trying to mimic some behaviors of the Music app, like com.apple.amp.artwork.client, com.apple.amp.devices.client, com.apple.amp.library.client, com.apple.security.files.user-selected.read-only ... and experimenting with various options (some documented, some not), I stumbled upon something incredible that gave me the solution: I had moved my
Topic: Media Technologies SubTopic: General Tags:
Jan ’25
Reply to The notarized custom PAM module cannot function properly after unlock from screensaver
Sorry it’s taken me a few days to wade in here; I’m only now just catching up with the backlog that built up over the winter break. [quote='772227021, FCG, /thread/772227, /profile/FCG'] Could this issue also be related to a code signing configuration that needs adjustment? [/quote] On your part? No. First, some background. When you call the PAM API, PAM loads plug-ins into your process. This is subject to library validation, as explained here. IMPORTANT The following discusses implementation details that will help you understand what’s going on, but are not considered API. Don’t ship products that rely on this stuff. The exact rules for library validation are different for code that’s built-in to the OS [1]. For third-party code you have to opt in to library validation, either directly, via the library option when signing your code, or indirectly, via the hardened runtime. In contrast, built-in code is always subject to library validation, with an option to opt out. You can see this in action with the author
Jan ’25
Operation not permitted on xpc_listener_create
Hi, I'm trying to create a launch daemon that uses XPC to receive requests from an unprivileged app. Ultimately both components will be written in Go. For now I'm trying to write a PoC in Objective-C to make sure I get everything right, so I'm compiling / signing from the CLI, and writing plist files by hand -- I'm not using XCode. My current daemon code is pretty much the same as the boilerplate code that XCode generates when creating a new 'XPC Service': #import #include int main(int argc, char *argv[]) { xpc_rich_error_t error; dispatch_queue_t queue = dispatch_queue_create(com.foobar.daemon, DISPATCH_QUEUE_SERIAL); xpc_listener_t listener = xpc_listener_create( com.foobar.daemon, queue, XPC_LISTENER_CREATE_NONE, ^(xpc_session_t _Nonnull peer) { xpc_session_set_incoming_message_handler(peer, ^(xpc_object_t _Nonnull message) { int64_t firstNumber = xpc_dictionary_get_int64(message, firstNumber); int64_t secondNumber = xpc_dictionary_get_int64(message, secondNumber); // Create a reply and send it back to t
1
0
542
Jan ’25
Reply to Mass deployment of certificates and marking it as trusted
Hi @szigetics_nt szigetics_nt, Thank you for you commands and i was able to trust the certificate by creating a package with composer and user these commands in this way through post install script. sudo /usr/bin/security authorizationdb write com.apple.trust-settings.admin allow sudo security add-trusted-cert -p codeSign -p pkgSign -d -r trustAsRoot -k /Library/Keychains/System.keychain /private/tmp/Nexthink/SCTASK8557870_Nexthink.cer sudo /usr/bin/security authorizationdb write com.apple.trust-settings.admin admin you can edit the script as per your certificate and requirement. Also, if you can with the command to temporarily disable and re-enable the confirmation dialog for macOS sequoia then it will greatley helpful
Jan ’25
Stripping protections to allow lldb debugging
Chrome has started crashing almost immediately after startup. I've reported the issue to the Chrome team here: https://issues.chromium.org/issues/385433270 I'm hoping to debug the issue a bit more myself. This page from the Chrome team https://chromium.googlesource.com/chromium/src/+/master/docs/mac/debugging.md#chrome-builds suggests using the follow to strip off the protections: codesign --force --sign - path/to/Google Chrome.app However, applying that seems to have no effect: % codesign --force --sign - /Applications/Google Chrome copy.app /Applications/Google Chrome copy.app: replacing existing signature /Applications/Google Chrome copy.app: resource fork, Finder information, or similar detritus not allowed % lldb /Applications/Google Chrome copy.app (lldb) target create /Applications/Google Chrome copy.app Current executable set to '/Applications/Google Chrome copy.app' (arm64). (lldb) run error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the
Topic: Code Signing SubTopic: General Tags:
1
0
558
Dec ’24
Reply to SwiftData and CloudKit Development vs. Production Database
Everything you described above makes sense, except that a Release build with this same entitlements file doesn't work. I don't know a lot about Direct Distribution. My understanding is that it is the same as Developer ID distribution mentioned in Supported capabilities (macOS). If that's the case, CloudKit should be supported. My guess is that your app probably has something wrong about entitlements, which prevents it from using CloudKit. To confirm that, you can: Try to capture a sysdiagnose and find relevant error messages from there. This topic is covered in Capture and analyze a sysdiagnose. Use the following command line tool to dump the entitlements claimed by your app, and check if there is no difference between the the Release and Debug builds. $ codesign --display --entitlements - Also, if you can detail the steps about how you produced the Release build, I'd see if I can find something relevant. Best, —— Ziqiao Chen  Worldwide Developer Relations.
Jan ’25
How to verify signature of a package
In order to verify the signature of an application on disk, we can use SecStaticCodeCheckValidityWithErrors, which works as expected.However, if this is used on a signed package, the following error occurs The operation couldn’t be completed. (OSStatus error -67062.)Error 67062 also represents that an application is not signedIt appears that SecStaticCodeCheckValidityWithErrors only works with binary code or application bundles. To confirm this, calling codesign also fails to verify the signature of a package: codesign -dvvv myPackage.pkg myPackage.pkg: code object is not signed at allHow can we programmatically verify the signature of a package (pkg), without resorting to calling an external process such as pkgutil?
3
0
3.8k
Mar ’16
Reasons for the prompt "application is damaged and cannot be opened. You should move it to trash"
We have an application which keeps throwing the error application is damaged and cannot be opened. You should move it to Trash We have checked the following possible root causes: Codesign of the application using the codesign command Notarization of the application using the spctl command Executable permissions Checked for the presence of com.apple.quarantine flag for the application using xattr -l
3
0
327
Dec ’24
Codesign dylib/framework with entitlements
Is it correct to codesign dylib/framewoks with entitlements? My understanding is that only executables need to have the entitlement and the dylibs loaded in that process will automatically inherit those entitlements. However, I am seeing a lot of scripts on the internet that are signing dylibs as well with entitlements. For eg - # sign *.dylibs find $APP_BUNDLE -type f -name *.dylib -exec codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements $ENTITLEMENTS_FILE --sign $SIGNING_IDENTITY {} ; Is this even allowed? I know of at least one app that has passed notarization checks as well. If allowed, can a dylib have more entitlements than the process that loaded it?
2
0
916
Jan ’25
Reply to VPN causes developer cert in keychain to become untrusted
I just started running into this a few days ago and I'm not sure why. Same behavior as described above. Everything is working fine, then I need to connect to a VPN for work and when I disconnect from the VPN and try to build the app again and deploy it to the phone, it fails with: Warning: unable to build chain to self-signed root for signer Apple Development: {redacted} (redacted) Command CodeSign failed with a nonzero exit code There is also mention of errSecInternalComponent. If I open keychain on my Mac, I see that my development certificate now says that it's not trusted. And indeed, as julian99 stated, if I change the trust settings to Always Trust, close that window, re-open the certificate again, change the trust settings back to Use System Defaults and then close the window again, it fixes the problem. For added fun, I have to connect and disconnect from the VPN a lot during the work day because the VPN configuration blocks all IPv6 traffic (including link-local traffic) so when I'm connecte
Dec ’24
MetalTools.framework Missing/Corrupted
Like I said in the title, it looks like MetalTools.framework is missing or corrupted. I think I saw that the symbolic link was broken. They look like aliases in the finder, but I can't find the original. This was a problem with Ventura (using the last compatible Xcode version) and Sequoia 15.2 (Xcode 16.2). I didn't use Xcode before that. Note that none of my apps need Metal API (I don't think). I only noticed it when Xcode gave an error regarding Metal. Sorry this is so long; I hope the Terminal info will help. I don't want to reinstall Sequoia and this has been a problem since at least Ventura. Recommendations? ls -l /System/Library/PrivateFrameworks/MetalTools.framework/ total 0 lrwxr-xr-x 1 root wheel 27 Dec 7 01:11 MetalTools -> Versions/Current/MetalTools lrwxr-xr-x 1 root wheel 26 Dec 7 01:11 Resources -> Versions/Current/Resources drwxr-xr-x 4 root wheel 128 Dec 7 01:11 Versions ls -la /System/Library/PrivateFrameworks/MetalTools.framework/ total 0 drwxr-xr-x 5 root wheel 160 Dec 7 01:11 . drwxr
3
0
571
Dec ’24
Code Signing a GUI python App for notarization on macos
I created a python application using py2app and am able to code sign almost all the binaries using the command find ${NAME}.app -iname '*.so' -or -iname '*.dylib'| while read libfile; do codesign -s ${IDENTITY} --timestamp -o runtime --entitlements entitlements.plist ${libfile}; done; However there are some binaries that are located in a directory in a zip file name.app/Contents/Resouces/lib/python37.zip/PIL/.dylibs The problem is that these binaries don't get signed because they are located in a zip file. I have tried using Finder to unzip them and zip them back up so that I can code sign those binaries, but unzipping and zipping through Finder causes the program to no longer find the files in the zip. Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x000000010bb5ee00 (most recent call first): Abort trap: 6 Any help would be appreciated.
3
0
2.2k
May ’21
It seems that the code signing was successful, but notarization fails.
I want to distribute a macOS application created with Electron to third parties, but I am currently unable to do so because the code signing is not working correctly. From the following response, it appears that the code signing itself was successful: $ codesign -dvvv dist/mac-arm64/AnySticky.app Executable=/Users/myname/dev/electron-tutorial/dist/mac-arm64/AnySticky.app/Contents/MacOS/AnySticky Identifier=com.electron.electron-tutorial Format=app bundle with Mach-O thin (arm64) CodeDirectory v=20500 size=778 flags=0x10000(runtime) hashes=13+7 location=embedded Hash type=sha256 size=32 CandidateCDHash sha256=e105ecd3c2051554239df404c185f00fca5900de CandidateCDHashFull sha256=e105ecd3c2051554239df404c185f00fca5900de742e572c154aa889e9929186 Hash choices=sha256 CMSDigest=e105ecd3c2051554239df404c185f00fca5900de742e572c154aa889e9929186 CMSDigestType=2 CDHash=e105ecd3c2051554239df404c185f00fca5900de Signature size=9083 Authority=Apple Development: MY NAME (66MDM239Z8) Authority=Apple Worldwide Developer R
2
0
440
Dec ’24
Reply to SMJobSubmit works in user domain, but cannot be submitted in system domain
So, we actually need to stop right here: I'm using SMJobSubmit Stop using SMJobSubmit. That API was deprecated in 10.10 (seven years ago) and I believe we'd been recommending against it for several years. The modern replacement is SMAppService, introduced in macOS 13.0. Note that this is a modern replacement, in that it specifically supports privileged helper tools embedded inside app bundles. Keep in mind that doing this: The tool is embedded in the Contents/MacOS folder. ...is not safe with SMJobSubmit and never has been. SMJobSubmit is hard coding the executable path, which means the user renaming your app (or any other manipulation) will both break your job and create an opening which could allow an attacker to insert their executable in place of your job. If you need to support older systems, then the recommended approach would be to use SMJobBless as shown in EvenBetterAuthorization to install a privileged helper tool. The helper can then be used as the target for a launchd plist, which the privileged h
Topic: App & System Services SubTopic: General Tags:
Dec ’24