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

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


            //
            secToken.setKeyIdentifierThumb(remoteCert);
            break;

        case WSConstants.ISSUER_SERIAL:
            XMLX509IssuerSerial data = new XMLX509IssuerSerial(document,
                    remoteCert);
            X509Data x509Data = new X509Data(document);
            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

            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

         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

            //
            secToken.setKeyIdentifierThumb(remoteCert);
            break;

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

        // Issuer/Serial hint
        ki = new KeyInfo(doc);
        ki.addStorageResolver(storage);
        x509data = new X509Data(doc);
        x509data.add(new XMLX509IssuerSerial(doc, cert.getIssuerX500Principal().getName(), cert.getSerialNumber()));
        ki.add(x509data);
        assertEquals(publicKey, ki.getPublicKey());

        ki.registerInternalKeyResolver(privateKeyResolver);
        assertEquals(privateKey, ki.getPrivateKey());
View Full Code Here

    @org.junit.Test
    public void testGetIssuerName() throws Exception {
        // Make sure hex encoded value is not escaped (see ...)
        String issuer = "9.99.999=#abc123";
        XMLX509IssuerSerial is =
            new XMLX509IssuerSerial(doc, issuer, 0);
        assertEquals(issuer, is.getIssuerName());
        // System.out.println(is.getIssuerName());
        issuer = "CN=#abc123";
        is = new XMLX509IssuerSerial(doc, issuer, 0);
        assertEquals("CN=\\#abc123", is.getIssuerName());
        // System.out.println(is.getIssuerName());
    }
View Full Code Here

         object.setId("object-4");

         X509Data x509data = new X509Data(doc);

         x509data.add(new XMLX509SubjectName(doc, cert));
         x509data.add(new XMLX509IssuerSerial(doc, cert));
         x509data.add(new XMLX509Certificate(doc, cert));
         object.appendChild(x509data.getElement());
         sig.appendObject(object);
      }
View Full Code Here

         object.setId("object-4");

         X509Data x509data = new X509Data(doc);

         x509data.add(new XMLX509SubjectName(doc, cert));
         x509data.add(new XMLX509IssuerSerial(doc, cert));
         x509data.add(new XMLX509Certificate(doc, cert));
         object.appendChild(x509data.getElement());
         sig.appendObject(object);
      }
View Full Code Here

         object.setId("object-4");

         X509Data x509data = new X509Data(doc);

         x509data.add(new XMLX509SubjectName(doc, cert));
         x509data.add(new XMLX509IssuerSerial(doc, cert));
         x509data.add(new XMLX509Certificate(doc, cert));
         object.appendChild(x509data.getElement());
         sig.appendObject(object);
      }
View Full Code Here

TOP

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

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.