Examples of QueryKeyBindingType


Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

            .createX509Data(x509DataType);

        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
        keyInfoType.getContent().add(x509Data);

        QueryKeyBindingType queryKeyBindingType = XKMS_OF
            .createQueryKeyBindingType();
        queryKeyBindingType.setKeyInfo(keyInfoType);

        ValidateRequestType validateRequestType = XKMS_OF
            .createValidateRequestType();
        setGenericRequestParams(validateRequestType);
        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

            throw new RuntimeException(e.getMessage(), e);
        }
    }

    private LocateRequestType prepareLocateXKMSRequest() {
        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();

        UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
        useKeyWithType.setIdentifier("alice");
        useKeyWithType.setApplication(Applications.PKIX.getUri());

        queryKeyBindingType.getUseKeyWith().add(useKeyWithType);

        LocateRequestType locateRequestType = XKMS_OF.createLocateRequestType();
        locateRequestType.setQueryKeyBinding(queryKeyBindingType);
        setGenericRequestParams(locateRequestType);
        return locateRequestType;
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

   
    @Test
    public void testLocate() throws URISyntaxException, Exception {
        LocateRequestType request = XKMS_OF.createLocateRequestType();
        setGenericRequestParams(request);
        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();

        UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
        useKeyWithType.setIdentifier("CN=Dave, OU=Apache, O=CXF, L=CGN, ST=NRW, C=DE");
        useKeyWithType.setApplication(Applications.PKIX.getUri());

        queryKeyBindingType.getUseKeyWith().add(useKeyWithType);

        request.setQueryKeyBinding(queryKeyBindingType);
        LocateResultType result = xkmsService.locate(request);
        Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SUCCESS.value(),
                            result.getResultMajor());
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

        JAXBElement<X509DataType> x509Data = DSIG_OF.createX509Data(x509DataType);

        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
        keyInfoType.getContent().add(x509Data);

        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();
        queryKeyBindingType.setKeyInfo(keyInfoType);

        ValidateRequestType validateRequestType = XKMS_OF.createValidateRequestType();
        setGenericRequestParams(validateRequestType);
        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
        // temporary
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

        JAXBElement<X509DataType> x509Data = DSIG_OF.createX509Data(x509DataType);

        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
        keyInfoType.getContent().add(x509Data);

        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();
        queryKeyBindingType.setKeyInfo(keyInfoType);

        ValidateRequestType validateRequestType = XKMS_OF.createValidateRequestType();
        setGenericRequestParams(validateRequestType);
        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
        // temporary
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

        List<UseKeyWithType> keyIDs = new ArrayList<UseKeyWithType>();
        if (request == null) {
            return keyIDs;
        }

        QueryKeyBindingType query = request.getQueryKeyBinding();
        if (query == null) {
            return keyIDs;
        }

        // http://www.w3.org/TR/xkms2/ [213]
        if (query.getTimeInstant() != null) {
            throw new XKMSException(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TIME_INSTANT_NOT_SUPPORTED);
        }

        keyIDs.addAll(parse(query.getKeyInfo()));

        List<UseKeyWithType> useKeyList = query.getUseKeyWith();
        keyIDs.addAll(useKeyList);

        return keyIDs;
    }
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

    @Test
    @Ignore
    public void testLocateByEndpoint() throws URISyntaxException, Exception {
        LocateRequestType request = XKMS_OF.createLocateRequestType();
        setGenericRequestParams(request);
        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();

        UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
        useKeyWithType.setIdentifier("http://localhost:8080/services/TestService");
        useKeyWithType.setApplication(Applications.SERVICE_ENDPOINT.getUri());
View Full Code Here

Examples of org.apache.cxf.xkms.model.xkms.QueryKeyBindingType

   
    @Test
    public void testLocatePKIX() throws URISyntaxException, Exception {
        LocateRequestType request = XKMS_OF.createLocateRequestType();
        setGenericRequestParams(request);
        QueryKeyBindingType queryKeyBindingType = XKMS_OF.createQueryKeyBindingType();

        UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
        useKeyWithType.setIdentifier("CN=Dave, OU=Apache, O=CXF, L=CGN, ST=NRW, C=DE");
        useKeyWithType.setApplication(Applications.PKIX.getUri());
View Full Code Here

Examples of org.w3._2002._03.xkms_.QueryKeyBindingType

                outputPath = args[ARG_OUTPUTPATH] + "/";                           
              }
            }

           
            QueryKeyBindingType queryKeyBindingType = xKMSObjectFactory.createQueryKeyBindingType();
            if(isCertQuery){
              X509DataType x509DataType = sigFactory.createX509DataType();
                x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(queryCert));
                KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
                keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));
                queryKeyBindingType.setKeyInfo(keyInfoType);
            }else{
              UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
              useKeyWithType.setApplication(queryType);
              useKeyWithType.setIdentifier(queryVal);
              queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
            }
            if(keyUsage != null){
              queryKeyBindingType.getKeyUsage().add(keyUsage);
            }
           
            String reqId = genId();
           
            List keyBindings = new ArrayList();
View Full Code Here

Examples of org.w3._2002._03.xkms_.QueryKeyBindingType

        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_TLSHTTP);
        useKeyWithType.setIdentifier("Test");

        validateRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_X509CHAIN);

        QueryKeyBindingType queryKeyBindingType = xKMSObjectFactory.createQueryKeyBindingType();
        queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
        validateRequestType.setQueryKeyBinding(queryKeyBindingType);

        JAXBElement<ValidateRequestType> validateRequest = xKMSObjectFactory.createValidateRequest(validateRequestType);

        String alias = "TEST";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.