Examples of KeyBindingType


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

                throw new IllegalArgumentException("Must provide one X509Certificate");
            }
            X509Certificate cert = certList.get(0);
            certRepo.saveCertificate(cert, useKeyWith);

            KeyBindingType responseBinding = prepareResponseBinding(binding);
            response.getKeyBinding().add(responseBinding);
            return response;
        } catch (CertificateException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
View Full Code Here

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

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

    private KeyBindingType prepareResponseBinding(PrototypeKeyBindingType binding) {
        KeyBindingType responseBinding = new KeyBindingType();
        responseBinding.setKeyInfo(binding.getKeyInfo());
        StatusType status = new StatusType();
        status.setStatusValue(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID);
        responseBinding.setStatus(status);
        return responseBinding;
    }
View Full Code Here

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

        ValidateResultType response = XKMSResponseFactory.createResponse(request, new ValidateResultType());
        try {
            validateRequest(request);

            // Create basic response
            KeyBindingType binding = createKeyBinding(response);

            // Validate request
            for (Validator validator : validators) {
                StatusType status = validator.validate(request);
                addValidationReasons(binding, status);
View Full Code Here

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

        }
    }

    // TODO refactoring into factory class?
    public static KeyBindingType createKeyBinding(ValidateResultType result) {
        KeyBindingType binding = new KeyBindingType();
        binding.setId(XKMSResponseFactory.generateUniqueID());
        result.getKeyBinding().add(binding);

        StatusType status = new StatusType();
        binding.setStatus(status);

        return binding;
    }
View Full Code Here

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

                throw new IllegalArgumentException("Must provide one X509Certificate");
            }
            X509Certificate cert = certList.get(0);
            certRepo.saveCertificate(cert, useKeyWith);

            KeyBindingType responseBinding = prepareResponseBinding(binding);
            response.getKeyBinding().add(responseBinding);
            return response;
        } catch (CertificateException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
View Full Code Here

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

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

    private KeyBindingType prepareResponseBinding(PrototypeKeyBindingType binding) {
        KeyBindingType responseBinding = new KeyBindingType();
        responseBinding.setKeyInfo(binding.getKeyInfo());
        StatusType status = new StatusType();
        status.setStatusValue(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID);
        responseBinding.setStatus(status);
        return responseBinding;
    }
View Full Code Here

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

        try {
            validateRequest(request);

            // Create basic response
            ValidateResultType result = XKMSResponseFactory.createResponse(request, new ValidateResultType());
            KeyBindingType binding = createKeyBinding(result);

            // Validate request
            for (Validator validator : validators) {
                StatusType status = validator.validate(request);
                addValidationReasons(binding, status);
View Full Code Here

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

        }
    }

    // TODO refactoring into factory class?
    public static KeyBindingType createKeyBinding(ValidateResultType result) {
        KeyBindingType binding = new KeyBindingType();
        binding.setId(XKMSResponseFactory.generateUniqueID());
        result.getKeyBinding().add(binding);

        StatusType status = new StatusType();
        binding.setStatus(status);

        return binding;
    }
View Full Code Here

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

            X509DataType x509DataType = sigFactory.createX509DataType();
            x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(orgCert.getEncoded()));
            KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
            keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));
           
            KeyBindingType keyBindingType = xKMSObjectFactory.createKeyBindingType();               
            keyBindingType.setKeyInfo(keyInfoType);
            keyBindingType.setId(keyBindingId);
            reissueRequestType.setReissueKeyBinding(keyBindingType);   
                              
            PrivateKey privateKey = (PrivateKey) ks.getKey(alias, keyPass.toCharArray());
            ReissueResultType reissueResultType = getXKMSInvoker().reissue(reissueRequestType, clientCert, privateKey, authPass, privateKey, keyBindingId);           
            
            if(reissueResultType.getResultMajor().equals(XKMSConstants.RESULTMAJOR_SUCCESS) &&
               reissueResultType.getResultMinor() == null){
           
                if(reissueResultType.getKeyBinding().size() >0){
                  KeyBindingType keyBinding = reissueResultType.getKeyBinding().get(0);                 
                  List certs = getCertsFromKeyBinding(keyBinding);
                   
                  X509Certificate userCert = getUserCert(certs);                 
                  certs.remove(userCert);
                     
View Full Code Here

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

            x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(sigFactory.createX509DataTypeX509Certificate(orgCert.getEncoded()));
            KeyInfoType keyInfoType = sigFactory.createKeyInfoType();
            keyInfoType.getContent().add(sigFactory.createX509Data(x509DataType));
           
            String keyBindingId = "_" + CertTools.getSerialNumber(orgCert).toString();
            KeyBindingType keyBindingType = xKMSObjectFactory.createKeyBindingType();               
            keyBindingType.setKeyInfo(keyInfoType);
            keyBindingType.setId(keyBindingId);
            recoverRequestType.setRecoverKeyBinding(keyBindingType)
           
          
           
            RecoverResultType recoverResultType = getXKMSInvoker().recover(recoverRequestType, clientCert, privateKey, password,  keyBindingId);

           
            if(recoverResultType.getResultMajor().equals(XKMSConstants.RESULTMAJOR_SUCCESS) &&
               recoverResultType.getResultMinor() == null){
           
                if(recoverResultType.getKeyBinding().size() >0){
                  KeyBindingType keyBinding = recoverResultType.getKeyBinding().get(0);                 
                  List certs = getCertsFromKeyBinding(keyBinding);
                   
                  X509Certificate userCert = getUserCert(certs);                 
                  certs.remove(userCert);
                 
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.