Java 类org.bouncycastle.asn1.x509.V1TBSCertificateGenerator 实例源码

项目:ipack    文件:X509v1CertificateBuilder.java   
/**
 * Create a builder for a version 1 certificate.
 *
 * @param issuer the certificate issuer
 * @param serial the certificate serial number
 * @param notBefore the date before which the certificate is not valid
 * @param notAfter the date 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 X509v1CertificateBuilder(X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
    if (issuer == null)
    {
        throw new IllegalArgumentException("issuer must not be null");
    }

    if (publicKeyInfo == null)
    {
        throw new IllegalArgumentException("publicKeyInfo must not be null");
    }

    tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(serial));
    tbsGen.setIssuer(issuer);
    tbsGen.setStartDate(new Time(notBefore));
    tbsGen.setEndDate(new Time(notAfter));
    tbsGen.setSubject(subject);
    tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
}
项目:gwt-crypto    文件:X509v1CertificateBuilder.java   
/**
 * Create a builder for a version 1 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 X509v1CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
    if (issuer == null)
    {
        throw new IllegalArgumentException("issuer must not be null");
    }

    if (publicKeyInfo == null)
    {
        throw new IllegalArgumentException("publicKeyInfo must not be null");
    }

    tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(serial));
    tbsGen.setIssuer(issuer);
    tbsGen.setStartDate(notBefore);
    tbsGen.setEndDate(notAfter);
    tbsGen.setSubject(subject);
    tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
}
项目:cryptonit-applet    文件:PivTest.java   
private static TBSCertificate createTBS(ByteArrayOutputStream bOut, SubjectPublicKeyInfo ski, AlgorithmIdentifier algo) throws IOException {
    TBSCertificate tbs = null;

    V1TBSCertificateGenerator tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(0x1));
    tbsGen.setStartDate(new Time(new Date(100, 01, 01, 00, 00, 00)));
    tbsGen.setEndDate(new Time(new Date(130, 12, 31, 23, 59, 59)));
    tbsGen.setIssuer(new X500Name("CN=Cryptonit"));
    tbsGen.setSubject(new X500Name("CN=Cryptonit"));
    tbsGen.setSignature(algo);
    tbsGen.setSubjectPublicKeyInfo(ski);
    tbs = tbsGen.generateTBSCertificate();

    ASN1OutputStream aOut = new ASN1OutputStream(bOut);
    aOut.writeObject(tbs);
    System.out.println("Build TBS");
    System.out.println(toHex(bOut.toByteArray()));
    Base64.encode(bOut.toByteArray(), System.out);
    System.out.println();

    return tbs;
}
项目:Aki-SSL    文件:X509v1CertificateBuilder.java   
/**
 * Create a builder for a version 1 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 X509v1CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
    if (issuer == null)
    {
        throw new IllegalArgumentException("issuer must not be null");
    }

    if (publicKeyInfo == null)
    {
        throw new IllegalArgumentException("publicKeyInfo must not be null");
    }

    tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(serial));
    tbsGen.setIssuer(issuer);
    tbsGen.setStartDate(notBefore);
    tbsGen.setEndDate(notAfter);
    tbsGen.setSubject(subject);
    tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
}
项目:irma_future_id    文件:X509v1CertificateBuilder.java   
/**
 * Create a builder for a version 1 certificate.
 *
 * @param issuer the certificate issuer
 * @param serial the certificate serial number
 * @param notBefore the date before which the certificate is not valid
 * @param notAfter the date 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 X509v1CertificateBuilder(X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
    if (issuer == null)
    {
        throw new IllegalArgumentException("issuer must not be null");
    }

    if (publicKeyInfo == null)
    {
        throw new IllegalArgumentException("publicKeyInfo must not be null");
    }

    tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(serial));
    tbsGen.setIssuer(issuer);
    tbsGen.setStartDate(new Time(notBefore));
    tbsGen.setEndDate(new Time(notAfter));
    tbsGen.setSubject(subject);
    tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
}
项目:bc-java    文件:X509v1CertificateBuilder.java   
/**
 * Create a builder for a version 1 certificate.
 *
 * @param issuer the certificate issuer
 * @param serial the certificate serial number
 * @param notBefore the date before which the certificate is not valid
 * @param notAfter the date 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 X509v1CertificateBuilder(X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, X500Name subject, SubjectPublicKeyInfo publicKeyInfo)
{
    if (issuer == null)
    {
        throw new IllegalArgumentException("issuer must not be null");
    }

    if (publicKeyInfo == null)
    {
        throw new IllegalArgumentException("publicKeyInfo must not be null");
    }

    tbsGen = new V1TBSCertificateGenerator();
    tbsGen.setSerialNumber(new ASN1Integer(serial));
    tbsGen.setIssuer(issuer);
    tbsGen.setStartDate(new Time(notBefore));
    tbsGen.setEndDate(new Time(notAfter));
    tbsGen.setSubject(subject);
    tbsGen.setSubjectPublicKeyInfo(publicKeyInfo);
}
项目:ipack    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:ipack    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:Aki-SSL    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:Aki-SSL    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:AcademicTorrents-Downloader    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:AcademicTorrents-Downloader    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:CryptMeme    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:CryptMeme    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:irma_future_id    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
public X509V1CertificateGenerator()
{
    tbsGen = new V1TBSCertificateGenerator();
}
项目:bc-java    文件:X509V1CertificateGenerator.java   
/**
 * reset the generator
 */
public void reset()
{
    tbsGen = new V1TBSCertificateGenerator();
}