Package org.apache.wookie.w3c.exceptions

Examples of org.apache.wookie.w3c.exceptions.InsecuredWidgetContentException


    File widget = new File(packagePath);
    File[] authorSignaturesList = locateAuthorSignatureFiles(widget);
    File[] distributorSignaturesList = locateDistributorSignatureFiles(widget);
    if ((authorSignaturesList.length == 0 && distributorSignaturesList.length == 0)
        && rejectInvalid) {
      throw new InsecuredWidgetContentException(
          "Couldn't locate any signature file inside the widget "
              + widget.getName());
    } else if (authorSignaturesList.length == 0
        && distributorSignaturesList.length == 0) {
      _logger.warn("Couldn't locate any signature file inside the widget "
View Full Code Here


    for (File file : authorSignaturesList) {
      try {
        isWidgetValid = isSignatureValid(file, "author", widget);
        if ((!isWidgetValid) && rejectInvalid) {
          throw new InsecuredWidgetContentException(
              "Rejecting invalid author signature " + file.getName());
        }
        if (!isWidgetValid && !rejectInvalid) {
          _logger.warn("The author signature \'" + file.getName()
              + "\' is not valid, but widget will be imported");
        }
      } catch (Exception e) {
        throw new BadAuthorSignatureException("Invalid Author Signature.");
      }
    }

    for (File file : distributorSignaturesList) {
      try {
        isWidgetValid = isSignatureValid(file, "", widget);
        if ((!isWidgetValid) && rejectInvalid) {
          throw new InsecuredWidgetContentException(
              "Rejecting invalid distributor signature " + file.getName());
        }
        if (!isWidgetValid && !rejectInvalid) {
          _logger.warn("The distributor signature \'" + file.getName()
              + "\' is not valid, but widget will be imported");
View Full Code Here

        }

        X509Certificate cert = signature.getKeyInfo().getX509Certificate();
        if (!isTrusted(cert) && (rejectUntrusted)) {
          _logger.error("Untrusted certificate submitted with the signature.");
          throw new InsecuredWidgetContentException(
              "Untrusted certificate submitted with the signature.");
        }

        if (cert != null) {
          isValid = signature.checkSignatureValue(cert);
View Full Code Here

    File widget = new File(packagePath);
    File[] authorSignaturesList = locateAuthorSignatureFiles(widget);
    File[] distributorSignaturesList = locateDistributorSignatureFiles(widget);
    if ((authorSignaturesList.length == 0 && distributorSignaturesList.length == 0)
        && rejectInvalid) {
      throw new InsecuredWidgetContentException(
          "Couldn't locate any signature file inside the widget "
              + widget.getName());
    } else if (authorSignaturesList.length == 0
        && distributorSignaturesList.length == 0) {
      _logger.warn("Couldn't locate any signature file inside the widget "
View Full Code Here

    for (File file : authorSignaturesList) {
      try {
        isWidgetValid = isSignatureValid(file, "author", widget);
        if ((!isWidgetValid) && rejectInvalid) {
          throw new InsecuredWidgetContentException(
              "Rejecting invalid author signature " + file.getName());
        }
        if (!isWidgetValid && !rejectInvalid) {
          _logger.warn("The author signature \'" + file.getName()
              + "\' is not valid, but widget will be imported");
        }
      } catch (Exception e) {
        throw new BadAuthorSignatureException("Invalid Author Signature.");
      }
    }

    for (File file : distributorSignaturesList) {
      try {
        isWidgetValid = isSignatureValid(file, "", widget);
        if ((!isWidgetValid) && rejectInvalid) {
          throw new InsecuredWidgetContentException(
              "Rejecting invalid distributor signature " + file.getName());
        }
        if (!isWidgetValid && !rejectInvalid) {
          _logger.warn("The distributor signature \'" + file.getName()
              + "\' is not valid, but widget will be imported");
View Full Code Here

        }

        X509Certificate cert = signature.getKeyInfo().getX509Certificate();
        if (!isTrusted(cert) && (rejectUntrusted)) {
          _logger.error("Untrusted certificate submitted with the signature.");
          throw new InsecuredWidgetContentException(
              "Untrusted certificate submitted with the signature.");
        }

        if (cert != null) {
          isValid = signature.checkSignatureValue(cert);
View Full Code Here

TOP

Related Classes of org.apache.wookie.w3c.exceptions.InsecuredWidgetContentException

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.