show authenticate flag in logs

This commit is contained in:
Vincent Breitmoser 2014-09-22 16:27:42 +02:00
parent 3f39cf92c6
commit 029ce91670
3 changed files with 128 additions and 54 deletions

View File

@ -362,40 +362,82 @@ public class ProviderHelper {
values.put(Keys.CAN_SIGN, s);
values.put(Keys.CAN_AUTHENTICATE, a);
values.put(Keys.IS_REVOKED, key.isRevoked());
if (masterKeyId == keyId) {
if (c) {
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CES
: LogType.MSG_IP_MASTER_FLAGS_CEX);
// yes it's ugly. got any better ideas?
if (a) {
if (c) {
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CESA
: LogType.MSG_IP_MASTER_FLAGS_CEXA);
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CXSA
: LogType.MSG_IP_MASTER_FLAGS_CXXA);
}
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CXS
: LogType.MSG_IP_MASTER_FLAGS_CXX);
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XESA
: LogType.MSG_IP_MASTER_FLAGS_XEXA);
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XXSA
: LogType.MSG_IP_MASTER_FLAGS_XXXA);
}
}
} else {
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XES
: LogType.MSG_IP_MASTER_FLAGS_XEX);
if (c) {
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CESX
: LogType.MSG_IP_MASTER_FLAGS_CEXX);
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_CXSX
: LogType.MSG_IP_MASTER_FLAGS_CXXX);
}
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XXS
: LogType.MSG_IP_MASTER_FLAGS_XXX);
if (e) {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XESX
: LogType.MSG_IP_MASTER_FLAGS_XEXX);
} else {
log(s ? LogType.MSG_IP_MASTER_FLAGS_XXSX
: LogType.MSG_IP_MASTER_FLAGS_XXXX);
}
}
}
} else {
if (c) {
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CES
: LogType.MSG_IP_SUBKEY_FLAGS_CEX);
if (a) {
if (c) {
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CESA
: LogType.MSG_IP_SUBKEY_FLAGS_CEXA);
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CXSA
: LogType.MSG_IP_SUBKEY_FLAGS_CXXA);
}
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CXS
: LogType.MSG_IP_SUBKEY_FLAGS_CXX);
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XESA
: LogType.MSG_IP_SUBKEY_FLAGS_XEXA);
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XXSA
: LogType.MSG_IP_SUBKEY_FLAGS_XXXA);
}
}
} else {
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XES
: LogType.MSG_IP_SUBKEY_FLAGS_XEX);
if (c) {
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CESX
: LogType.MSG_IP_SUBKEY_FLAGS_CEXX);
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_CXSX
: LogType.MSG_IP_SUBKEY_FLAGS_CXXX);
}
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XXS
: LogType.MSG_IP_SUBKEY_FLAGS_XXX);
if (e) {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XESX
: LogType.MSG_IP_SUBKEY_FLAGS_XEXX);
} else {
log(s ? LogType.MSG_IP_SUBKEY_FLAGS_XXSX
: LogType.MSG_IP_SUBKEY_FLAGS_XXXX);
}
}
}
}

View File

@ -242,25 +242,41 @@ public abstract class OperationResult implements Parcelable {
MSG_IP_MASTER (LogLevel.DEBUG, R.string.msg_ip_master),
MSG_IP_MASTER_EXPIRED (LogLevel.DEBUG, R.string.msg_ip_master_expired),
MSG_IP_MASTER_EXPIRES (LogLevel.DEBUG, R.string.msg_ip_master_expires),
MSG_IP_MASTER_FLAGS_CES (LogLevel.DEBUG, R.string.msg_ip_master_flags_ces),
MSG_IP_MASTER_FLAGS_CEX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cex),
MSG_IP_MASTER_FLAGS_CXS (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxs),
MSG_IP_MASTER_FLAGS_XES (LogLevel.DEBUG, R.string.msg_ip_master_flags_xes),
MSG_IP_MASTER_FLAGS_CXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxx),
MSG_IP_MASTER_FLAGS_XEX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xex),
MSG_IP_MASTER_FLAGS_XXS (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxs),
MSG_IP_MASTER_FLAGS_XXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxx),
MSG_IP_MASTER_FLAGS_CESA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cesa),
MSG_IP_MASTER_FLAGS_CESX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cesx),
MSG_IP_MASTER_FLAGS_CEXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cexa),
MSG_IP_MASTER_FLAGS_CEXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cexx),
MSG_IP_MASTER_FLAGS_CXSA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxsa),
MSG_IP_MASTER_FLAGS_CXSX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxsx),
MSG_IP_MASTER_FLAGS_CXXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxxa),
MSG_IP_MASTER_FLAGS_CXXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_cxxx),
MSG_IP_MASTER_FLAGS_XESA (LogLevel.DEBUG, R.string.msg_ip_master_flags_xesa),
MSG_IP_MASTER_FLAGS_XESX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xesx),
MSG_IP_MASTER_FLAGS_XEXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_xexa),
MSG_IP_MASTER_FLAGS_XEXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xexx),
MSG_IP_MASTER_FLAGS_XXSA (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxsa),
MSG_IP_MASTER_FLAGS_XXSX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxsx),
MSG_IP_MASTER_FLAGS_XXXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxxa),
MSG_IP_MASTER_FLAGS_XXXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxxx),
MSG_IP_SUBKEY (LogLevel.DEBUG, R.string.msg_ip_subkey),
MSG_IP_SUBKEY_EXPIRED (LogLevel.DEBUG, R.string.msg_ip_subkey_expired),
MSG_IP_SUBKEY_EXPIRES (LogLevel.DEBUG, R.string.msg_ip_subkey_expires),
MSG_IP_SUBKEY_FLAGS_CES (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_ces),
MSG_IP_SUBKEY_FLAGS_CEX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cex),
MSG_IP_SUBKEY_FLAGS_CXS (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxs),
MSG_IP_SUBKEY_FLAGS_XES (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xes),
MSG_IP_SUBKEY_FLAGS_CXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxx),
MSG_IP_SUBKEY_FLAGS_XEX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xex),
MSG_IP_SUBKEY_FLAGS_XXS (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxs),
MSG_IP_SUBKEY_FLAGS_XXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxx),
MSG_IP_SUBKEY_FLAGS_CESA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cesa),
MSG_IP_SUBKEY_FLAGS_CESX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cesx),
MSG_IP_SUBKEY_FLAGS_CEXA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cexa),
MSG_IP_SUBKEY_FLAGS_CEXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cexx),
MSG_IP_SUBKEY_FLAGS_CXSA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxsa),
MSG_IP_SUBKEY_FLAGS_CXSX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxsx),
MSG_IP_SUBKEY_FLAGS_CXXA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxxa),
MSG_IP_SUBKEY_FLAGS_CXXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_cxxx),
MSG_IP_SUBKEY_FLAGS_XESA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xesa),
MSG_IP_SUBKEY_FLAGS_XESX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xesx),
MSG_IP_SUBKEY_FLAGS_XEXA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xexa),
MSG_IP_SUBKEY_FLAGS_XEXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xexx),
MSG_IP_SUBKEY_FLAGS_XXSA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxsa),
MSG_IP_SUBKEY_FLAGS_XXSX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxsx),
MSG_IP_SUBKEY_FLAGS_XXXA (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxxa),
MSG_IP_SUBKEY_FLAGS_XXXX (LogLevel.DEBUG, R.string.msg_ip_subkey_flags_xxxx),
MSG_IP_SUCCESS (LogLevel.OK, R.string.msg_ip_success),
MSG_IP_SUCCESS_IDENTICAL (LogLevel.OK, R.string.msg_ip_success_identical),
MSG_IP_UID_CERT_BAD (LogLevel.WARN, R.string.msg_ip_uid_cert_bad),

View File

@ -561,25 +561,41 @@
<string name="msg_ip_master">"Processing master key %s"</string>
<string name="msg_ip_master_expired">"Keyring expired on %s"</string>
<string name="msg_ip_master_expires">"Keyring expires on %s"</string>
<string name="msg_ip_master_flags_ces">"Master key flags: certify, encrypt, sign"</string>
<string name="msg_ip_master_flags_cex">"Master key flags: certify, encrypt"</string>
<string name="msg_ip_master_flags_cxs">"Master key flags: certify, sign"</string>
<string name="msg_ip_master_flags_xes">"Master key flags: encrypt, sign"</string>
<string name="msg_ip_master_flags_cxx">"Master key flags: certify"</string>
<string name="msg_ip_master_flags_xex">"Master key flags: encrypt"</string>
<string name="msg_ip_master_flags_xxs">"Master key flags: sign"</string>
<string name="msg_ip_master_flags_xxx">"Master key flags: none"</string>
<string name="msg_ip_master_flags_cesa">"Master flags: certify, encrypt, sign, authenticate"</string>
<string name="msg_ip_master_flags_cesx">"Master flags: certify, encrypt, sign"</string>
<string name="msg_ip_master_flags_cexa">"Master flags: certify, encrypt, authenticate"</string>
<string name="msg_ip_master_flags_cexx">"Master flags: certify, encrypt"</string>
<string name="msg_ip_master_flags_cxsa">"Master flags: certify, sign, authenticate"</string>
<string name="msg_ip_master_flags_cxsx">"Master flags: certify, sign"</string>
<string name="msg_ip_master_flags_cxxa">"Master flags: certify, authentcate"</string>
<string name="msg_ip_master_flags_cxxx">"Master flags: certify"</string>
<string name="msg_ip_master_flags_xesa">"Master flags: encrypt, sign, authenticate"</string>
<string name="msg_ip_master_flags_xesx">"Master flags: encrypt, sign"</string>
<string name="msg_ip_master_flags_xexa">"Master flags: encrypt, authenticate"</string>
<string name="msg_ip_master_flags_xexx">"Master flags: encrypt"</string>
<string name="msg_ip_master_flags_xxsa">"Master flags: sign, authenticate"</string>
<string name="msg_ip_master_flags_xxsx">"Master flags: sign"</string>
<string name="msg_ip_master_flags_xxxa">"Master flags: authenticate"</string>
<string name="msg_ip_master_flags_xxxx">"Master flags: none"</string>
<string name="msg_ip_subkey">"Processing subkey %s"</string>
<string name="msg_ip_subkey_expired">"Subkey expired on %s"</string>
<string name="msg_ip_subkey_expires">"Subkey expires on %s"</string>
<string name="msg_ip_subkey_flags_ces">"Subkey flags: certify, encrypt, sign"</string>
<string name="msg_ip_subkey_flags_cex">"Subkey flags: certify, encrypt"</string>
<string name="msg_ip_subkey_flags_cxs">"Subkey flags: certify, sign"</string>
<string name="msg_ip_subkey_flags_xes">"Subkey flags: encrypt, sign"</string>
<string name="msg_ip_subkey_flags_cxx">"Subkey flags: certify"</string>
<string name="msg_ip_subkey_flags_xex">"Subkey flags: encrypt"</string>
<string name="msg_ip_subkey_flags_xxs">"Subkey flags: sign"</string>
<string name="msg_ip_subkey_flags_xxx">"Subkey flags: none"</string>
<string name="msg_ip_subkey_flags_cesa">"Subkey flags: certify, encrypt, sign, authenticate"</string>
<string name="msg_ip_subkey_flags_cesx">"Subkey flags: certify, encrypt, sign"</string>
<string name="msg_ip_subkey_flags_cexa">"Subkey flags: certify, encrypt, authenticate"</string>
<string name="msg_ip_subkey_flags_cexx">"Subkey flags: certify, encrypt"</string>
<string name="msg_ip_subkey_flags_cxsa">"Subkey flags: certify, sign, authenticate"</string>
<string name="msg_ip_subkey_flags_cxsx">"Subkey flags: certify, sign"</string>
<string name="msg_ip_subkey_flags_cxxa">"Subkey flags: certify, authentcate"</string>
<string name="msg_ip_subkey_flags_cxxx">"Subkey flags: certify"</string>
<string name="msg_ip_subkey_flags_xesa">"Subkey flags: encrypt, sign, authenticate"</string>
<string name="msg_ip_subkey_flags_xesx">"Subkey flags: encrypt, sign"</string>
<string name="msg_ip_subkey_flags_xexa">"Subkey flags: encrypt, authenticate"</string>
<string name="msg_ip_subkey_flags_xexx">"Subkey flags: encrypt"</string>
<string name="msg_ip_subkey_flags_xxsa">"Subkey flags: sign, authenticate"</string>
<string name="msg_ip_subkey_flags_xxsx">"Subkey flags: sign"</string>
<string name="msg_ip_subkey_flags_xxxa">"Subkey flags: authenticate"</string>
<string name="msg_ip_subkey_flags_xxxx">"Subkey flags: none"</string>
<string name="msg_ip_success">"Successfully imported public keyring"</string>
<string name="msg_ip_success_identical">"Keyring contains no new data, nothing to do"</string>
<string name="msg_ip_reinsert_secret">"Re-inserting secret key"</string>