case1:// accept all but revoked/disabled/expired keys
minTrustLevel="?";// value between invalid and unknown keys
break;
default:
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeOverlay.js: doValidKeysForAllRecipients(): return null (INVALID VALUE for acceptedKeys: \""+acceptedKeys+"\")\n");
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeHelper.js: doValidKeysForAllRecipients(): return null (no single valid key found for=\""+addr+"\" with minTrustLevel=\""+minTrustLevel+"\")\n");
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeHelper.js: getValidKeyForRecipient(): subkey in key="+keyObj.keyId+" keyTrust=\""+keyTrust+"\" found\n");
if(keyTrustIndex>=fullTrustIndex){
// immediately return if a fully or ultimately trusted key is found. Faked duplicates
// should not be an issue here
returnkeyObj.keyId;
}
if(foundKeyId!=null){// multiple entries found
if(foundKeyTrustIndex>subKeyTrustIndex){
returnfoundKeyId;// OK first key has higher trust level
}
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeHelper.js: getValidKeyForRecipient(): multiple matching keys with trust level \""+keyTrust+"\" found for \""+emailAddr+"\" (0x"+foundKeyId+" and 0x"+keyObj.keyId+")\n");
returnnull;
}
foundKeyId=keyObj.keyId;// FOUND
foundKeyTrustIndex=subKeyTrustIndex;
}
else{
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeHelper.js: getValidKeyForRecipient(): matching subkey="+keyObj.keyId+" found but not enough trust\n");
}
}
}
}
if(foundKeyId==null){
EnigmailCommon.DEBUG_LOG("enigmailMsgComposeHelper.js: getValidKeyForRecipient(): no key for '"+emailAddr+"' found\n");
}
returnfoundKeyId;
},
/**
* processConflicts
* - handle sign/encrypt/pgpMime conflicts if any
* - NOTE: conflicts result into disabling the feature (0/never)
* Input parameters:
* @encrypt: email would currently get encrypted
* @sign: email would currently get signed
* @return: false if error occurred or processing was canceled
*/
processConflicts:function(encrypt,sign)
{
// process message about whether we still sign/encrypt