สำรองพวงกุญแจก่อนที่จะลองทำอะไร
รายการใบรับรองหลัก:
sudo security dump-keychain /System/Library/Keychains/SystemRootCertificates.keychain
เพียงมองหาชื่อหรือค่าแฮชของใบรับรองที่คุณต้องการกำจัดและจดไว้
ตอนนี้คุณสามารถลบใบรับรองรูทนั้นโดยใช้security delete-certificate
คำสั่ง
การใช้งาน: ลบใบรับรอง [-c ชื่อ] [-Z แฮช] [-t] [พวงกุญแจ ... ]
-c Specify certificate to delete by its common name
-Z Specify certificate to delete by its SHA-1 hash value
-t Also delete user trust settings for this certificate The certificate to be deleted must be uniquely specified either by a
สตริงที่พบในชื่อสามัญหรือโดยแฮช SHA-1 หากไม่ได้ระบุพวงกุญแจสำหรับค้นหารายการค้นหาเริ่มต้นจะถูกใช้
ตัวอย่างเช่นคุณสามารถลบใบรับรองรูทภาษาจีนโดยใช้คำสั่งนี้:
sudo security delete-certificate -Z 8BAF4C9B1DF02A92F7DA128EB91BACF498604B6F /System/Library/Keychains/SystemRootCertificates.keychain