Examples of IllegalExtendedCAServiceRequestException


Examples of org.ejbca.core.model.ca.caadmin.extendedcaservices.IllegalExtendedCAServiceRequestException

     * @see java.lang.Runnable#run()
     */
    public void run() {
        OCSPCAServiceResponse _result = null;
        ExtendedCAServiceRequestException _extendedCAServiceRequestException = null;
        IllegalExtendedCAServiceRequestException _illegalExtendedCAServiceRequestException = null;
        try {
            _result = this.se.sign(this.request);
        } catch (ExtendedCAServiceRequestException e) {
            _extendedCAServiceRequestException = e;
        } catch (IllegalExtendedCAServiceRequestException e) {
View Full Code Here

Examples of org.ejbca.core.model.ca.caadmin.extendedcaservices.IllegalExtendedCAServiceRequestException

        throw new ExtendedCAServiceRequestException(ocspe);
      } catch (NoSuchProviderException nspe) {
        throw new ExtendedCAServiceRequestException(nspe);           
      } catch (NotSupportedException e) {
        m_log.info("OCSP Request type not supported: ", e);
        throw new IllegalExtendedCAServiceRequestException(e);
      } catch (IllegalArgumentException e) {
        m_log.error("IllegalArgumentException: ", e);
        throw new IllegalExtendedCAServiceRequestException(e);
      }
    } // createOCSPCAServiceResponse
View Full Code Here

Examples of org.ejbca.core.model.ca.caadmin.extendedcaservices.IllegalExtendedCAServiceRequestException

                throw new ExtendedCAServiceRequestException(ike);
              } catch (CATokenOfflineException ctoe) {
                throw new ExtendedCAServiceRequestException(ctoe);
              } catch (IllegalArgumentException e) {
                log.error("IllegalArgumentException: ", e);
                throw new IllegalExtendedCAServiceRequestException(e);
              }
              returnval = getExtendedCAService(ExtendedCAServiceInfo.TYPE_OCSPEXTENDEDSERVICE).extendedService(ocspServiceReq);           
          }
          if(request instanceof XKMSCAServiceRequest) {
              returnval = getExtendedCAService(ExtendedCAServiceInfo.TYPE_XKMSEXTENDEDSERVICE).extendedService(request);           
          }
          if(request instanceof CmsCAServiceRequest) {
              returnval = getExtendedCAService(ExtendedCAServiceInfo.TYPE_CMSEXTENDEDSERVICE).extendedService(request);           
          }
         
          if(request instanceof KeyRecoveryCAServiceRequest){
            KeyRecoveryCAServiceRequest keyrecoveryrequest =  (KeyRecoveryCAServiceRequest) request;
            if(keyrecoveryrequest.getCommand() == KeyRecoveryCAServiceRequest.COMMAND_ENCRYPTKEYS){
              try
                returnval = new KeyRecoveryCAServiceResponse(KeyRecoveryCAServiceResponse.TYPE_ENCRYPTKEYSRESPONSE,
                    encryptKeys(keyrecoveryrequest.getKeyPair()))
              }catch(CMSException e){
                log.error("encrypt:", e.getUnderlyingException());
                throw new IllegalExtendedCAServiceRequestException(e);
              }catch(Exception e){
                throw new IllegalExtendedCAServiceRequestException(e);
              }
            }else{
              if(keyrecoveryrequest.getCommand() == KeyRecoveryCAServiceRequest.COMMAND_DECRYPTKEYS){
                  try{
                    returnval = new KeyRecoveryCAServiceResponse(KeyRecoveryCAServiceResponse.TYPE_DECRYPTKEYSRESPONSE,
                    this.decryptKeys(keyrecoveryrequest.getKeyData()));
                }catch(CMSException e){
                 log.error("decrypt:", e.getUnderlyingException());
                 throw new IllegalExtendedCAServiceRequestException(e);
               }catch(Exception e){
                   throw new IllegalExtendedCAServiceRequestException(e);
                }
              }else{
                throw new IllegalExtendedCAServiceRequestException("Illegal Command");
              }
            }           
          }
          if(request instanceof HardTokenEncryptCAServiceRequest){
            HardTokenEncryptCAServiceRequest hardencrequest =  (HardTokenEncryptCAServiceRequest) request;
              if(hardencrequest.getCommand() == HardTokenEncryptCAServiceRequest.COMMAND_ENCRYPTDATA){
                try
                  returnval = new HardTokenEncryptCAServiceResponse(HardTokenEncryptCAServiceResponse.TYPE_ENCRYPTRESPONSE,
                      encryptData(hardencrequest.getData(), SecConst.CAKEYPURPOSE_HARDTOKENENCRYPT))
                }catch(CMSException e){
                  log.error("encrypt:", e.getUnderlyingException());
                  throw new IllegalExtendedCAServiceRequestException(e);
                }catch(Exception e){
                  throw new IllegalExtendedCAServiceRequestException(e);
                }
              }else{
                if(hardencrequest.getCommand() == HardTokenEncryptCAServiceRequest.COMMAND_DECRYPTDATA){
                    try{
                      returnval = new HardTokenEncryptCAServiceResponse(HardTokenEncryptCAServiceResponse.TYPE_DECRYPTRESPONSE,
                      this.decryptData(hardencrequest.getData(), SecConst.CAKEYPURPOSE_HARDTOKENENCRYPT));
                  }catch(CMSException e){
                   log.error("decrypt:", e.getUnderlyingException());
                   throw new IllegalExtendedCAServiceRequestException(e);
                 }catch(Exception e){
                     throw new IllegalExtendedCAServiceRequestException(e);
                  }
                }else{
                  throw new IllegalExtendedCAServiceRequestException("Illegal Command");
                }
              }           
            }
         
          return returnval;
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.