Package jp.go.aist.sot.core

Examples of jp.go.aist.sot.core.SOTProxyKeeper


      if(!request.getRemoteAddr().equals("127.0.0.1")) {
          log.error("Access denied from " + request.getRemoteAddr());
          out.println("false");
          return;
      }
      SOTProxyKeeper pk = new SOTProxyKeeper();
      String dn = "";
      String proxy_str = "";

      Enumeration e = request.getParameterNames();
      while (e.hasMoreElements()) {
        String name = (String)e.nextElement();
        String value = request.getParameter(name);
        if(name.equals("dn")) {
          dn = value;
        }
        if(name.equals("sot_method")) {
          sot_method = value;
        }
        if(name.equals("proxy_str")) {
            proxy_str = value;
        }
        // out.println(name + " = " + value);
      }
        try {
          if(sot_method.equals("get")) {
            log.debug("Call SOTProxyKeeper.get for " + dn);
            proxy_str = pk.get(dn);
            /* do not replay when proxy_str is empty */
            if(proxy_str.length() != 0) {
              out.println(proxy_str);
            }
          } else if(sot_method.equals("put")){
            log.debug("Call SOTProxyKeeper.put");
            out.println(pk.put(proxy_str));
          } else if(sot_method.equals("destroy")) {
            log.debug("Call SOTProxyKeeper.destroy for " + dn);
            out.println(pk.destroy(dn));
          } else if(sot_method.equals("check")) {
            log.debug("Call SOTProxyKeeper.check for " + dn);
            out.println(pk.check(dn));
          } else {
            log.error("Method not found");
            out.println("<pre>Unknown Method " + sot_method +"</pre>");
          }
        } catch (SOTNoDNFoundException nod) {
View Full Code Here


            }
        }

        String dn = cert.getSubjectDN().toString();
        try {
          SOTProxyKeeper spk = new SOTProxyKeeper();
          if (!spk.existDN(dn)) {
            log.error("Subject DN not found!");
            response.setStatus(SOTSignOnToolConstants.DN_NOT_FOUND);
            return;
          }
        } catch (SOTNoDNFoundException e) {
View Full Code Here

      }
    }

    String dn = cert.getSubjectDN().toString();
    log.debug("result of cert.getSubjectDN: " + dn);
    SOTProxyKeeper spk = new SOTProxyKeeper();
    try {
      if (!spk.existDN(dn)) {
        log.debug("SOTProxyKeeper.check return false: " + dn);
        response.setStatus(SOTSignOnToolConstants.UNKNOWN);
        return;
      }
    } catch (SOTNoDNFoundException e) {
      log.error("Subject DN not found: " + dn);
      response.setStatus(SOTSignOnToolConstants.DN_NOT_FOUND);
      return;
    } catch (Exception e) {
      log.error("Exception in SOTProxyKeeper.check: " + e.toString());
      response.setStatus(SOTSignOnToolConstants.UNKNOWN);
      return;
    }

    try {
      if(!spk.put(str)){
        log.debug("SOTProxyKeeper.put return false: " + dn);
        response.setStatus(SOTSignOnToolConstants.UNKNOWN);
        return;
      }
    } catch (SOTNoDNFoundException e) {
View Full Code Here

TOP

Related Classes of jp.go.aist.sot.core.SOTProxyKeeper

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.