diff options
author | Greg Kaiser <gkaiser@google.com> | 2019-02-28 06:34:25 -0800 |
---|---|---|
committer | Greg Kaiser <gkaiser@google.com> | 2019-02-28 06:34:25 -0800 |
commit | 4d6f4cc4fe51a06c2cf6bcb12f9e130c02824a7c (patch) | |
tree | 04b98d87677a94ae2be206ac241f2d84acda1c79 /fs_mgr | |
parent | 50cb647e7d8d2627338804f113b073dbb1512379 (diff) | |
download | system_core-4d6f4cc4fe51a06c2cf6bcb12f9e130c02824a7c.tar.gz system_core-4d6f4cc4fe51a06c2cf6bcb12f9e130c02824a7c.tar.bz2 system_core-4d6f4cc4fe51a06c2cf6bcb12f9e130c02824a7c.zip |
libfs_avb: Pass const string by reference
Minor performance improvement for ValidatePublicKeyBlob().
Test: TreeHugger
Change-Id: I3498b529abedb8169d2488a2dc04cbd42cdb6f7d
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/libfs_avb/avb_util.cpp | 2 | ||||
-rw-r--r-- | fs_mgr/libfs_avb/avb_util.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/libfs_avb/avb_util.cpp b/fs_mgr/libfs_avb/avb_util.cpp index 7d899021a..f4e4d4ee8 100644 --- a/fs_mgr/libfs_avb/avb_util.cpp +++ b/fs_mgr/libfs_avb/avb_util.cpp @@ -326,7 +326,7 @@ bool ValidatePublicKeyBlob(const uint8_t* key, size_t length, return false; } -bool ValidatePublicKeyBlob(const std::string key_blob_to_validate, +bool ValidatePublicKeyBlob(const std::string& key_blob_to_validate, const std::vector<std::string>& allowed_key_paths) { std::string allowed_key_blob; if (key_blob_to_validate.empty()) { diff --git a/fs_mgr/libfs_avb/avb_util.h b/fs_mgr/libfs_avb/avb_util.h index 986a69a92..09c786a52 100644 --- a/fs_mgr/libfs_avb/avb_util.h +++ b/fs_mgr/libfs_avb/avb_util.h @@ -80,7 +80,7 @@ VBMetaVerifyResult VerifyVBMetaSignature(const VBMetaData& vbmeta, bool ValidatePublicKeyBlob(const uint8_t* key, size_t length, const std::string& expected_key_blob); -bool ValidatePublicKeyBlob(const std::string key_blob_to_validate, +bool ValidatePublicKeyBlob(const std::string& key_blob_to_validate, const std::vector<std::string>& expected_key_paths); // Detects if whether a partition contains a rollback image. |