Tabnine Logo
InvalidKeyException.initCause
Code IndexAdd Tabnine to your IDE (free)

How to use
initCause
method
in
java.security.InvalidKeyException

Best Java code snippets using java.security.InvalidKeyException.initCause (Showing top 8 results out of 315)

origin: org.eclipse/org.eclipse.osgi

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory())
    contentBundleFile = new DirBundleFile(content);
  else
    contentBundleFile = new ZipBundleFile(content, null);
  SignedBundleFile result = new SignedBundleFile(null, VERIFY_ALL);
  try {
    result.setBundleFile(contentBundleFile);
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory())
    contentBundleFile = new DirBundleFile(content);
  else
    contentBundleFile = new ZipBundleFile(content, null);
  SignedBundleFile result = new SignedBundleFile(null, VERIFY_ALL);
  try {
    result.setBundleFile(contentBundleFile);
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
origin: org.apache.geronimo.modules/geronimo-util

throw (InvalidKeyException)new InvalidKeyException("error decoding public key").initCause(e);
origin: org.apache.geronimo.framework/geronimo-crypto

throw (InvalidKeyException)new InvalidKeyException("error decoding public key").initCause(e);
origin: org.eclipse/osgi

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory()) {
    contentBundleFile = new DirBundleFile(content, false);
  } else {
    // make sure we have a ZipFile first, this will throw an IOException if not valid
    ZipFile temp = new ZipFile(content);
    temp.close();
    contentBundleFile = new ZipBundleFile(content, null, null, container.getConfiguration().getDebug());
  }
  SignedBundleFile result = new SignedBundleFile(contentBundleFile, null, VERIFY_ALL, this);
  try {
    result.initializeSignedContent();
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
origin: com.github.veithen.cosmos/cosmos-equinox

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory()) {
    contentBundleFile = new DirBundleFile(content, false);
  } else {
    // make sure we have a ZipFile first, this will throw an IOException if not valid
    ZipFile temp = new ZipFile(content);
    temp.close();
    contentBundleFile = new ZipBundleFile(content, null, null, container.getConfiguration().getDebug());
  }
  SignedBundleFile result = new SignedBundleFile(contentBundleFile, null, VERIFY_ALL, this);
  try {
    result.initializeSignedContent();
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.osgi

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory()) {
    contentBundleFile = new DirBundleFile(content, false);
  } else {
    // Make sure we have a ZipFile first, this will throw an IOException if not valid.
    // Use SecureAction because it gives better errors about the path on exceptions
    ZipFile temp = secureAction.getZipFile(content);
    temp.close();
    contentBundleFile = new ZipBundleFile(content, null, null, container.getConfiguration().getDebug());
  }
  SignedBundleFile result = new SignedBundleFile(contentBundleFile, null, VERIFY_ALL, this);
  try {
    result.initializeSignedContent();
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.osgi

public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
  if (content == null)
    throw new IllegalArgumentException("null content"); //$NON-NLS-1$
  BundleFile contentBundleFile;
  if (content.isDirectory()) {
    contentBundleFile = new DirBundleFile(content, false);
  } else {
    // Make sure we have a ZipFile first, this will throw an IOException if not valid.
    // Use SecureAction because it gives better errors about the path on exceptions
    ZipFile temp = secureAction.getZipFile(content);
    temp.close();
    contentBundleFile = new ZipBundleFile(content, null, null, container.getConfiguration().getDebug());
  }
  SignedBundleFile result = new SignedBundleFile(contentBundleFile, null, VERIFY_ALL, this);
  try {
    result.initializeSignedContent();
  } catch (InvalidKeyException e) {
    throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (SignatureException e) {
    throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (CertificateException e) {
    throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchAlgorithmException e) {
    throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  } catch (NoSuchProviderException e) {
    throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
  }
  return new SignedContentFile(result.getSignedContent());
}
java.securityInvalidKeyExceptioninitCause

Popular methods of InvalidKeyException

  • <init>
    Constructs a new instance of InvalidKeyException with the cause.
  • getMessage
  • printStackTrace
  • toString
  • getLocalizedMessage
  • getStackTrace
  • setStackTrace
  • getCause
  • addSuppressed
  • fillInStackTrace

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now