Package java.security

Examples of java.security.ProviderException


        Long id = nextSubjectId++;
        SubjectId subjectId;
        try {
            subjectId = new SubjectId(id, hash(id));
        } catch (NoSuchAlgorithmException e) {
            throw new ProviderException("No such algorithm: " + algorithm + ".  This can be caused by a misconfigured java.ext.dirs, JAVA_HOME or JRE_HOME environment variable");
        } catch (InvalidKeyException e) {
            throw new ProviderException("Invalid key: " + key.toString());
        }
        IdentificationPrincipal principal = new IdentificationPrincipal(subjectId);
        subject.getPrincipals().add(principal);
        Context context = new Context(subjectId, acc, subject, callerPrincipal, groups);
        subjectIds.put(context.getId(), subject);
View Full Code Here


        try {
            Mac mac = Mac.getInstance(algorithm);
            mac.init(key);
        } catch (NoSuchAlgorithmException e) {
            assert false : "Should never have reached here";
            throw new ProviderException("No such algorithm: " + algorithm + ".  This can be caused by a misconfigured java.ext.dirs, JAVA_HOME or JRE_HOME environment variable.");
        } catch (InvalidKeyException e) {
            assert false : "Should never have reached here";
            throw new ProviderException("Invalid key: " + key.toString());
        }
    }
View Full Code Here

            case Synchronous:
              response = conn.serviceRequest(Command.PING);
              break;
            case Monitor:
            case PubSub:
              throw new ProviderException(String.format("%s connector not supported", modality.name()));
            }
            if(!response.isError()){
//              if(conn.getSpec().getLogLevel().equals(LogLevel.DEBUG))
              Log.debug (String.format("<%s> is alive", conn));
            }
View Full Code Here

            throws ClientRuntimeException, NotSupportedException
    {
      Connection conn = null;
      switch (spec.getModality()){
      case Monitor:
        throw new ProviderException("NOT IMPLEMENTED!");
      case PubSub:
        throw new ProviderException("NOT IMPLEMENTED!");
      case Asynchronous:
        conn = newAsyncConnection(spec);
        break;
      case Synchronous:
        conn = new SyncConnection(spec);
View Full Code Here

      if(spec.getConnectionFlag(Flag.PIPELINE)){
      conn = new AsyncPipelineConnection(spec); // why not for all asyncs?
      }
      else {
        if(spec.getConnectionFlag(Flag.SHARED)){
            throw new ProviderException("NOT IMPLEMENTED! [Asynch|SHARED|not_PIPELINE]");
        }
        else {
          conn = new AsyncConnection(spec);
//          conn = new AsyncPipelineConnection(spec); // why not for all asyncs?
        }
View Full Code Here

/*     */     {
/*  54 */       this.sha = MessageDigest.getInstance("SHA");
/*     */     }
/*     */     catch (NoSuchAlgorithmException e)
/*     */     {
/*  58 */       throw new ProviderException("Failed to obtain SHA MessageDigest");
/*     */     }
/*  60 */     this.evenBytes = new ByteArrayOutputStream();
/*  61 */     this.oddBytes = new ByteArrayOutputStream();
/*  62 */     engineReset();
/*     */   }
View Full Code Here

/*     */     {
/*  58 */       this.sha = MessageDigest.getInstance("SHA");
/*     */     }
/*     */     catch (NoSuchAlgorithmException e)
/*     */     {
/*  62 */       throw new ProviderException("Failed to obtain SHA MessageDigest");
/*     */     }
/*  64 */     this.evenBytes = new ByteArrayOutputStream();
/*  65 */     this.oddBytes = new ByteArrayOutputStream();
/*  66 */     engineReset();
/*     */   }
View Full Code Here

      {
         sha = MessageDigest.getInstance("SHA");
      }
      catch(NoSuchAlgorithmException e)
      {
         throw new ProviderException("Failed to obtain SHA MessageDigest");
      }
      evenBytes = new ByteArrayOutputStream();
      oddBytes = new ByteArrayOutputStream();
      engineReset();
   }
View Full Code Here

      {
         sha = MessageDigest.getInstance("SHA");
      }
      catch(NoSuchAlgorithmException e)
      {
         throw new ProviderException("Failed to obtain SHA MessageDigest");
      }
      evenBytes = new ByteArrayOutputStream();
      oddBytes = new ByteArrayOutputStream();
      engineReset();
   }
View Full Code Here

        }
        Long id = nextSubjectId++;
        try {
            context.id = new SubjectId(id, hash(id));
        } catch (NoSuchAlgorithmException e) {
            throw new ProviderException("No such algorithm: " + algorithm + ".  This can be caused by a misconfigured java.ext.dirs, JAVA_HOME or JRE_HOME environment variable");
        } catch (InvalidKeyException e) {
            throw new ProviderException("Invalid key: " + key.toString());
        }
        subjectIds.put(context.id, subject);
        subjectContexts.put(subject, context);

        return context.id;
View Full Code Here

TOP

Related Classes of java.security.ProviderException

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.