Package org.w3._2002._03.xkms_

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


    public void test02ServerGenRegistration() throws Exception {
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("601");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier(dn2);

        registerRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_X509CERT);

        PrototypeKeyBindingType prototypeKeyBindingType = xKMSObjectFactory.createPrototypeKeyBindingType();
        prototypeKeyBindingType.getUseKeyWith().add(useKeyWithType);
View Full Code Here


    public void test03RegisterWithWrongDN() throws Exception {
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("602");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier("CN=wrong");

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

        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        RSAKeyValueType rsaKeyValueType = sigFactory.createRSAKeyValueType();
View Full Code Here

    public void test04RegisterWithWrongStatus() throws Exception {
        KeyPair keys = genKeys();
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("603");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier(dn1);

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

        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        RSAKeyValueType rsaKeyValueType = sigFactory.createRSAKeyValueType();
View Full Code Here

    public void test05RegisterWithWrongPassword() throws Exception {
        KeyPair keys = genKeys();
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("604");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier(dn3);

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

        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        RSAKeyValueType rsaKeyValueType = sigFactory.createRSAKeyValueType();
View Full Code Here

    public void test06RegisterWithNoPOP() throws Exception {
        KeyPair keys = genKeys();
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("605");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier(dn3);

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

        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        RSAKeyValueType rsaKeyValueType = sigFactory.createRSAKeyValueType();
View Full Code Here

    public void test07RegisterWithBasicAuthentication() throws Exception {
        KeyPair keys = genKeys();
        RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
        registerRequestType.setId("606");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
        useKeyWithType.setIdentifier(dn3);

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

        KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
        RSAKeyValueType rsaKeyValueType = sigFactory.createRSAKeyValueType();
View Full Code Here

                userdata.setPassword("foo123");
                userAdminSession.addUser(administrator, userdata, true);
                // Register user
                RegisterRequestType registerRequestType = xKMSObjectFactory.createRegisterRequestType();
                registerRequestType.setId("806");
                UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
                useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_PKIX);
                useKeyWithType.setIdentifier("CN=" + username);
                registerRequestType.getRespondWith().add(XKMSConstants.RESPONDWITH_X509CERT);
                PrototypeKeyBindingType prototypeKeyBindingType = xKMSObjectFactory.createPrototypeKeyBindingType();
                prototypeKeyBindingType.getUseKeyWith().add(useKeyWithType);
                prototypeKeyBindingType.setId("424242");
                registerRequestType.setPrototypeKeyBinding(prototypeKeyBindingType);
View Full Code Here

        // Test simple locate
        LocateRequestType locateRequestType = xKMSObjectFactory.createLocateRequestType();
        locateRequestType.setId("125");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        useKeyWithType.setApplication(XKMSConstants.USEKEYWITH_TLSHTTP);
        useKeyWithType.setIdentifier(username1);

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

        QueryKeyBindingType queryKeyBindingType = xKMSObjectFactory.createQueryKeyBindingType();
        queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
View Full Code Here

           
            String reqId = genId();
           
            List keyBindings = new ArrayList();
            if(validate){
              ValidateRequestType validationRequestType = xKMSObjectFactory.createValidateRequestType();
              validationRequestType.setId(reqId);
                Iterator iter = respondWith.iterator();
                while(iter.hasNext()){
                  validationRequestType.getRespondWith().add((String) iter.next());
                }
                validationRequestType.setQueryKeyBinding(queryKeyBindingType);
                getPrintStream().println("Sending validation request with id " + reqId + " to XKMS Service");
                if (clientCert == null) {
                    log.info("Client cert was not found and will not be used.");
                }
                ValidateResultType validateResult = getXKMSInvoker().validate(validationRequestType, clientCert, privateKey);               
View Full Code Here

    public void test01ClientSignature() throws Exception {
      log.trace(">test01ClientSignature");
        KeyStore clientKeyStore = Constants.getUserKeyStore();

        // Test simple validate
        ValidateRequestType validateRequestType = xKMSObjectFactory.createValidateRequestType();
        validateRequestType.setId("200");

        UseKeyWithType useKeyWithType = xKMSObjectFactory.createUseKeyWithType();
        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";
        java.security.cert.X509Certificate pkCert = (java.security.cert.X509Certificate) clientKeyStore.getCertificate(alias);
View Full Code Here

TOP

Related Classes of org.w3._2002._03.xkms_.StatusType

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.