1. 程式人生 > >Mac 創建證書(以 創建gdb證書 為例 )

Mac 創建證書(以 創建gdb證書 為例 )

pick 1-1 src for png b- num iat alt

open /Applications/Utilities/Keychain\ Access.app/

打開 鑰匙串訪問

技術分享

技術分享

技術分享

技術分享

繼續繼續

技術分享

技術分享

技術分享

技術分享

創建完畢。

Now that we have a certificate, we need to use it to sign GDB. First, we‘ll restart the taskgatedprocess to make sure it picks up the new certificate. Quit Keychain Access (you must quit Keychain Access!) and return to the Terminal for these final commands.

Find the taskgated process.

$ ps -e | grep taskgated
技術分享

The first number in the above output is the PID. Use this to kill the process (it will immediately restart itself).

Now you can finally code sign GDB.

# Homebrew version
$ codesign -s gdb-cert $(which gdb)
  技術分享

Now you should be all set! The OS X Keychain may ask for your password the first time you attempt to debug a program, but it should work!

Mac 創建證書(以 創建gdb證書 為例 )