Examples of Verifier


Examples of com.sun.msv.verifier.Verifier

                    Log.error("WARNING: " + message);
                }
            }, saxFactory);
       
            ValidatorErrorHandler validatorErrorHandler = new ValidatorErrorHandler();
            Verifier verifier = new Verifier(docDeclaration, validatorErrorHandler);

            SAXWriter writer = new SAXWriter((ContentHandler) verifier);
            writer.setErrorHandler(validatorErrorHandler);

            writer.write(doc);
            if (verifier.isValid()) {
                return true;
            } else {
                Log.error(doc.getName() + " is invalid.");
                return false;
            }
View Full Code Here

Examples of com.sun.msv.verifier.Verifier

                            SAXUnmarshallerHandler _core,
                            Locator locator ) {
       
        // create a VerifierFilter and configure it
        // so that error messages will be sent to the core,
        Verifier v = new Verifier(
            new REDocumentDeclaration(grammar),
            new ErrorHandlerAdaptor(_core,locator) );
        v.setPanicMode( true );

        return new ValidatingUnmarshaller(
            new VerifierFilter( v ), _core );
    }
View Full Code Here

Examples of net.oauth.jsontoken.crypto.Verifier

   
    String request = req.getParameter("maskedWalletJWT");
   
    //Convert JWT to JavaObjects
    try {
      final Verifier hmacVerifier = new HmacSHA256Verifier(Config.MERCHANT_SECRET.getBytes());
      VerifierProvider hmacLocator = new VerifierProvider() {
       
        public List<Verifier> findVerifier(String id, String key){
          return Lists.newArrayList(hmacVerifier);
        }
View Full Code Here

Examples of org.agorava.api.oauth.Verifier

    }


    @Override
    public Token getAccessToken(Token requestToken, String verifier) {
        return getAccessToken(requestToken, new Verifier(verifier));
    }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

     */
    private boolean verifyBCEL(ClassFile file) {
        try {
           
            // construct verifier for class file
            Verifier verifier = VerifierFactory.getVerifier(file.getName());
           
            // run validation in stages with error handling for each stage
            boolean verified = false;
            VerificationResult vr = verifier.doPass1();
            if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                vr = verifier.doPass2();
                if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                    Method[] methods = file.getRawClass().getMethods();
                    for (int j = 0; j < methods.length; j++) {
                        vr = verifier.doPass3a(j);
                        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                            vr = verifier.doPass3b(j);
                        }
                        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
                            verified = true;
                        } else {
                            System.out.println
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

      throw new RuntimeException( "nothing to verify" );

    JavaClass jc = clGen.getJavaClass();
    Repository.addClass( jc );

    Verifier v = VerifierFactory.getVerifier( jc.getClassName() );
    checkVerificationResult(v.doPass1(), "1");
    checkVerificationResult(v.doPass2(), "2");
    MethodWeaver methodWeavers[] = new MethodWeaver[methods.size()];
    methods.values().toArray( methodWeavers );
    for( int i = 0; i < methods.size(); i++ ) {
      int method_index = methodWeavers[i].targetIndex;
      checkVerificationResult(v.doPass3a(method_index), "3a");
      checkVerificationResult(v.doPass3b(method_index), "3b");
    }

    try {
      String[] warnings = v.getMessages();
      if (warnings.length != 0)
        System.err.println("Messages:");
      for (int j = 0; j < warnings.length; j++)
        System.err.println(warnings[j]);
    } catch(Exception e) { System.err.println("could not verify " + targetClass); }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

      throw new RuntimeException( "nothing to verify" );

    JavaClass jc = clGen.getJavaClass();
    Repository.addClass( jc );

    Verifier v = VerifierFactory.getVerifier( jc.getClassName() );
    checkVerificationResult(v.doPass1(), "1");
    checkVerificationResult(v.doPass2(), "2");
    MethodWeaver methodWeavers[] = new MethodWeaver[methods.size()];
    methods.values().toArray( methodWeavers );
    for( int i = 0; i < methods.size(); i++ ) {
      int method_index = methodWeavers[i].getTargetIndex();
      checkVerificationResult(v.doPass3a(method_index), "3a");
      checkVerificationResult(v.doPass3b(method_index), "3b");
    }

    try {
      String[] warnings = v.getMessages();
      if (warnings.length != 0)
        System.err.println("Messages:");
      for (int j = 0; j < warnings.length; j++)
        System.err.println(warnings[j]);
    } catch(Exception e) {System.err.println("could not verify " + targetClass);}
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

   * The referenced class is loaded and pass2-verified.
   */
  public void visitLoadClass(LoadClass o){
    ObjectType t = o.getLoadClassType(cpg);
    if (t != null){// null means "no class is loaded"
      Verifier v = VerifierFactory.getVerifier(t.getClassName());
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
  }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

      }
      // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
      Type t = o.getType(cpg);
      if (t instanceof ObjectType){
        String name = ((ObjectType)t).getClassName();
        Verifier v = VerifierFactory.getVerifier( name );
        VerificationResult vr = v.doPass2();
        if (vr.getStatus() != VerificationResult.VERIFIED_OK){
          constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
        }
      }
   }
View Full Code Here

Examples of org.apache.bcel.verifier.Verifier

    // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).

    Type t = o.getType(cpg);
    if (t instanceof ObjectType){
      String name = ((ObjectType)t).getClassName();
      Verifier v = VerifierFactory.getVerifier( name );
      VerificationResult vr = v.doPass2();
      if (vr.getStatus() != VerificationResult.VERIFIED_OK){
        constraintViolated((Instruction) o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
      }
    }
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.