Package eu.emi.security.authn.x509.impl

Examples of eu.emi.security.authn.x509.impl.KeyAndCertCredential


        VOMSTrustStore ts = VOMSTrustStores.newTrustStore(
            Arrays.asList(DefaultVOMSTrustStore.DEFAULT_VOMS_DIR),
            TimeUnit.MINUTES.toMillis(30),
            l);
   
        X509CertChainValidatorExt certChainValidator = PAPConfiguration.instance().getCertchainValidator();
        validator = VOMSValidators.newValidator(ts,
            certChainValidator,
            l);
      }
     
View Full Code Here


    SSLOptions options = getSSLOptions();
   
    CANLListener l = new CANLListener();
   
    X509CertChainValidatorExt validator = CertificateValidatorBuilder
        .buildCertificateValidator(options.getTrustStoreDirectory(),
            l,
            l,
            options.getTrustStoreRefreshIntervalInMsec());
   
View Full Code Here

        X500Name issuerX500Name = CertificateHelpers.toX500Name(caCred.getCertificate().getSubjectX500Principal());

        X500Name subjectX500Name = CertificateHelpers.toX500Name(subjectDN);

        X509v3CertificateBuilder certBuilder = new X509v3CertificateBuilder(issuerX500Name, new BigInteger(20, rand),
                new Date(startTime), new Date(endTime), subjectX500Name, publicKeyInfo);

        AlgorithmIdentifier sigAlgId = X509v3CertificateBuilder.extractAlgorithmId(caCred.getCertificate());

        X509Certificate certificate = certBuilder.build(caCred.getKey(), sigAlgId, signatureAlgorithm, null, null);

        certificate.checkValidity(new Date());
        certificate.verify(caCred.getCertificate().getPublicKey());
        KeyAndCertCredential result = new KeyAndCertCredential(pair.getPrivate(), new X509Certificate[] { certificate,
                caCred.getCertificate() });
View Full Code Here

        X500Name issuerX500Name = CertificateHelpers.toX500Name(caCred.getCertificate().getSubjectX500Principal());

        X500Name subjectX500Name = CertificateHelpers.toX500Name(subjectDN);

        X509v3CertificateBuilder certBuilder = new X509v3CertificateBuilder(issuerX500Name, new BigInteger(20, rand),
                new Date(startTime), new Date(endTime), subjectX500Name, publicKeyInfo);

        AlgorithmIdentifier sigAlgId = X509v3CertificateBuilder.extractAlgorithmId(caCred.getCertificate());

        X509Certificate certificate = certBuilder.build(caCred.getKey(), sigAlgId, signatureAlgorithm, null, null);

        certificate.checkValidity(new Date());
        certificate.verify(caCred.getCertificate().getPublicKey());
        KeyAndCertCredential result = new KeyAndCertCredential(pair.getPrivate(), new X509Certificate[] { certificate,
                caCred.getCertificate() });
View Full Code Here

      trustedCert.add(gssContext.getTrustedCertLoc()+"/*.0");
      trustedCert.add(gssContext.getTrustedCertLoc()+"/*.pem");
     
      char[] c = null;
     
      DirectoryCertChainValidator dcValidator = new DirectoryCertChainValidator(trustedCert, Encoding.PEM, -1, 60000, null);
      bis = new ByteArrayInputStream(bos.toByteArray());
      bufis = new BufferedInputStream(bis);
      PEMCredential pem = new PEMCredential(bufis, c);
     
      secProperties = new DefaultClientConfiguration(dcValidator, pem);
View Full Code Here

      trustedCert.add(gssContext.getMyProxyManager().getTrustedCertsLoc() + "/*.0");
      trustedCert.add(gssContext.getMyProxyManager().getTrustedCertsLoc() + "/*.pem");
     
      char[] c = null;
     
      DirectoryCertChainValidator dcValidator = new DirectoryCertChainValidator(trustedCert, Encoding.PEM, -1, 60000, null);
      bis = new ByteArrayInputStream(bos.toByteArray());
      bufis = new BufferedInputStream(bis);
      PEMCredential pem = new PEMCredential(bufis, c);
     
      secProperties = new DefaultClientConfiguration(dcValidator, pem);
View Full Code Here

      trustedCert.add(GSISecurityContext.getTrustedCertificatePath() + "/*.0");
      trustedCert.add(GSISecurityContext.getTrustedCertificatePath() + "/*.pem");
     
      char[] c = null;
     
      DirectoryCertChainValidator dcValidator = new DirectoryCertChainValidator(trustedCert, Encoding.PEM, -1, 60000, null);
      bis = new ByteArrayInputStream(bos.toByteArray());
      bufis = new BufferedInputStream(bis);
      PEMCredential pem = new PEMCredential(bufis, c);
     
      secProperties = new DefaultClientConfiguration(dcValidator, pem);
View Full Code Here

            String certLocation = gssContext.getTrustedCertificatePath();
            List<String> trustedCert = new ArrayList<String>();
            trustedCert.add(certLocation + "/*.0");
            trustedCert.add(certLocation + "/*.pem");

            DirectoryCertChainValidator dcValidator = new DirectoryCertChainValidator(trustedCert, Encoding.PEM, -1,
                    60000, null);

            String userID = getUserName(jobExecutionContext);

            if ( userID == null || "".equals(userID) || userID.equalsIgnoreCase("admin") ) {
View Full Code Here

            String certLocation = gssContext.getTrustedCertificatePath();
            List<String> trustedCert = new ArrayList<String>();
            trustedCert.add(certLocation + "/*.0");
            trustedCert.add(certLocation + "/*.pem");

            DirectoryCertChainValidator dcValidator = new DirectoryCertChainValidator(trustedCert, Encoding.PEM, -1,
                    60000, null);

            String userID = getUserName(jobExecutionContext);

            if ( userID == null || "".equals(userID) || userID.equalsIgnoreCase("admin") ) {
View Full Code Here

            }

            String userDN = userID.replaceAll("^\"|\"$", "");

            // TODO: should be changed to default airavata server locations
            KeyAndCertCredential cred = generateShortLivedCertificate(userDN, certLocation
                    + "/cacert.pem", certLocation
                    + "/cakey.pem", "ultrascan3");
            secProperties = new DefaultClientConfiguration(dcValidator, cred);

            // secProperties.doSSLAuthn();
View Full Code Here

TOP

Related Classes of eu.emi.security.authn.x509.impl.KeyAndCertCredential

Copyright © 2018 www.massapicom. 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.