CA certutil -view 查询证书有效日期

来源:互联网 发布:js正则表达式非负整数 编辑:程序博客网 时间:2024/04/30 09:34

查询证书有效日期

certutil -view -restrict  "RequestId<=180000,NotBefore>=2012-12-01,NotBefore<=2012-12-30" -out "RequestId,CallerName,RequesterName,NotAfter" > c:\view.txt

 

certutil -view -restrict  "RequestId<40,NotAfter<=2014-09-12" -out "RequestId,CallerName,RequesterName,NotAfter" > c:\view.txt

 

certutil -view -restrict  "RequestId<=180000,NotAfter>=2012-12-01,NotAfter<=2012-12-30" -out "RequestId,CallerName,RequesterName,NotAfter" > c:\view.txt

 

查询显示内容如下:

 

 2020-12-9 0:00
架构:
  栏名                          本地化名称                    类型    最大长度
  ----------------------------  ----------------------------  ------  ---------
  RequestID                     颁发的申请 ID                 长      4 -- 已索引
  Request.CallerName            调用者名称                    字符串  2048 -- 已索引
  Request.RequesterName         申请人姓名                    字符串  2048 -- 已索引
  NotAfter                      证书截止日期                  日期    8 -- 已索引

第 1 行:
  颁发的申请 ID: 0x2
  调用者名称: "PTR\Test"
  申请人姓名: "PTR\Test"
  证书截止日期: 2013-11-8 14:50

第 2 行:
  颁发的申请 ID: 0x3
  调用者名称: "PTR\WIN2003ORACLE$"
  申请人姓名: "PTR\WIN2003ORACLE$"
  证书截止日期: 2014-11-9 19:28

第 3 行:
  颁发的申请 ID: 0x1
  调用者名称: "PTR\WIN2003ORACLE$"
  申请人姓名: "PTR\WIN2003ORACLE$"
  证书截止日期: 2017-11-8 14:33

行索引最大值: 3

3 行
  12 行属性,总大小 = 228,最大值 = 36,平均大小 = 19
   0 申请属性,总大小 = 0,最大值 = 0,平均大小 = 0
   0 证书扩展,总大小 = 0,最大值 = 0,平均大小 = 0
  12 域总数,总大小 = 228,最大值 = 36,平均大小 = 19
CertUtil: -view 命令成功完成。

 

 

 

 

 

具体查询字段如下:


架构:
  栏名                          本地化名称                    类型    最大长度
  ----------------------------  ----------------------------  ------  ---------
  Request.RequestID             申请 ID                       长      4 -- 已索引
  Request.RawRequest            二进制申请                    二进制  65536
  Request.RawArchivedKey        存档的密钥                    二进制  65536
  Request.KeyRecoveryHashes     密钥恢复代理散列              字符串  8192
  Request.RawOldCertificate     旧证书                        二进制  16384
  Request.RequestAttributes     申请属性                      字符串  32768
  Request.RequestType           申请类型                      长      4
  Request.RequestFlags          申请标志                      长      4
  Request.StatusCode            申请状态码                    长      4
  Request.Disposition           申请处理                      长      4 -- 已索引
  Request.DispositionMessage    申请处理消息                  字符串  8192
  Request.SubmittedWhen         申请提交日期                  日期    8
  Request.ResolvedWhen          申请解决日期                  日期    8 -- 已索引
  Request.RevokedWhen           吊销日期                      日期    8
  Request.RevokedEffectiveWhen  有效吊销日期                  日期    8 -- 已索引
  Request.RevokedReason         吊销原因                      长      4
  Request.RequesterName         申请人姓名                    字符串  2048 -- 已索引
  Request.CallerName            调用者名称                    字符串  2048 -- 已索引
  Request.SignerPolicies        标记策略                      字符串  8192
  Request.SignerApplicationPolicies  标记应用程序策略              字符串  8192
  Request.Officer               管理者                        长      4
  Request.DistinguishedName     申请可分辨名称                字符串  8192
  Request.RawName               申请二进制名称                二进制  4096
  Request.Country               申请国家(地区)                字符串  8192
  Request.Organization          申请单位                      字符串  8192
  Request.OrgUnit               申请部门                      字符串  8192
  Request.CommonName            申请公用名                    字符串  8192
  Request.Locality              申请城市                      字符串  8192
  Request.State                 申请省/自治区                 字符串  8192
  Request.Title                 申请人称谓                    字符串  8192
  Request.GivenName             申请人名                      字符串  8192
  Request.Initials              申请人姓名缩写                字符串  8192
  Request.SurName               申请人姓                      字符串  8192
  Request.DomainComponent       申请人域组件                  字符串  8192
  Request.EMail                 申请人电子邮件地址            字符串  8192
  Request.StreetAddress         申请人地址                    字符串  8192
  Request.UnstructuredName      申请没有结构的姓名            字符串  8192
  Request.UnstructuredAddress   申请没有结构的地址            字符串  8192
  Request.DeviceSerialNumber    申请设备序列号                字符串  8192
  RequestID                     颁发的申请 ID                 长      4 -- 已索引
  RawCertificate                二进制证书                    二进制  16384
  CertificateHash               证书散列算法                  字符串  128 -- 已索引
  CertificateTemplate           证书模板                      字符串  254 -- 已索引
  EnrollmentFlags               模板注册标志                  长      4
  GeneralFlags                  模板普通标志                  长      4
  SerialNumber                  序列号                        字符串  128 -- 已索引
  IssuerNameID                  颁发者名称 ID                 长      4
  NotBefore                     证书有效日期                  日期    8
  NotAfter                      证书截止日期                  日期    8 -- 已索引
  SubjectKeyIdentifier          发布的使用者密钥标识符        字符串  128
  RawPublicKey                  二进制公钥                    二进制  4096
  PublicKeyLength               公用密钥长度                  长      4
  PublicKeyAlgorithm            公钥算法                      字符串  254
  RawPublicKeyAlgorithmParameters  公钥算法参数                  二进制  4096
  UPN                           用户主体名称                  字符串  2048 -- 已索引
  DistinguishedName             颁发的可分辨名称              字符串  8192
  RawName                       颁发的二进制名称              二进制  4096
  Country                       颁发的国家(地区)              字符串  8192
  Organization                  颁发的单位                    字符串  8192
  OrgUnit                       颁发的部门                    字符串  8192
  CommonName                    颁发的公用名                  字符串  8192 -- 已索引
  Locality                      颁发的城市                    字符串  8192
  State                         颁发的省/自治区               字符串  8192
  Title                         颁发的称谓                    字符串  8192
  GivenName                     颁发的名                      字符串  8192
  Initials                      颁发的姓名缩写                字符串  8192
  SurName                       颁发的姓                      字符串  8192
  DomainComponent               颁发的域组件                  字符串  8192
  EMail                         颁发的电子邮件地址            字符串  8192
  StreetAddress                 颁发的地址                    字符串  8192
  UnstructuredName              颁发的没有结构的姓名          字符串  8192
  UnstructuredAddress           颁发的没有结构的地址          字符串  8192
  DeviceSerialNumber            颁发的设备序列号              字符串  8192

行索引最大值: 2

0 行
   0 行属性,总大小 = 0,最大值 = 0,平均大小 = 0
   0 申请属性,总大小 = 0,最大值 = 0,平均大小 = 0
   0 证书扩展,总大小 = 0,最大值 = 0,平均大小 = 0
   0 域总数,总大小 = 0,最大值 = 0,平均大小 = 0
CertUtil: -view 命令成功完成。