Examples of CertificateAlgorithmId


Examples of sun.security.x509.CertificateAlgorithmId

    info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(owner));
    info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
    info.set(X509CertInfo.VERSION, new CertificateVersion(CertificateVersion.V3));
    AlgorithmId algo = new AlgorithmId(AlgorithmId.md5WithRSAEncryption_oid);
    info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algo));
  
    // Sign the cert to identify the algorithm that's used.
    X509CertImpl cert = new X509CertImpl(info);
    cert.sign(privkey, algorithm);
  
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

    info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
    info
      .set(X509CertInfo.VERSION, new CertificateVersion(CertificateVersion.V3));
    AlgorithmId algo = new AlgorithmId(AlgorithmId.md5WithRSAEncryption_oid);
    info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algo));

    // Sign the cert to identify the algorithm that's used.
    X509CertImpl cert = new X509CertImpl(info);
    cert.sign(privkey, algorithm);
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

    info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
    info
      .set(X509CertInfo.VERSION, new CertificateVersion(CertificateVersion.V3));
    AlgorithmId algo = new AlgorithmId(AlgorithmId.md5WithRSAEncryption_oid);
    info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algo));

    // Sign the cert to identify the algorithm that's used.
    X509CertImpl cert = new X509CertImpl(info);
    cert.sign(privkey, algorithm);
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

    }
   
    public X509Builder algorithm(AlgorithmId algorithmId) {
        try {
            this.algorithm = algorithmId; // new AlgorithmId(AlgorithmId.sha256WithRSAEncryption_oid); // md5WithRSAEncryption_oid
            info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algorithm));
//                info.set(CertificateAlgorithmId.NAME + "." + CertificateAlgorithmId.ALGORITHM, algorithm); // was present in older monolith version of the certificate factory, but it seems we don't really need it
        }
        catch(Exception e) {
            fault(e, "algorithm(%s)", algorithmId.getName());
        }
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

    info.set(X509CertInfo.VERSION, new CertificateVersion(
        CertificateVersion.V3));
    info.set(X509CertInfo.SERIAL_NUMBER, new CertificateSerialNumber(
        serialNumber));
    AlgorithmId algID = signer.getAlgorithmId();
    info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(
        algID));
    info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(
        subjectName));
    info.set(X509CertInfo.KEY, new CertificateX509Key(subjectPublic));
    info.set(X509CertInfo.VALIDITY, validity);
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

        }

        info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
        info.set(X509CertInfo.VERSION, new CertificateVersion(CertificateVersion.V3));
        AlgorithmId algo = new AlgorithmId(AlgorithmId.md5WithRSAEncryption_oid);
        info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algo));

        CertificateExtensions ext = new CertificateExtensions();
        // Critical: Not CA, max path len 0
        ext.set(BasicConstraintsExtension.NAME, new BasicConstraintsExtension(true, false, 0));
        // Critical: only allow TLS ("serverAuth" = 1.3.6.1.5.5.7.3.1)
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

      info.set(X509CertInfo.VERSION, new CertificateVersion(
          CertificateVersion.V3));
      info.set(X509CertInfo.SERIAL_NUMBER, new CertificateSerialNumber(
          serialNo));
      AlgorithmId algID = signer.getAlgorithmId();
      info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(
          algID));
      info.set(X509CertInfo.SUBJECT, new CertificateSubjectName(
          subjectName));
      info.set(X509CertInfo.KEY, new CertificateX509Key(pubKey));
      info.set(X509CertInfo.VALIDITY, valid);
View Full Code Here

Examples of sun.security.x509.CertificateAlgorithmId

    info.set(X509CertInfo.ISSUER, new CertificateIssuerName(owner));
    info.set(X509CertInfo.KEY, new CertificateX509Key(pair.getPublic()));
    info
      .set(X509CertInfo.VERSION, new CertificateVersion(CertificateVersion.V3));
    AlgorithmId algo = new AlgorithmId(AlgorithmId.md5WithRSAEncryption_oid);
    info.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(algo));

    // Sign the cert to identify the algorithm that's used.
    X509CertImpl cert = new X509CertImpl(info);
    cert.sign(privkey, algorithm);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.