Examples of CryptoStatusDisplay


Examples of net.suberic.pooka.gui.crypto.CryptoStatusDisplay

              }

              MessageUI ui = getMessageUI();
              if (ui != null) {

                CryptoStatusDisplay csd = ui.getCryptoStatusDisplay();

                if (csd != null)
                  csd.cryptoUpdated(cInfo);
                try {
                  ui.refreshDisplay();
                } catch (OperationCancelledException oce) {
                } catch (MessagingException me) {
                  showError(Pooka.getProperty("Error.encryption.decryptionFailed", "Decryption Failed:  "), me);
View Full Code Here

Examples of net.suberic.pooka.gui.crypto.CryptoStatusDisplay

    MessageInfo info = getMessageInfo();
    if (info != null) {
      MessageCryptoInfo cInfo = info.getCryptoInfo();
      try {
        if (cInfo != null && cInfo.isSigned()) {
          CryptoStatusDisplay csd = null;

          String fromString = "";
          Address[] fromAddr = getMessageInfo().getMessage().getFrom();
          if (fromAddr != null && fromAddr.length > 0) {
            fromString = ((javax.mail.internet.InternetAddress)fromAddr[0]).getAddress();
          }
          java.security.Key[] keys = Pooka.getCryptoManager().getPublicKeys(
              fromString, cInfo.getEncryptionType(), true);

          if (keys == null || keys.length < 1) {
            java.security.Key newKey = selectPublicKey(
                Pooka.getProperty("Pooka.crypto.publicKey.forSig", "Select key for verifying the signature on this message."),
                cInfo.getEncryptionType(),
                forSignature);
            keys = new java.security.Key[] { newKey };
          }

          if (keys != null) {
            boolean checked = false;
            for (int i = 0; (! checked) && i < keys.length; i++) {
              checked = cInfo.checkSignature(keys[i], true);
              if(checked)
                break;
            }
          }
          MessageUI ui = getMessageUI();
          if (ui != null) {
            csd = ui.getCryptoStatusDisplay();
          }

          if (csd != null)
            csd.cryptoUpdated(cInfo);

          ui.refreshDisplay();
        }
      } catch (Exception e) {
        showError(Pooka.getProperty("Error.encryption.signatureValidationFailed", "Signature Validation Failed"), e);
View Full Code Here

Examples of net.suberic.pooka.gui.crypto.CryptoStatusDisplay

        fw.setBusy(true);;

      if (getMessageUI() != null){
        //Liao-
        MessageUI msgUI = getMessageUI();
        CryptoStatusDisplay cryptoLCD = msgUI.getCryptoStatusDisplay();
        VariableBundle vars = Pooka.getResources();
        String status = "(Encryption Status)";
        switch(cryptoLCD.getEncryptionStatus()){
        case CryptoStatusDisplay.UNCHECKED_ENCRYPTED:
          status = vars.getProperty("CryptoPanel.uncheckedEncrypted.Tooltip", "Encrypted Message");
          break;
        case CryptoStatusDisplay.DECRYPTED_UNSUCCESSFULLY:
          status = vars.getProperty("CryptoPanel.decryptedUnsuccessfully.Tooltip", "Message Failed Decryption");
View Full Code Here

Examples of net.suberic.pooka.gui.crypto.CryptoStatusDisplay

        fw.setBusy(true);;

      if (getMessageUI() != null){
        //Liao-
        MessageUI msgUI = getMessageUI();
        CryptoStatusDisplay cryptoLCD = msgUI.getCryptoStatusDisplay();
        VariableBundle vars = Pooka.getResources();
        String status = "(Signature Status)";
        switch(cryptoLCD.getSignatureStatus()){
        case CryptoStatusDisplay.UNCHECKED_SIGNED:
          status = vars.getProperty("CryptoPanel.uncheckedSigned.Tooltip", "Signed");
          break;
        case CryptoStatusDisplay.SIGNATURE_BAD:
          status = vars.getProperty("CryptoPanel.signatureBad.Tooltip", "Signature Failed Verification by Key");
View Full Code Here
TOP
Copyright © 2018 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.