Merge "Run and log BoringSSL self-test for NIAP compliance."

This commit is contained in:
Pavel Grafov
2018-02-08 17:22:12 +00:00
committed by Android (Google) Code Review
9 changed files with 96 additions and 1 deletions

View File

@@ -77,6 +77,7 @@ public class SecurityLog {
TAG_KEY_DESTRUCTION,
TAG_CERT_AUTHORITY_INSTALLED,
TAG_CERT_AUTHORITY_REMOVED,
TAG_CRYPTO_SELF_TEST_COMPLETED,
})
public @interface SecurityLogTag {}
@@ -399,6 +400,14 @@ public class SecurityLog {
public static final int TAG_USER_RESTRICTION_REMOVED =
SecurityLogTags.SECURITY_USER_RESTRICTION_REMOVED;
/**
* Indicates that cryptographic functionality self test has completed. The log entry contains an
* {@code Integer} payload, indicating the result of the test (0 if the test failed, 1 if
* succeeded) and accessible via {@link SecurityEvent#getData()}.
*/
public static final int TAG_CRYPTO_SELF_TEST_COMPLETED =
SecurityLogTags.SECURITY_CRYPTO_SELF_TEST_COMPLETED;
/**
* Event severity level indicating that the event corresponds to normal workflow.
*/
@@ -529,6 +538,7 @@ public class SecurityLog {
case TAG_USER_RESTRICTION_REMOVED:
return LEVEL_INFO;
case TAG_CERT_AUTHORITY_REMOVED:
case TAG_CRYPTO_SELF_TEST_COMPLETED:
return getSuccess() ? LEVEL_INFO : LEVEL_ERROR;
case TAG_CERT_AUTHORITY_INSTALLED:
case TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT:

View File

@@ -34,4 +34,5 @@ option java_package android.app.admin
210027 security_user_restriction_added (package|3),(admin_user|1),(restriction|3)
210028 security_user_restriction_removed (package|3),(admin_user|1),(restriction|3)
210029 security_cert_authority_installed (success|1),(subject|3)
210030 security_cert_authority_removed (success|1),(subject|3)
210030 security_cert_authority_removed (success|1),(subject|3)
210031 security_crypto_self_test_completed (success|1)