javax.xml.crypto.dsig.keyinfo.X509IssuerSerial Java Examples

The following examples show how to use javax.xml.crypto.dsig.keyinfo.X509IssuerSerial. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DOMX509IssuerSerial.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #2
Source File: DOMX509IssuerSerial.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #3
Source File: DOMX509Data.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #4
Source File: DOMX509IssuerSerial.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #5
Source File: DOMX509Data.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #6
Source File: DOMX509IssuerSerial.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #7
Source File: DOMX509Data.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #8
Source File: DOMX509IssuerSerial.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #9
Source File: DOMX509Data.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #10
Source File: DOMX509IssuerSerial.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #11
Source File: DOMX509Data.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #12
Source File: DOMX509IssuerSerial.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #13
Source File: DOMX509Data.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #14
Source File: DOMX509Data.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #15
Source File: DOMX509Data.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #16
Source File: DOMX509IssuerSerial.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #17
Source File: DOMX509Data.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #18
Source File: DOMX509IssuerSerial.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #19
Source File: DOMX509Data.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #20
Source File: DOMX509IssuerSerial.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #21
Source File: DOMX509Data.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #22
Source File: DOMX509IssuerSerial.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #23
Source File: DOMX509Data.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #24
Source File: DOMX509IssuerSerial.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}
 
Example #25
Source File: DOMX509Data.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void marshal(Node parent, String dsPrefix, DOMCryptoContext context)
    throws MarshalException
{
    Document ownerDoc = DOMUtils.getOwnerDocument(parent);
    Element xdElem = DOMUtils.createElement(ownerDoc, "X509Data",
                                            XMLSignature.XMLNS, dsPrefix);

    // append children and preserve order
    for (int i = 0, size = content.size(); i < size; i++) {
        Object object = content.get(i);
        if (object instanceof X509Certificate) {
            marshalCert((X509Certificate)object,xdElem,ownerDoc,dsPrefix);
        } else if (object instanceof XMLStructure) {
            if (object instanceof X509IssuerSerial) {
                ((DOMX509IssuerSerial)object).marshal
                    (xdElem, dsPrefix, context);
            } else {
                javax.xml.crypto.dom.DOMStructure domContent =
                    (javax.xml.crypto.dom.DOMStructure)object;
                DOMUtils.appendChild(xdElem, domContent.getNode());
            }
        } else if (object instanceof byte[]) {
            marshalSKI((byte[])object, xdElem, ownerDoc, dsPrefix);
        } else if (object instanceof String) {
            marshalSubjectName((String)object, xdElem, ownerDoc,dsPrefix);
        } else if (object instanceof X509CRL) {
            marshalCRL((X509CRL)object, xdElem, ownerDoc, dsPrefix);
        }
    }

    parent.appendChild(xdElem);
}
 
Example #26
Source File: DOMX509IssuerSerial.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!(obj instanceof X509IssuerSerial)) {
        return false;
    }
    X509IssuerSerial ois = (X509IssuerSerial)obj;
    return (issuerName.equals(ois.getIssuerName()) &&
            serialNumber.equals(ois.getSerialNumber()));
}