一、简介

ca命令能够签发证书请求文件以及生成CRL列表

二、语法

openssl ca [-verbose] [-config filename] [-name section] [-gencrl] [-revoke file][-crl_reason reason] [-crl_hold instruction] [-crl_compromise time] [-crl_CA_compromise time ] [ -subj subj] [-crldays days] [-crlhours hours] [-crlexts section] [-startdate date] [-enddate date][-days arg] [-md arg] [-policy arg] [-keyfile arg] [-keyform arg] [-key arg] [-passin arg] [-cert file][-selfsign] [-in file] [-out file] [-notext] [-outdir dir] [-infiles] [-spkac file] [-ss_cert file] [-preserveDN] [-batch] [-msie_hack] [-extensions section][-utf8] [-create_serial] [-multivalue-rdn] [-sigopt] [-noemailDN][ -crlsec] [-extfile file] [-updatedb] [ -engine id ]

选项

-verbose        - Talk alot while doing things
-config file - A config file
-name arg - The particular CA definition to use
-gencrl - Generate a new CRL
-crldays days - Days is when the next CRL is due
-crlhours hours - Hours is when the next CRL is due
-startdate YYMMDDHHMMSSZ - certificate validity notBefore
-enddate YYMMDDHHMMSSZ - certificate validity notAfter (overrides -days)
-days arg - number of days to certify the certificate for
-md arg - md to use, see openssl dgst -h for list
-policy arg - The CA 'policy' to support
-keyfile arg - private key file
-keyform arg - private key file format (PEM or ENGINE)
-key arg - key to decode the private key if it is encrypted
-cert file - The CA certificate
-selfsign - sign a certificate with the key associated with it
-in file - The input PEM encoded certificate request(s)
-out file - Where to put the output file(s)
-outdir dir - Where to put output certificates
-infiles .... - The last argument, requests to process
-spkac file - File contains DN and signed public key and challenge
-ss_cert file - File contains a self signed cert to sign
-preserveDN - Don't re-order the DN
-noemailDN - Don't add the EMAIL field into certificate' subject
-batch - Don't ask questions
-msie_hack - msie modifications to handle all those universal strings
-revoke file - Revoke a certificate (given in file)
-subj arg - Use arg instead of request's subject
-utf8 - input characters are UTF8 (default ASCII)
-multivalue-rdn - enable support for multivalued RDNs
-extensions .. - Extension section (override value in config file)
-extfile file - Configuration file with X509v3 extentions to add
-crlexts .. - CRL extension section (override value in config file)
-engine e - use engine e, possibly a hardware device.
-status serial - Shows certificate status given the serial number
-updatedb - Updates db for expired certificates

三、实例

1、签发证书请求文件

openssl ca -in cert_req.pem -extensions v3_ca -out newcert.pem

openssl ca -config openssl.cnf -name CA_default -days  -md sha1 -policy policy_anything -cert demoCA/cacert.pem -in cert_req.pem -out cert1.pem -preserveDN -noemailDN -subj /CN=CN/O=JS/OU=WX/cn=myname -extensions myexts

2、撤销证书并生成crl

openssl ca -revoke rsa_server_cert.pem -config openssl_utf8.cnf -keyfile rsa_ca_prikey.pem -passin pass:"" -cert rsa_ca_cert.pem
openssl ca -gencrl -config openssl_utf8.cnf -utf8 -keyfile rsa_ca_prikey.pem -passin pass:"" -cert rsa_ca_cert.pem -out crl.pem

设置原因、挂起处理方法

openssl ca -gencrl -crl_reason keyCompromise -crl_compromise 20010101030303Z  -crl_hold holdInstructionReject -crl_CA_compromise  20020101030303Z -crldays  -out crl2.crl

Openssl ca命令的更多相关文章

  1. openssl ca(签署和自建CA)

    用于签署证书请求.生成吊销列表CRL以及维护已颁发证书列表和这些证书状态的数据库.因为一般人无需管理crl,所以本文只介绍openssl ca关于证书管理方面的功能. 证书请求文件使用CA的私钥签署之 ...

  2. (13) openssl ca(签署和自建CA)

    用于签署证书请求.生成吊销列表CRL以及维护已颁发证书列表和这些证书状态的数据库.因为一般人无需管理crl,所以本文只介绍openssl ca关于证书管理方面的功能. 证书请求文件使用CA的私钥签署之 ...

  3. 9.openssl ca

    用于签名证书请求.生成CRL.维护一个记录已颁发证书和这些证书状态的数据库. 证书请求私用CA的私钥签名之后就是证书. [root@xuexi tmp]# man ca SYNOPSIS openss ...

  4. 搭建自己的CA服务 - OpenSSL CA 实战

    当前网络安全事故不断,如何提升系统安全性是一个系统上线之前必须考虑的重点DFx特性之一.在提升系统安全性的方法中, 给每个端口(通道)加上SSL协议是最通用和有效的一种. 使用SSL就必须要有证书,在 ...

  5. openssl常用命令行汇总

    openssl常用命令行汇总 随机数 openssl rand -out rand.dat -base64 32 摘要 直接做摘要 openssl dgst -sha1 -out dgst.dat p ...

  6. openssl CA 自签证书,阿里云配置tomcat https

    <一,openssl CA自签发证书> 1,生成私钥 openssl genrsa 1024 > private.key;

  7. (转)openssl 命令: openssl req 命令详解

                                      openssl req命令主要的功能有,生成证书请求文件, 查看验证证书请求文件,还有就是生成自签名证书.本文就主要记录一下open ...

  8. Openssl CA.pl命令

    一.简介 CA.pl是证书操作的友好接口,简化了一些相似的证书创建或管理操作 二.语法 CA.pl [-?] [-h] [-help] [-newcert] [-newreq][-newreq-nod ...

  9. Openssl verify命令

    一.简介 verify命令对证书的有效性进行验证,verify 指令会沿着证书链一直向上验证,直到一个自签名的CA 二.语法 openssl verify [-CApath directory] [- ...

随机推荐

  1. Python之json文件

    { "people":[ { "firstName": "Brett", "lastName":"McLaug ...

  2. 重温CLR(三)类型基础

    所有类型都从System.Object派生 “运行时”要求每个类型最终都要从System.Object类型派生.也就是说,一下两个类型的定义完全一致. //隐式派生自Object class Empl ...

  3. unity drawcall测试

    unity引擎影响drawcall的元素(使用Quad和Cube对比测试) 1.相机的background(没有渲染元素区域的颜色),4Verts.2Tris.1SetPass calls:      ...

  4. PCB 锣板和半孔工艺的差别

    PCB 锣板和半孔工艺的差别 PCB 在做模块时会用到半孔工艺,但是由于半孔是特殊工艺. 需要加费用,打板时费还不低. 下面这个图是锣板和半孔工艺的差别. https://www.amobbs.com ...

  5. Linux安装微信

    地址:http://www.toutiao.com/i6362126617556288001/#6649976-tsina-1-90079-4471e2b057b5019ad452c722f04bba ...

  6. jmeter 打不开 提示“Not able to find Java executable or version”的解决办法

    Not able to find Java executable or version. Please check your Java installation . errorlevel=2Not a ...

  7. java多线程实现礼花绽放的效果,

    总结:主要是那个红点点在上升的过程中要涂黑色,其实它不是一个点,是一个长条,而是被涂成黑色而隐藏了.还有这个睡眠时间,多线程 是你在面板上随便点,会出现随机的颜色圆圈,点哪里,哪里就可以出现圆 imp ...

  8. 2017中国大学生程序设计竞赛 - 女生专场 Happy Necklace(递推+矩阵快速幂)

    Happy Necklace Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) ...

  9. Thinkphp或查询使用

    if ($_GET['machine_type_id']) { $machine_type_id = trim($_GET['machine_type_id']); $where['machine_t ...

  10. 第七章 AOP(待续)

    ···············