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

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


    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


    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

                elem =
                    (Element)WSSecurityUtil.findElement(
                        elem, Constants._TAG_X509ISSUERSERIAL, Constants.SignatureSpecNS
                    );
            }
            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

            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

            throw new XWSSecurityException(
                "Cannot create X509IssuerSerial object out of given element");
        }
        ownerDoc = element.getOwnerDocument();
        delegate =
            new XMLX509IssuerSerial(ownerDoc, issuerName, serialNumber);
    }
View Full Code Here

    public X509IssuerSerial(
        Document doc,
        String X509IssuerName,
        BigInteger X509SerialNumber) {
        delegate =
            new XMLX509IssuerSerial(doc, X509IssuerName, X509SerialNumber);
        ownerDoc = doc;
    }
View Full Code Here

    public X509IssuerSerial(
        Document doc,
        String X509IssuerName,
        String X509SerialNumber) {
        delegate =
            new XMLX509IssuerSerial(doc, X509IssuerName, X509SerialNumber);
        ownerDoc = doc;
    }
View Full Code Here

    public X509IssuerSerial(
        Document doc,
        String X509IssuerName,
        int X509SerialNumber) {
        delegate =
            new XMLX509IssuerSerial(doc, X509IssuerName, X509SerialNumber);
        ownerDoc = doc;
    }
View Full Code Here

     *
     * @param doc
     * @param x509certificate
     */
    public X509IssuerSerial(Document doc, X509Certificate x509certificate) {
        delegate = new XMLX509IssuerSerial(doc, x509certificate);
        ownerDoc = doc;
    }
View Full Code Here

                            X509Certificate cert = certElem.getX509Certificate();
                            certs = new X509Certificate[1];
                            certs[0] = cert;
                        }
                    } else if (data != null && data.containsIssuerSerial()) {
                        XMLX509IssuerSerial issuerSerial = data.itemIssuerSerial(0);
                        String alias =
                            userCrypto.getAliasForX509Cert(
                                issuerSerial.getIssuerName(), issuerSerial.getSerialNumber()
                            );
                        certs = userCrypto.getCertificates(alias);
                    }
                }  else if (ki.containsKeyValue()) {
                    publicKey = ki.getPublicKey();
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.