java.security.cert.X509CRL.getSignature()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中java.security.cert.X509CRL.getSignature()方法的一些代码示例,展示了X509CRL.getSignature()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509CRL.getSignature()方法的具体详情如下:
包路径:java.security.cert.X509CRL
类名称:X509CRL
方法名:getSignature

X509CRL.getSignature介绍

[英]Returns the signature bytes of this CRL.
[中]返回此CRL的签名字节。

代码示例

代码示例来源:origin: apache/pdfbox

try
  signatureHash = MessageDigest.getInstance("SHA-1").digest(crl.getSignature());

代码示例来源:origin: org.jsslutils/jsslutils

@Override
public byte[] getSignature() {
  X509CRL crl = this.crl;
  if (crl != null) {
    return crl.getSignature();
  } else {
    return null;
  }
}

代码示例来源:origin: arhs/sd-dss

/**
 * @return the a copy of x509crl as a X509CRLHolder
 */
public X509CRLHolder getX509CrlHolder() {
  try {
    final X509CRL x509crl = getX509crl();
    final TBSCertList tbsCertList = TBSCertList.getInstance(x509crl.getTBSCertList());
    final AlgorithmIdentifier sigAlgOID = new AlgorithmIdentifier(new ASN1ObjectIdentifier(x509crl.getSigAlgOID()));
    final byte[] signature = x509crl.getSignature();
    final DERSequence seq = new DERSequence(new ASN1Encodable[]{tbsCertList, sigAlgOID, new DERBitString(signature)});
    final CertificateList x509CRL = new CertificateList(seq);
    // final CertificateList x509CRL = new CertificateList.getInstance((Object)seq);
    final X509CRLHolder x509crlHolder = new X509CRLHolder(x509CRL);
    return x509crlHolder;
  } catch (CRLException e) {
    throw new DSSException(e);
  }
}

相关文章