Examples of TrustVerifier


Examples of net.jini.security.TrustVerifier

  {
      return;
  }
  // must be called 'getProxyVerifier' method of obj
  list.add(obj);
  TrustVerifier tv = null;

  if (!(obj instanceof ProxyTrustThrowingRE1)) {
      try {
    tv = ((BaseProxyTrust) obj).getProxyVerifier();
      } catch (RemoteException re) {
View Full Code Here

Examples of net.jini.security.TrustVerifier

      Remote impl = new Impl();
      Remote proxy = exporter.export(impl);

      TrustVerifier.Context ctx = new TestContext();
     
      TrustVerifier tv = new Subclass(true, true);
      if (tv.isTrustedObject(proxy, ctx) == true) {
    System.err.println("Test 1 passed");
      } else {
    throw new RuntimeException("Test 1 FAILED");
      }

      tv = new Subclass(true, false);
      if (tv.isTrustedObject(proxy, ctx) == false) {
    System.err.println("Test 2 passed");
      } else {
    throw new RuntimeException("Test 2 FAILED");
      }

      tv = new Subclass(false, true);
      if (tv.isTrustedObject(proxy, ctx) == false) {
    System.err.println("Test 3 passed");
      } else {
    throw new RuntimeException("Test 3 FAILED");
      }

      tv = new Subclass(false, false);
      if (tv.isTrustedObject(proxy, ctx) == false) {
    System.err.println("Test 4 passed");
      } else {
    throw new RuntimeException("Test 4 FAILED");
      }
View Full Code Here

Examples of net.jini.security.TrustVerifier

  if (mc == null) {
      return false;
  } else if (uosc == null) {
      uosc = new BasicUntrustedObjectSecurityContext(null);
  }
  TrustVerifier verifier = getVerifier(obj, ctx, mc, uosc);
  return (verifier != null &&
    verifier.isTrustedObject(obj, ctx));
    }
View Full Code Here

Examples of net.jini.security.TrustVerifier

      try {
    obj = restrictedNext(iter, rsc);
    logger.log(Level.FINER, "ProxyTrustIterator produces {0}",
         obj);
    if (!(obj instanceof ProxyTrust)) {
        TrustVerifier verifier = getVerifier(obj, ctx, mc, uosc);
        if (verifier != null) {
      return verifier;
        }
    } else if (obj instanceof RemoteMethodControl) {
        if (isTrusted(obj, ctx)) {
      obj = ((RemoteMethodControl) obj).setConstraints(mc);
      TrustVerifier verifier =
          ((ProxyTrust) obj).getProxyVerifier();
      logger.log(Level.FINE, "verifier is {0}", verifier);
      return verifier;
        } else if (Proxy.isProxyClass(obj.getClass()) &&
             getMethod(obj) == null &&
             getMethod(Proxy.getInvocationHandler(obj)) ==
             null)
        {
      TrustVerifier verifier = getAltVerifier(obj, ctx, mc);
      if (verifier != null) {
          return verifier;
      }
        }
    }
View Full Code Here

Examples of net.jini.security.TrustVerifier

  logger.log(Level.FINER, "trying derivative bootstrap proxy {0}", obj);
  if (!isTrusted(obj, ctx)) {
      return null;
  }
  obj = ((RemoteMethodControl) obj).setConstraints(mc);
  TrustVerifier verifier = ((ProxyTrust) obj).getProxyVerifier();
  final Class vc = verifier.getClass();
  ClassLoader bcl = (ClassLoader)
      AccessController.doPrivileged(new PrivilegedAction() {
        public Object run() {
      ClassLoader bcl = base.getClassLoader();
      if (bcl == vc.getClassLoader()) {
View Full Code Here

Examples of net.jini.security.TrustVerifier

  {
      return;
  }
  // must be called 'getProxyVerifier' method of obj
  list.add(obj);
  TrustVerifier tv = null;

  if (!(obj instanceof ProxyTrustThrowingRE1)) {
      try {
    tv = ((BaseProxyTrust) obj).getProxyVerifier();
      } catch (RemoteException re) {
View Full Code Here

Examples of net.jini.security.TrustVerifier

        check(request,m,rFloat);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 18: getProxyVerifier()");
        logger.log(Level.FINE,"");
        TrustVerifier rVerifier = new FakeTrustVerifier();
        Method mSend = ProxyTrust.class.getMethod("getProxyVerifier",null);
        Method mReceive = fic.getMethod("getProxyVerifier",null);
        handler.init(null,mReceive,null,rVerifier);
        long methodHash = Util.computeMethodHash(mSend);
        request = new FakeInboundRequest(methodHash,null,0x00,0x00);
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.