Package org.apache.cxf.xkms.model.xmldsig

Examples of org.apache.cxf.xkms.model.xmldsig.X509DataType


        List<X509Certificate> certList = new ArrayList<X509Certificate>();
        for (Object key : keyInfo.getContent()) {
            if (key instanceof JAXBElement) {
                Object value = ((JAXBElement<?>) key).getValue();
                if (value instanceof X509DataType) {
                    X509DataType x509Data = (X509DataType) value;
                    List<Object> data = x509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName();
                    for (Object certO : data) {
                        JAXBElement<?> certO2 = (JAXBElement<?>) certO;
                        if (certO2.getDeclaredType() == byte[].class) {
                            byte[] certContent = (byte[]) certO2.getValue();
                            X509Certificate cert = (X509Certificate) certFactory
View Full Code Here


    }

    public static KeyInfoType getKeyInfo(X509Certificate cert) throws CertificateEncodingException {
        KeyInfoType keyInfo = new KeyInfoType();
        JAXBElement<byte[]> certificate = new ObjectFactory().createX509DataTypeX509Certificate(cert.getEncoded());
        X509DataType x509DataType = new X509DataType();
        List<Object> x509DataContent = x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName();
        x509DataContent.add(certificate);
        JAXBElement<X509DataType> x509Data = new ObjectFactory().createX509Data(x509DataType);
        List<Object> keyInfoContent = keyInfo.getContent();
        keyInfoContent.add(x509Data);
        return keyInfo;
View Full Code Here

TOP

Related Classes of org.apache.cxf.xkms.model.xmldsig.X509DataType

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.