一、简介

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. 9 闭包——《Swift3.0从入门到出家》

    8  闭包 Swift语言中可以使用一块独立代码块替代函数的定义,称独立的代码块为闭包 闭包格式为: {(参数列表)->返回值类型    in 执行语句 } 例子: <1>使用闭包实 ...

  2. Dedesql数据库类详解(二次开发必备教程)(转)

    http://www.dedecms.com/help/development/2009/1028/1076.html 织梦DedeCMS的二次开发不仅仅是会写写织梦的标签,会制作织梦的模板.很多时候 ...

  3. Nginx安装过程

    1. 首先 ./configure --prefix=/usr/common/nginx --with-http_stub_status_module 报如下错误: 2. 从报的错可以看出缺少pcre ...

  4. (转)WebApi 上传文件

    本文转载自:http://www.cnblogs.com/zj1111184556/p/3494502.html public class FileUploadController : ApiCont ...

  5. Studio 3T 如何使用 Query Builder 查询数据

    Studio 3T 是一款对 MongoDB 进行数据操作的可视化工具. 在 Studio 3T 中,我们可以借助 Query Builder 的 Drag & Drop 来构建查询条件. 具 ...

  6. 根据当前日期算前一年、前一月、前一天(java基础)

    问题的本身没有什么难度,但是要想一下子找到一个现成的方法还真不是那么容易,本来以为java.util.Date中会有方法结果找了半天没找到,最后还是在Calendar中找到了,记下别忘了!! 核心:使 ...

  7. Altium Designer之多图纸设计

    Altium Designer的多图纸功能感觉比较方便:今天翻了下徐老师<Altium Designer 快速入门>里面关于多图纸设计的介绍,再参考了altium 网站的一些资料,算是摸熟 ...

  8. Linux - 用户的增删改查及组的相关操作

    useradd:新增一个用户 useradd 几个常用的参数: -u:指定用户的 uid -g:指定用户所属的组 -d:指定用户的家目录 -c:指定用户的备注信息 -s:指定用户所用的 shell [ ...

  9. python构造远控

    server端: import socket import subprocess server=socket.socket() server.bind(('127.0.0.1',4444)) serv ...

  10. 2014.8.27 CAD数据结构

    Rwy表中存放所有物理跑道,主键rwy_id,但没有跑道中心点坐标 rwy_direction表中存放所有所有逻辑跑道号,也没有跑道入口坐标.同一rwy_id对应有2条记录 rwy_cline_poi ...