OpenSSL 廢止憑證方式

  • openssl.cnf 參數檔 : /etc/pki/tls/openssl.cnf
  • 建立自己的憑證參數 Exp. CA_trysoft

看修改 openssl.cnf 內容

/home/jonathan/ca/trysoft/
|-- RootCA.crt
|-- RootCA.srl
|-- certs
|   |-- ClientCA.crt
|-- crl
|-- jonathan
|   |-- ClientCA.crt
|   |-- ClientCA.key
|   |-- ClientCA.pem
|   `-- ClientCA.pfx
|-- mail.ichiayi.com
|   |-- ServerCA.crt
|   `-- ServerCA.key
|-- newcerts
`-- private
    `-- RootCA.key
cd /home/jonathan/ca/trysoft/
touch index.txt
cp RootCA.srl CRL.srl
  • 廢止以下這個憑證
/home/jonathan/ca/trysoft/
|-- certs
    |-- ClientCA.crt
cd /home/jonathan/ca/trysoft/certs
openssl ca -name CA_trysoft -revoke ClientCA.crt

看執行結果

cd /home/jonathan/ca/trysoft/crl
openssl ca -name CA_trysoft -gencrl -out trysoft.crl

看執行結果

  • 要轉成 DER 格式可執行以下命令
    openssl crl -in trysoft.crl -outform DER -out trysoft.crl
/home/jonathan/ca/trysoft/
|-- CRL.srl
|-- CRL.srl.old
|-- RootCA.crt
|-- RootCA.srl
|-- certs
|   |-- ClientCA.crt
|-- crl
|   `-- trysoft.crl
|-- index.txt
|-- index.txt.attr
|-- index.txt.attr.old
|-- index.txt.old
|-- jonathan
|   |-- ClientCA.crt
|   |-- ClientCA.key
|   |-- ClientCA.pem
|   `-- ClientCA.pfx
|-- mail.ichiayi.com
|   |-- ServerCA.crt
|   `-- ServerCA.key
|-- newcerts
`-- private
    `-- RootCA.key
  • tech/openssl_cacrl.txt
  • 上一次變更: 2008/08/22 14:37
  • jonathan