Package org.w3._2000._09.xmldsig_

Examples of org.w3._2000._09.xmldsig_.X509DataType


        recoverRequestType.setId("702");

        recoverRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_X509CHAIN);
        recoverRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_PRIVATEKEY);

        X509DataType x509DataType = sigFactory.createX509DataType();
        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(cert2.getEncoded()));
        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));

        KeyBindingType keyBindingType = xKMSObjectFactory.createKeyBindingType();
        keyBindingType.setKeyInfo(keyInfoType);
View Full Code Here


        recoverRequestType.setId("703");

        recoverRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_X509CHAIN);
        recoverRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_PRIVATEKEY);

        X509DataType x509DataType = sigFactory.createX509DataType();
        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(Constants.getUserCert().getEncoded()));
        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));

        KeyBindingType keyBindingType = xKMSObjectFactory.createKeyBindingType();
        keyBindingType.setKeyInfo(keyInfoType);
View Full Code Here

                Object contents = contentBytes != null ? contentBytes : contentStr;
               
                if (contents == null) {
                    List<Object> childKeyDataList = new ArrayList<Object>();
                    if (dataType.equals(X509DataType.class.getSimpleName())) {
                        X509DataType x509DataType = new X509DataType();
                        mapModelKeyDataValue(modelKeyDataValue.getKeyDataValueList(), childKeyDataList);
                        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().addAll(childKeyDataList);
                        JAXBElement dataJAXB = new JAXBElement(new QName("http://www.w3.org/2000/09/xmldsig#", tagName), X509DataType.class, x509DataType);
                        parentKeyDataList.add(dataJAXB);  
                    } else if (dataType.equals(RetrievalMethodType.class.getSimpleName())) {
                        RetrievalMethodType retrievalMethodType = new RetrievalMethodType();
                        TransformsType transformsType = new TransformsType();
View Full Code Here

            ref.setDigestValue(digestValueBytes);
            return ref;
        }

    private static KeyDataValue mapX509DataType(JAXBElement apiKeyInfoContentJAXB, KeyInfo modelKeyInfo) throws RuntimeException {
        X509DataType apiKeyInfoContent = (X509DataType)apiKeyInfoContentJAXB.getValue();
        KeyDataValue modelX509KeyData = new KeyDataValue();
        modelX509KeyData.setKeyDataType(X509DataType.class.getSimpleName());
        modelX509KeyData.setKeyDataName(apiKeyInfoContentJAXB.getName().getLocalPart());
        modelX509KeyData.setKeyInfo(modelKeyInfo);
        List<Object> x509IssuerSerialOrX509SKIOrX509SubjectNameList = apiKeyInfoContent.getX509IssuerSerialOrX509SKIOrX509SubjectName();
        for (Object x509IssuerSerialOrX509SKIOrX509SubjectNameObj : x509IssuerSerialOrX509SKIOrX509SubjectNameList) {
            JAXBElement x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB = (JAXBElement)x509IssuerSerialOrX509SKIOrX509SubjectNameObj;
            String tagName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getName().getLocalPart();
            Object x509IssuerSerialOrX509SKIOrX509SubjectName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getValue();
           
View Full Code Here

                ref.setDigestValue(digestValueBytes);
                return ref;
        }

        private static KeyDataValue mapX509DataType(JAXBElement apiKeyInfoContentJAXB, KeyInfo modelKeyInfo) throws RuntimeException {
                X509DataType apiKeyInfoContent = (X509DataType) apiKeyInfoContentJAXB.getValue();
                KeyDataValue modelX509KeyData = new KeyDataValue();
                modelX509KeyData.setKeyDataType(X509DataType.class.getSimpleName());
                modelX509KeyData.setKeyDataName(apiKeyInfoContentJAXB.getName().getLocalPart());
                modelX509KeyData.setKeyInfo(modelKeyInfo);
                List<Object> x509IssuerSerialOrX509SKIOrX509SubjectNameList = apiKeyInfoContent.getX509IssuerSerialOrX509SKIOrX509SubjectName();
                for (Object x509IssuerSerialOrX509SKIOrX509SubjectNameObj : x509IssuerSerialOrX509SKIOrX509SubjectNameList) {
                        JAXBElement x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB = (JAXBElement) x509IssuerSerialOrX509SKIOrX509SubjectNameObj;
                        String tagName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getName().getLocalPart();
                        Object x509IssuerSerialOrX509SKIOrX509SubjectName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getValue();
View Full Code Here

                for (int i = 0; i < sig.getKeyInfo().getContent().size(); i++) {
                        //sb.append("Signature #").append((i + 1)).append(": ");
                        JAXBElement get = (JAXBElement) sig.getKeyInfo().getContent().get(i);

                        if (get.getValue() instanceof org.w3._2000._09.xmldsig_.X509DataType) {
                                X509DataType xd = (X509DataType) get.getValue();
                                for (int k = 0; k < xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().size(); k++) {
                                        if (xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k) instanceof JAXBElement) {
                                                JAXBElement element = (JAXBElement) xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k);
                                                if (element.getValue() instanceof byte[]) {
                                                        try {
                                                                CertificateFactory cf = CertificateFactory.getInstance("X.509");
                                                                InputStream is = new ByteArrayInputStream((byte[]) element.getValue());
                                                                X509Certificate cert = (X509Certificate) cf.generateCertificate(is);
View Full Code Here

                }
                for (int i = 0; i < sig.getKeyInfo().getContent().size(); i++) {
                        JAXBElement get = (JAXBElement) sig.getKeyInfo().getContent().get(i);

                        if (get.getValue() instanceof org.w3._2000._09.xmldsig_.X509DataType) {
                                X509DataType xd = (X509DataType) get.getValue();
                                for (int k = 0; k < xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().size(); k++) {
                                        if (xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k) instanceof JAXBElement) {
                                                JAXBElement element = (JAXBElement) xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k);
                                                if (element.getValue() instanceof byte[]) {
                                                        try {
                                                                CertificateFactory cf = CertificateFactory.getInstance("X.509");
                                                                InputStream is = new ByteArrayInputStream((byte[]) element.getValue());
                                                                X509Certificate cert = (X509Certificate) cf.generateCertificate(is);
View Full Code Here

            ref.setDigestValue(digestValueBytes);
            return ref;
        }

    private static KeyDataValue mapX509DataType(JAXBElement apiKeyInfoContentJAXB, KeyInfo modelKeyInfo) throws RuntimeException {
        X509DataType apiKeyInfoContent = (X509DataType)apiKeyInfoContentJAXB.getValue();
        KeyDataValue modelX509KeyData = new KeyDataValue();
        modelX509KeyData.setKeyDataType(X509DataType.class.getSimpleName());
        modelX509KeyData.setKeyDataName(apiKeyInfoContentJAXB.getName().getLocalPart());
        modelX509KeyData.setKeyInfo(modelKeyInfo);
        List<Object> x509IssuerSerialOrX509SKIOrX509SubjectNameList = apiKeyInfoContent.getX509IssuerSerialOrX509SKIOrX509SubjectName();
        for (Object x509IssuerSerialOrX509SKIOrX509SubjectNameObj : x509IssuerSerialOrX509SKIOrX509SubjectNameList) {
            JAXBElement x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB = (JAXBElement)x509IssuerSerialOrX509SKIOrX509SubjectNameObj;
            String tagName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getName().getLocalPart();
            Object x509IssuerSerialOrX509SKIOrX509SubjectName = x509IssuerSerialOrX509SKIOrX509SubjectNameJAXB.getValue();
           
View Full Code Here

                Object contents = contentBytes != null ? contentBytes : contentStr;
               
                if (contents == null) {
                    List<Object> childKeyDataList = new ArrayList<Object>();
                    if (dataType.equals(X509DataType.class.getSimpleName())) {
                        X509DataType x509DataType = new X509DataType();
                        mapModelKeyDataValue(modelKeyDataValue.getKeyDataValueList(), childKeyDataList);
                        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().addAll(childKeyDataList);
                        JAXBElement dataJAXB = new JAXBElement(new QName("http://www.w3.org/2000/09/xmldsig#", tagName), X509DataType.class, x509DataType);
                        parentKeyDataList.add(dataJAXB);  
                    } else if (dataType.equals(RetrievalMethodType.class.getSimpleName())) {
                        RetrievalMethodType retrievalMethodType = new RetrievalMethodType();
                        TransformsType transformsType = new TransformsType();
View Full Code Here

                Object contents = contentBytes != null ? contentBytes : contentStr;
               
                if (contents == null) {
                    List<Object> childKeyDataList = new ArrayList<Object>();
                    if (dataType.equals(X509DataType.class.getSimpleName())) {
                        X509DataType x509DataType = new X509DataType();
                        mapModelKeyDataValue(modelKeyDataValue.getKeyDataValueList(), childKeyDataList);
                        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().addAll(childKeyDataList);
                        JAXBElement dataJAXB = new JAXBElement(new QName("http://www.w3.org/2000/09/xmldsig#", tagName), X509DataType.class, x509DataType);
                        parentKeyDataList.add(dataJAXB);
                    } else if (dataType.equals(RetrievalMethodType.class.getSimpleName())) {
                        RetrievalMethodType retrievalMethodType = new RetrievalMethodType();
                        TransformsType transformsType = new TransformsType();
View Full Code Here

TOP

Related Classes of org.w3._2000._09.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.