doorxp

Blog

Delete expired certificates from Keychain

#!/bin/bash# Grabs the expired certificate hashesexpired=$(security find-identity | grep EXPIRED | awk '{print $2}')# Check for certsif [ -z "$expired" ]
    then
        echo "No expired certificates, we're all good"
    else
    # Deletes the expired certs via their hash
    echo "Deleting expired certs"
    security delete-certificate -Z $expired    fiexit 0 #success


发表评论:

«   2025年5月   »
1234
567891011
12131415161718
19202122232425
262728293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言

    Powered By Z-BlogPHP 1.5.1 Zero

    Copyright doorxp.com Rights Reserved.