org.spongycastle.asn1.x509.V3TBSCertificateGenerator.setSubjectPublicKeyInfo()方法的使用及代码示例

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

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

V3TBSCertificateGenerator.setSubjectPublicKeyInfo介绍

暂无

代码示例

代码示例来源:origin: com.madgag.spongycastle/prov

public void setPublicKey(
  PublicKey       key)
  throws IllegalArgumentException
{
  try
  {
    tbsGen.setSubjectPublicKeyInfo(
          SubjectPublicKeyInfo.getInstance(new ASN1InputStream(key.getEncoded()).readObject()));
  }
  catch (Exception e)
  {
    throw new IllegalArgumentException("unable to process key - " + e.toString());
  }
}

代码示例来源:origin: com.madgag/scprov-jdk15on

public void setPublicKey(
  PublicKey       key)
  throws IllegalArgumentException
{
  try
  {
    tbsGen.setSubjectPublicKeyInfo(
          SubjectPublicKeyInfo.getInstance(new ASN1InputStream(key.getEncoded()).readObject()));
  }
  catch (Exception e)
  {
    throw new IllegalArgumentException("unable to process key - " + e.toString());
  }
}

代码示例来源:origin: stackoverflow.com

tbsGen.setEndDate(new Time(new Date(endDate)));
tbsGen.setSubject(new X500Name(dn));
tbsGen.setSubjectPublicKeyInfo(SubjectPublicKeyInfo.getInstance(certPubKey.getEncoded()));
tbsGen.setSignature(sigGen.getAlgorithmIdentifier());

代码示例来源:origin: com.madgag.spongycastle/bcpkix-jdk15on

/**
 * Create a builder for a version 3 certificate.
 *
 * @param issuer the certificate issuer
 * @param serial the certificate serial number
 * @param notBefore the Time before which the certificate is not valid
 * @param notAfter the Time after which the certificate is not valid
 * @param subject the certificate subject
 * @param publicKeyInfo the info structure for the public key to be associated with this certificate.
 */
public X509v3CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
  tbsGen = new V3TBSCertificateGenerator();
  tbsGen.setSerialNumber(new ASN1Integer(serial));
  tbsGen.setIssuer(issuer);
  tbsGen.setStartDate(notBefore);
  tbsGen.setEndDate(notAfter);
  tbsGen.setSubject(subject);
  tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
  extGenerator = new ExtensionsGenerator();
}

代码示例来源:origin: com.madgag.spongycastle/pkix

/**
 * Create a builder for a version 3 certificate.
 *
 * @param issuer the certificate issuer
 * @param serial the certificate serial number
 * @param notBefore the Time before which the certificate is not valid
 * @param notAfter the Time after which the certificate is not valid
 * @param subject the certificate subject
 * @param publicKeyInfo the info structure for the public key to be associated with this certificate.
 */
public X509v3CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
  tbsGen = new V3TBSCertificateGenerator();
  tbsGen.setSerialNumber(new ASN1Integer(serial));
  tbsGen.setIssuer(issuer);
  tbsGen.setStartDate(notBefore);
  tbsGen.setEndDate(notAfter);
  tbsGen.setSubject(subject);
  tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
  extGenerator = new ExtensionsGenerator();
}

相关文章