Package org.apache.xml.security.keys.content.x509

Examples of org.apache.xml.security.keys.content.x509.XMLX509CRL


            case WSConstants.THUMBPRINT_IDENTIFIER:
                secToken.setKeyIdentifierThumb(remoteCert);
                break;

            case WSConstants.ISSUER_SERIAL:
                XMLX509IssuerSerial data = new XMLX509IssuerSerial(doc, remoteCert);
                X509Data x509Data = new X509Data(doc);
                x509Data.add(data);
                secToken.setX509IssuerSerial(x509Data);               
                break;
View Full Code Here


      bstToken.setID(certUri);
      wsDocInfo.setBst(bstToken.getElement());
      break;

    case WSConstants.ISSUER_SERIAL:
      XMLX509IssuerSerial data = new XMLX509IssuerSerial(document,
          certs[0]);
      X509Data x509Data = new X509Data(document);
      x509Data.add(data);
      secRef.setX509IssuerSerial(x509Data);
      break;
View Full Code Here

                    .getElement(), false);
            wsDocInfo.setBst(bstToken.getElement());
            break;

        case WSConstants.ISSUER_SERIAL:
            XMLX509IssuerSerial data = new XMLX509IssuerSerial(doc, certs[0]);
            X509Data x509Data = new X509Data(doc);
            x509Data.add(data);
            secRef.setX509IssuerSerial(x509Data);
            break;
View Full Code Here

                }
            }

            len = x509Data.lengthIssuerSerial();
            for (int i = 0; i < len; i++) {
                XMLX509IssuerSerial x509Serial = x509Data.itemIssuerSerial(i);
                PrivateKey privKey = resolveX509IssuerSerial(x509Serial);
                if (privKey != null) {
                    return privKey;
                }
            }
View Full Code Here

            String alias = (String) aliases.nextElement();
            if (keyStore.isKeyEntry(alias)) {

                Certificate cert = keyStore.getCertificate(alias);
                if (cert instanceof X509Certificate) {
                    XMLX509IssuerSerial certSerial =
                        new XMLX509IssuerSerial(x509Serial.getDocument(), (X509Certificate) cert);

                    if (certSerial.equals(x509Serial)) {
                        log.debug("match !!! ");

                        try {
                            Key key = keyStore.getKey(alias, password);
                            if (key instanceof PrivateKey) {
View Full Code Here

                                    certs = new X509Certificate[1];
                                    certs[0] = cert;
                                    return new SAMLKeyInfo(assertion, certs);
                                }
                            } else if (data != null && data.containsIssuerSerial()) {
                                XMLX509IssuerSerial issuerSerial = data.itemIssuerSerial(0);
                                String alias =
                                    crypto.getAliasForX509Cert(
                                        issuerSerial.getIssuerName(), issuerSerial.getSerialNumber()
                                    );
                                certs = crypto.getCertificates(alias);
                                return new SAMLKeyInfo(assertion, certs);
                            }
                        } else if (ki.containsKeyValue()) {
View Full Code Here

         X509Data x509data = new X509Data(element, BaseURI);
         int noOfISS = x509data.lengthIssuerSerial();

         while (storage.hasNext()) {
            X509Certificate cert = storage.next();
            XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(element.getOwnerDocument(), cert);

            if (log.isDebugEnabled()) {
              log.debug("Found Certificate Issuer: "
                      + certSerial.getIssuerName());
              log.debug("Found Certificate Serial: "
                      + certSerial.getSerialNumber().toString());
            }

            for (int i=0; i<noOfISS; i++) {
               XMLX509IssuerSerial xmliss = x509data.itemIssuerSerial(i);

               if (log.isDebugEnabled()) {
                     log.debug("Found Element Issuer:     "
                         + xmliss.getIssuerName());
                     log.debug("Found Element Serial:     "
                         + xmliss.getSerialNumber().toString());
               }

               if (certSerial.equals(xmliss)) {
                  log.debug("match !!! ");
View Full Code Here

         X509Data x509data = new X509Data(element, BaseURI);
         int noOfISS = x509data.lengthIssuerSerial();

         while (storage.hasNext()) {
            X509Certificate cert = storage.next();
            XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(element.getOwnerDocument(), cert);

            cat.debug("Found Certificate Issuer: "
                      + certSerial.getIssuerName());
            cat.debug("Found Certificate Serial: "
                      + certSerial.getSerialNumber().toString());

            for (int i=0; i<noOfISS; i++) {
               XMLX509IssuerSerial xmliss = x509data.itemIssuerSerial(i);

               cat.debug("Found Element Issuer:     "
                         + xmliss.getIssuerName());
               cat.debug("Found Element Serial:     "
                         + xmliss.getSerialNumber().toString());


               if (certSerial.equals(xmliss)) {
                  cat.debug("match !!! ");
View Full Code Here

         int noOfISS = x509data.lengthIssuerSerial();

         Iterator storageIterator = storage.getIterator();
         while (storageIterator.hasNext()) {
            X509Certificate cert = (X509Certificate)storageIterator.next();
            XMLX509IssuerSerial certSerial = new XMLX509IssuerSerial(element.getOwnerDocument(), cert);

            if (log.isDebugEnabled()) {
              log.debug("Found Certificate Issuer: "
                      + certSerial.getIssuerName());
              log.debug("Found Certificate Serial: "
                      + certSerial.getSerialNumber().toString());
            }

            for (int i=0; i<noOfISS; i++) {
               XMLX509IssuerSerial xmliss = x509data.itemIssuerSerial(i);

               if (log.isDebugEnabled()) {
                     log.debug("Found Element Issuer:     "
                         + xmliss.getIssuerName());
                     log.debug("Found Element Serial:     "
                         + xmliss.getSerialNumber().toString());
               }

               if (certSerial.equals(xmliss)) {
                  log.debug("match !!! ");
View Full Code Here

        Element elem = getFirstElement();
        if (elem == null) {
            return null;
        }
        try {
            issuerSerial = new XMLX509IssuerSerial(elem, "");
        } catch (XMLSecurityException e) {
            throw new WSSecurityException(WSSecurityException.SECURITY_TOKEN_UNAVAILABLE,
                    "noToken",
                    new Object[]{"Issuer/Serial data element missing"});
        }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.keys.content.x509.XMLX509CRL

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.