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

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


                }
            }

            len = x509Data.lengthCertificate();
            for (int i = 0; i < len; i++) {
                XMLX509Certificate x509Cert = x509Data.itemCertificate(i);
                PrivateKey privKey = resolveX509Certificate(x509Cert);
                if (privKey != null) {
                    return privKey;
                }
            }
View Full Code Here


            try {
                KeyInfo ki = new KeyInfo(e, null);

                if (ki.containsX509Data()) {
                    X509Data data = ki.itemX509Data(0);
                    XMLX509Certificate certElem = null;
                    if (data != null && data.containsCertificate()) {
                        certElem = data.itemCertificate(0);
                    }
                    if (certElem != null) {
                        X509Certificate cert = certElem.getX509Certificate();
                        certs = new X509Certificate[1];
                        certs[0] = cert;
                    }
                }
                // TODO: get alias name for cert, check against username set by
View Full Code Here

                }
            }

            len = x509Data.lengthCertificate();
            for (int i = 0; i < len; i++) {
                XMLX509Certificate x509Cert = x509Data.itemCertificate(i);
                PrivateKey privKey = resolveX509Certificate(x509Cert);
                if (privKey != null) {
                    return privKey;
                }
            }
View Full Code Here

                        KeyInfo ki = new KeyInfo(e, null);

                        if (ki.containsX509Data()) {
                            X509Data data = ki.itemX509Data(0);
                            if (data != null && data.containsCertificate()) {
                                XMLX509Certificate certElem = data.itemCertificate(0);
                                if (certElem != null) {
                                    X509Certificate cert = certElem.getX509Certificate();
                                    certs = new X509Certificate[1];
                                    certs[0] = cert;
                                    return new SAMLKeyInfo(assertion, certs);
                                }
                            } else if (data != null && data.containsIssuerSerial()) {
View Full Code Here

        try {
            KeyInfo ki = new KeyInfo(e, null);

            if (ki.containsX509Data()) {
                X509Data data = ki.itemX509Data(0);
                XMLX509Certificate certElem = null;
                if (data != null && data.containsCertificate()) {
                    certElem = data.itemCertificate(0);
                }
                if (certElem != null) {
                    X509Certificate cert = certElem.getX509Certificate();
                    certs = new X509Certificate[1];
                    certs[0] = cert;
                }
            }
            // TODO: get alias name for cert, check against username set by caller
View Full Code Here

            new XMLX509Certificate[this._x509CertKeyElements.length];

         // populate Object array
         for (int i = 0; i < this._x509CertKeyElements.length; i++) {
            this._x509certObject[i] =
               new XMLX509Certificate(this._x509CertKeyElements[i]
                  , BaseURI);
         }

         for (int i = 0; i < this._x509certObject.length; i++) {
            X509Certificate cert = this._x509certObject[i].getX509Certificate();
View Full Code Here

            new XMLX509Certificate[this._x509CertKeyElements.getLength()];

         // populate Object array
         for (int i = 0; i < this._x509CertKeyElements.getLength(); i++) {
            this._x509certObject[i] =
               new XMLX509Certificate((Element) this._x509CertKeyElements
                  .item(i), BaseURI);
         }

         for (int i = 0; i < this._x509certObject.length; i++) {
            X509Certificate cert = this._x509certObject[i].getX509Certificate();
View Full Code Here

            if (currentCert != null) {
               if (currentCert.getType().equals("X.509")) {
                  X509Data xd = new X509Data(this._doc);

                  xd.add(new XMLX509Certificate(this._doc,
                                                (X509Certificate) currentCert));
                  chainElement.appendChild(xd.getElement());
                  XMLUtils.addReturnToElement(chainElement);
               } else {
                  throw new IllegalArgumentException(
View Full Code Here

                                       Constants._TAG_X509CERTIFICATE);
         Certificate result[] = new Certificate[certificates.getLength()];

         for (int i = 0; i < certificates.getLength(); i++) {
            Element currentCert = (Element) certificates.item(i);
            XMLX509Certificate cert = new XMLX509Certificate(currentCert,
                                         this._baseURI);

            result[i] = cert.getX509Certificate();
         }

         return result;
      } catch (XMLSecurityException ex) {}
View Full Code Here

           throws XMLSecurityException {

      super(doc, alias);

      try {
         XMLX509Certificate xCert = new XMLX509Certificate(doc,
                                       cert.getEncoded());

         this._constructionElement.appendChild(xCert.getElement());
         XMLUtils.addReturnToElement(this);
      } catch (CertificateEncodingException ex) {
         throw new XMLSecurityException("empty", ex);
      }
View Full Code Here

TOP

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

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.