Added new log message for encryption using invalid key
This commit is contained in:
@@ -731,6 +731,7 @@ public abstract class OperationResult implements Parcelable {
|
|||||||
MSG_PSE_ERROR_PGP (LogLevel.ERROR, R.string.msg_pse_error_pgp),
|
MSG_PSE_ERROR_PGP (LogLevel.ERROR, R.string.msg_pse_error_pgp),
|
||||||
MSG_PSE_ERROR_SIG (LogLevel.ERROR, R.string.msg_pse_error_sig),
|
MSG_PSE_ERROR_SIG (LogLevel.ERROR, R.string.msg_pse_error_sig),
|
||||||
MSG_PSE_ERROR_UNLOCK (LogLevel.ERROR, R.string.msg_pse_error_unlock),
|
MSG_PSE_ERROR_UNLOCK (LogLevel.ERROR, R.string.msg_pse_error_unlock),
|
||||||
|
MSG_PSE_ERROR_KEY_NOT_ALLOWED(LogLevel.ERROR, R.string.msg_pse_error_key_not_allowed),
|
||||||
MSG_PSE_ERROR_REVOKED_OR_EXPIRED (LogLevel.ERROR, R.string.msg_pse_error_revoked_or_expired),
|
MSG_PSE_ERROR_REVOKED_OR_EXPIRED (LogLevel.ERROR, R.string.msg_pse_error_revoked_or_expired),
|
||||||
MSG_PSE_KEY_OK (LogLevel.OK, R.string.msg_pse_key_ok),
|
MSG_PSE_KEY_OK (LogLevel.OK, R.string.msg_pse_key_ok),
|
||||||
MSG_PSE_KEY_UNKNOWN (LogLevel.DEBUG, R.string.msg_pse_key_unknown),
|
MSG_PSE_KEY_UNKNOWN (LogLevel.DEBUG, R.string.msg_pse_key_unknown),
|
||||||
|
|||||||
@@ -229,8 +229,7 @@ public class PgpSignEncryptOperation extends BaseOperation<PgpSignEncryptInputPa
|
|||||||
if (input.getAllowedKeyIds() != null) {
|
if (input.getAllowedKeyIds() != null) {
|
||||||
if (!input.getAllowedKeyIds().contains(signingMasterKeyId)) {
|
if (!input.getAllowedKeyIds().contains(signingMasterKeyId)) {
|
||||||
// this key is in our db, but NOT allowed!
|
// this key is in our db, but NOT allowed!
|
||||||
log.add(LogType.MSG_DC_ASKIP_NOT_ALLOWED, indent + 1);
|
log.add(LogType.MSG_PSE_ERROR_KEY_NOT_ALLOWED, indent + 1);
|
||||||
log.add(LogType.MSG_DC_ERROR_NO_KEY, indent + 1);
|
|
||||||
return new PgpSignEncryptResult(PgpSignEncryptResult.RESULT_KEY_DISALLOWED, log);
|
return new PgpSignEncryptResult(PgpSignEncryptResult.RESULT_KEY_DISALLOWED, log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1297,6 +1297,7 @@
|
|||||||
<string name="msg_pse_error_pgp">"Internal OpenPGP error!"</string>
|
<string name="msg_pse_error_pgp">"Internal OpenPGP error!"</string>
|
||||||
<string name="msg_pse_error_sig">"Encountered OpenPGP signature exception!"</string>
|
<string name="msg_pse_error_sig">"Encountered OpenPGP signature exception!"</string>
|
||||||
<string name="msg_pse_error_unlock">"Unknown error unlocking key!"</string>
|
<string name="msg_pse_error_unlock">"Unknown error unlocking key!"</string>
|
||||||
|
<string name="msg_pse_error_key_not_allowed">"Key used for encrypting is not allowed"</string>
|
||||||
<string name="msg_pse_error_revoked_or_expired">"Revoked/Expired key cannot be used for sign or encryption"</string>
|
<string name="msg_pse_error_revoked_or_expired">"Revoked/Expired key cannot be used for sign or encryption"</string>
|
||||||
<string name="msg_pse_key_ok">"Encrypting for key: %s"</string>
|
<string name="msg_pse_key_ok">"Encrypting for key: %s"</string>
|
||||||
<string name="msg_pse_key_unknown">"Missing key for encryption: %s"</string>
|
<string name="msg_pse_key_unknown">"Missing key for encryption: %s"</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user