Package com.intel.mountwilson.as.common

Examples of com.intel.mountwilson.as.common.ASException


           
            return certificate;
        }catch(ASException ase){
            throw ase;
        }catch(UnknownHostException e) {
            throw new ASException(e,ErrorCode.AS_HOST_COMMUNICATION_ERROR, this.serverHostname);
        }catch (Exception e) {
            throw new ASException(e);
        }
    }
View Full Code Here


    private void checkQuoteError(ClientRequestType response) {
        int errorCode = response.getErrorCode();
       
        log.warn(String.format("Trust Agent Error %d [%s]: %s", response.getErrorCode(), response.getClientIp(), response.getErrorMessage()));
        if (errorCode != 0) {
            throw new ASException(ErrorCode.AS_TRUST_AGENT_ERROR, response.getErrorCode(),response.getErrorMessage());
        }

    }
View Full Code Here

      MessageDigest md = MessageDigest.getInstance("SHA-1");
      md.update(input);
      byte[] digest = md.digest();
      return digest;
    } catch (NoSuchAlgorithmException e) {
      throw new ASException(e);
    }
  }
View Full Code Here


            log.trace("Return code {}", String.valueOf(returnCode));

            if (returnCode != 0) {
                throw new ASException(ErrorCode.AS_QUOTE_VERIFY_COMMAND_FAILED, returnCode);
            }

        } catch (ASException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ASException(ex);
        }
        return result;
    }
View Full Code Here

                log.error( String.format("Invalid service configuration: Cannot find %s", filename ));
                foundAllRequiredFiles = false;
            }
        }
        if( !foundAllRequiredFiles ) {
            throw new ASException(ErrorCode.AS_CONFIGURATION_ERROR, "Cannot find aikverify files");
        }
       
        // we must be able to write to the data folder in order to save certificates, nones, public keys, etc.
        File datafolder = new File(aikverifyhomeData);
        if( !datafolder.canWrite() ) {
            throw new ASException(ErrorCode.AS_CONFIGURATION_ERROR, String.format(" Cannot write to %s", aikverifyhomeData));           
        }
       
//        this.setEntityManagerFactory(entityManagerFactory);
    }
View Full Code Here

            return pcrMap;
           
        } catch (ASException e) {
            throw e;
        } catch(UnknownHostException e) {
            throw new ASException(e,ErrorCode.AS_HOST_COMMUNICATION_ERROR, "Unknown host: "+(tblHosts.getIPAddress()==null?"missing IP Address":tblHosts.getIPAddress().toString()));
        catch (Exception e) {
            throw new ASException(e);
        }
    }
View Full Code Here

            String nonce = Base64.encodeBase64String(bytes);

            log.info( "Nonce Generated {}", nonce);
            return nonce;
        } catch (NoSuchAlgorithmException e) {
            throw new ASException(e);
        }
    }
View Full Code Here

            return new HostTrustResponse(hostname, trust);
        }
        catch(ASException e) {
            throw e;
        }catch(Exception e) {
            throw new ASException(e);
        }
    }
View Full Code Here

        }
        catch(ASException e) {
            throw e;
        }
        catch(Exception e) {
            throw new ASException(e);
        }
    }
View Full Code Here

            }

        } catch (ASException ase) {
            throw ase;
        } catch (Exception e) {
            throw new ASException(e);
        }


        return allOsData;
    }
View Full Code Here

TOP

Related Classes of com.intel.mountwilson.as.common.ASException

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.