Examples of initCause()


Examples of java.security.GeneralSecurityException.initCause()

         bean3.echo("validateCallerContext");
      }
      catch(Exception e)
      {
         GeneralSecurityException ex = new GeneralSecurityException("Unexpected exception");
         ex.initCause(e);
         throw ex;
      }
      validatePolicyContextSubject("exit", callerPrincipals);
      validateSecurityAssociationSubject("exit", callerPrincipals);
   }
View Full Code Here

Examples of java.security.InvalidKeyException.initCause()

      final X509EncodedKeySpec xspec = new X509EncodedKeySpec(new DERBitString(subjectPKInfo).getBytes());
      final AlgorithmIdentifier keyAlg = subjectPKInfo.getAlgorithmId ();
      return KeyFactory.getInstance(keyAlg.getObjectId().getId (), provider).generatePublic(xspec);
    } catch (java.security.spec.InvalidKeySpecException e) {
      final InvalidKeyException newe = new InvalidKeyException("Error decoding public key.");
      newe.initCause(e);
      throw newe;
    }
  }
 
    /** force a password, i.e. ignore the password in the request
View Full Code Here

Examples of java.security.InvalidParameterException.initCause()

        result = baos.toByteArray();
      }
    catch (IOException x)
      {
        InvalidParameterException y = new InvalidParameterException();
        y.initCause(x);
        throw y;
      }
    if (Configuration.DEBUG)
      log.exiting(this.getClass().getName(), "encodePrivateKey()", result);
    return result;
View Full Code Here

Examples of java.security.KeyStoreException.initCause()

            // add the entry
            entries.put(alias.toLowerCase(), entry);
        } catch (Exception nsae) {
            KeyStoreException ke = new KeyStoreException("Key protection " +
                                        " algorithm not found: " + nsae);
            ke.initCause(nsae);
            throw ke;
        }
    }

    /**
 
View Full Code Here

Examples of java.security.NoSuchAlgorithmException.initCause()

    sb.append("Class [").append(clazz.getName()).append("] for algorithm [")
        .append(algorithm).append("] of type [").append(service)
        .append("] from provider [").append(provider).append("] ");
    sb.append(msg);
    NoSuchAlgorithmException x = new NoSuchAlgorithmException(sb.toString());
    x.initCause(cause);
    throw x;
  }

  /**
   * Return the implementation for <i>algorithm</i> for service <i>service</i>
View Full Code Here

Examples of java.security.NoSuchProviderException.initCause()

       
        try {
            InitJCE.init();
        } catch (InstantiationException e) {
            NoSuchProviderException ex = new NoSuchProviderException("Error during cryptography provider initialization. Has bcprov-jdkxx-yyy.jar been copied in the lib directory or installed in the system?");
            ex.initCause(e);
            throw ex;
        } catch (IllegalAccessException e) {
            NoSuchProviderException ex = new NoSuchProviderException("Error during cryptography provider initialization. Has bcprov-jdkxx-yyy.jar been copied in the lib directory or installed in the system?");
            ex.initCause(e);
            throw ex;
View Full Code Here

Examples of java.security.UnrecoverableKeyException.initCause()

        } catch (IOException ioe) {
            UnrecoverableKeyException uke =
                new UnrecoverableKeyException("Private key not stored as "
                                 + "PKCS#8 EncryptedPrivateKeyInfo: " + ioe);
            uke.initCause(ioe);
            throw uke;
        }

        try {
            // Use JCE
View Full Code Here

Examples of java.security.cert.CertPathValidatorException.initCause()

      }
    // The path is not valid.
    CertPathValidatorException cpve =
        new CertPathValidatorException("path validation failed");
    if (cause != null)
      cpve.initCause(cause);
    throw cpve;
  }

  /**
   * Check if a given CRL is acceptable for checking the revocation status of
View Full Code Here

Examples of java.security.cert.CertificateEncodingException.initCause()

            return derout.toByteArray();

        } catch (IOException ioe) {
           CertificateEncodingException ce = new CertificateEncodingException
                ("IOException encoding PkiPath data: " + ioe);
           ce.initCause(ioe);
           throw ce;
        }
    }

    /**
 
View Full Code Here

Examples of java.security.cert.CertificateException.initCause()

            return Collections.unmodifiableList(certList);

        } catch (IOException ioe) {
            CertificateException ce = new CertificateException("IOException" +
                " parsing PkiPath data: " + ioe);
            ce.initCause(ioe);
            throw ce;
        }
    }

    /**
 
View Full Code Here
TOP
Copyright © 2015 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.