Package com.sun.jini.discovery

Examples of com.sun.jini.discovery.DiscoveryProtocolException


        throw new UnsupportedConstraintException(
      "principal not allowed: " + p);
    }
    Certificate cert = getCertificate(p);
    if (cert == null) {
        throw new DiscoveryProtocolException(
      "unknown principal: " + p);
    }
    if (logger.isLoggable(Level.FINEST)) {
        logger.log(Level.FINEST, "mapped principal {0} to {1}",
             new Object[]{ p, cert });
    }
    if (checker != null) {
        checker.checkClientSubject(new Subject(
      true,
      Collections.singleton(p),
      Collections.singleton(cert),
      Collections.EMPTY_SET));
    }
    if (!verify(signed.duplicate(), signature.duplicate(),
          cert.getPublicKey())) {
        throw new DiscoveryProtocolException(
      "signature verification failed: " + p);
    }
      } catch (IOException e) {
    throw e;
      } catch (SecurityException e) {
    throw e;
      } catch (Exception e) {
    throw new DiscoveryProtocolException(null, e);
      }
  }
View Full Code Here


      case Discovery.PROTOCOL_VERSION_1:
    return Discovery.getProtocol1();
      case Discovery.PROTOCOL_VERSION_2:
    return protocol2;
      default:
    throw new DiscoveryProtocolException(
        "unsupported protocol version: " + version);
  }
    }
View Full Code Here

TOP

Related Classes of com.sun.jini.discovery.DiscoveryProtocolException

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.