Internal Flow change

PiperOrigin-RevId: 465623255
This commit is contained in:
suetfei
2022-08-05 12:30:23 -07:00
committed by Copybara-Service
parent 377dc47c9f
commit 4bf31d18da
45 changed files with 116 additions and 116 deletions
+5 -5
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/aead.h"
#include "internal/crypto/aead.h"
#include <stddef.h>
#include <stdint.h>
@@ -22,10 +22,10 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "third_party/openssl/aes.h"
#include "third_party/openssl/evp.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/openssl_util.h"
#include <openssl/aes.h>
#include <openssl/evp.h>
namespace crypto {
+1 -1
View File
@@ -25,7 +25,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
struct evp_aead_st;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/aead.h"
#include "internal/crypto/aead.h"
#include <optional>
#include <string>
+9 -9
View File
@@ -1,4 +1,4 @@
#include "third_party/nearby/internal/crypto/ec_private_key.h"
#include "internal/crypto/ec_private_key.h"
// Copyright 2020 Google LLC
//
@@ -23,15 +23,15 @@
#include <utility>
#include <vector>
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "internal/crypto/openssl_util.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/bn.h"
#include "third_party/openssl/bytestring.h"
#include "third_party/openssl/ec.h"
#include "third_party/openssl/ec_key.h"
#include "third_party/openssl/evp.h"
#include "third_party/openssl/mem.h"
#include "third_party/openssl/pkcs8.h"
#include <openssl/bn.h>
#include <openssl/bytestring.h>
#include <openssl/ec.h>
#include <openssl/ec_key.h>
#include <openssl/evp.h>
#include <openssl/mem.h>
#include <openssl/pkcs8.h>
namespace crypto {
+2 -2
View File
@@ -23,8 +23,8 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "third_party/openssl/base.h"
#include "internal/crypto/crypto_export.h"
#include <openssl/base.h>
namespace crypto {
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/ec_private_key.h"
#include "internal/crypto/ec_private_key.h"
#include <stdint.h>
+2 -2
View File
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/ec_signature_creator.h"
#include "internal/crypto/ec_signature_creator.h"
#include <memory>
#include "third_party/nearby/internal/crypto/ec_signature_creator_impl.h"
#include "internal/crypto/ec_signature_creator_impl.h"
#include "internal/platform/logging.h"
namespace crypto {
+1 -1
View File
@@ -22,7 +22,7 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+8 -8
View File
@@ -12,20 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/ec_signature_creator_impl.h"
#include "internal/crypto/ec_signature_creator_impl.h"
#include <stddef.h>
#include <stdint.h>
#include <vector>
#include "third_party/nearby/internal/crypto/ec_private_key.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "third_party/openssl/bn.h"
#include "third_party/openssl/ec.h"
#include "third_party/openssl/ecdsa.h"
#include "third_party/openssl/evp.h"
#include "third_party/openssl/sha.h"
#include "internal/crypto/ec_private_key.h"
#include "internal/crypto/openssl_util.h"
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/ecdsa.h>
#include <openssl/evp.h>
#include <openssl/sha.h>
namespace crypto {
+1 -1
View File
@@ -20,7 +20,7 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/ec_signature_creator.h"
#include "internal/crypto/ec_signature_creator.h"
namespace crypto {
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/ec_signature_creator.h"
#include "internal/crypto/ec_signature_creator.h"
#include <stdint.h>
@@ -22,9 +22,9 @@
#include "gtest/gtest.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/ec_private_key.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/signature_verifier.h"
#include "internal/crypto/ec_private_key.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/signature_verifier.h"
TEST(ECSignatureCreatorTest, BasicTest) {
// Do a verify round trip.
+6 -6
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/encryptor.h"
#include "internal/crypto/encryptor.h"
#include <stddef.h>
#include <stdint.h>
@@ -24,12 +24,12 @@
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "third_party/nearby/internal/crypto/symmetric_key.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/openssl_util.h"
#include "internal/crypto/symmetric_key.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/aes.h"
#include "third_party/openssl/evp.h"
#include <openssl/aes.h>
#include <openssl/evp.h>
namespace crypto {
+1 -1
View File
@@ -26,7 +26,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+3 -3
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/encryptor.h"
#include "internal/crypto/encryptor.h"
#include <stddef.h>
@@ -24,8 +24,8 @@
#include "gtest/gtest.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/symmetric_key.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/symmetric_key.h"
TEST(EncryptorTest, EncryptDecrypt) {
std::unique_ptr<crypto::SymmetricKey> key(
+4 -4
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/openssl/hkdf.h"
#include <openssl/hkdf.h>
#include <stddef.h>
#include <stdint.h>
@@ -22,10 +22,10 @@
#include <vector>
#include "absl/strings/string_view.h"
#include "third_party/nearby/internal/crypto/hkdf.h"
#include "third_party/nearby/internal/crypto/hmac.h"
#include "internal/crypto/hkdf.h"
#include "internal/crypto/hmac.h"
#include "internal/platform/logging.h"
#include "src/include/openssl/digest.h"
#include <openssl/digest.h>
namespace crypto {
+1 -1
View File
@@ -22,7 +22,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+6 -6
View File
@@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/openssl/hmac.h"
#include <openssl/hmac.h>
#include <stddef.h>
#include <algorithm>
#include <string>
#include "third_party/nearby/internal/crypto/hmac.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "third_party/nearby/internal/crypto/secure_util.h"
#include "third_party/nearby/internal/crypto/symmetric_key.h"
#include "internal/crypto/hmac.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/openssl_util.h"
#include "internal/crypto/secure_util.h"
#include "internal/crypto/symmetric_key.h"
#include "internal/platform/logging.h"
namespace crypto {
+2 -2
View File
@@ -28,8 +28,8 @@
#include "absl/base/attributes.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "internal/crypto/crypto_export.h"
#include "internal/crypto/nearby_base.h"
namespace crypto {
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/hmac.h"
#include "internal/crypto/hmac.h"
#include <stddef.h>
#include <string.h>
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "internal/crypto/nearby_base.h"
#include <cstddef>
#include <limits>
+3 -3
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "internal/crypto/openssl_util.h"
#include <stddef.h>
#include <stdint.h>
@@ -21,8 +21,8 @@
#include "absl/strings/string_view.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/crypto.h"
#include "third_party/openssl/err.h"
#include <openssl/crypto.h>
#include <openssl/err.h>
namespace crypto {
+1 -1
View File
@@ -18,7 +18,7 @@
#include <stddef.h>
#include <string.h>
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
#include "internal/platform/logging.h"
namespace crypto {
+2 -2
View File
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/random.h"
#include "internal/crypto/random.h"
#include <stddef.h>
#include "third_party/openssl/rand.h"
#include <openssl/rand.h>
namespace crypto {
+1 -1
View File
@@ -18,7 +18,7 @@
#include <stddef.h>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+2 -2
View File
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/random.h"
#include "internal/crypto/random.h"
#include <stddef.h>
#include <string>
#include "gtest/gtest.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "internal/crypto/nearby_base.h"
// Basic functionality tests. Does NOT test the security of the random data.
+7 -7
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/rsa_private_key.h"
#include "internal/crypto/rsa_private_key.h"
#include <stdint.h>
@@ -21,13 +21,13 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "internal/crypto/openssl_util.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/bn.h"
#include "third_party/openssl/bytestring.h"
#include "third_party/openssl/evp.h"
#include "third_party/openssl/mem.h"
#include "third_party/openssl/rsa.h"
#include <openssl/bn.h>
#include <openssl/bytestring.h>
#include <openssl/evp.h>
#include <openssl/mem.h>
#include <openssl/rsa.h>
namespace crypto {
+2 -2
View File
@@ -22,8 +22,8 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "third_party/openssl/base.h"
#include "internal/crypto/crypto_export.h"
#include <openssl/base.h>
namespace crypto {
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/rsa_private_key.h"
#include "internal/crypto/rsa_private_key.h"
#include <stdint.h>
+4 -4
View File
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/secure_hash.h"
#include "internal/crypto/secure_hash.h"
#include <stddef.h>
#include <memory>
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "third_party/openssl/mem.h"
#include "third_party/openssl/sha.h"
#include "internal/crypto/openssl_util.h"
#include <openssl/mem.h>
#include <openssl/sha.h>
namespace crypto {
+1 -1
View File
@@ -19,7 +19,7 @@
#include <memory>
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+2 -2
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/secure_hash.h"
#include "internal/crypto/secure_hash.h"
#include <stddef.h>
#include <stdint.h>
@@ -21,7 +21,7 @@
#include <string>
#include "gtest/gtest.h"
#include "third_party/nearby/internal/crypto/sha2.h"
#include "internal/crypto/sha2.h"
TEST(SecureHashTest, TestUpdate) {
// Example B.3 from FIPS 180-2: long message.
+2 -2
View File
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/secure_util.h"
#include "internal/crypto/secure_util.h"
#include "third_party/openssl/mem.h"
#include <openssl/mem.h>
namespace crypto {
+1 -1
View File
@@ -17,7 +17,7 @@
#include <stddef.h>
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+3 -3
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/sha2.h"
#include "internal/crypto/sha2.h"
#include <stddef.h>
@@ -21,8 +21,8 @@
#include <string>
#include "absl/strings/string_view.h"
#include "third_party/nearby/internal/crypto/secure_hash.h"
#include "third_party/openssl/sha.h"
#include "internal/crypto/secure_hash.h"
#include <openssl/sha.h>
namespace crypto {
+1 -1
View File
@@ -22,7 +22,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/sha2.h"
#include "internal/crypto/sha2.h"
#include <stddef.h>
#include <stdint.h>
+6 -6
View File
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/signature_verifier.h"
#include "internal/crypto/signature_verifier.h"
#include <memory>
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "internal/crypto/openssl_util.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/bytestring.h"
#include "src/include/openssl/digest.h"
#include "third_party/openssl/evp.h"
#include "third_party/openssl/rsa.h"
#include <openssl/bytestring.h>
#include <openssl/digest.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
namespace crypto {
+1 -1
View File
@@ -21,7 +21,7 @@
#include <vector>
#include "absl/types/span.h"
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/signature_verifier.h"
#include "internal/crypto/signature_verifier.h"
#include <stddef.h>
#include <stdint.h>
+5 -5
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/symmetric_key.h"
#include "internal/crypto/symmetric_key.h"
#include <stddef.h>
#include <stdint.h>
@@ -22,11 +22,11 @@
#include <string>
#include <utility>
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "third_party/nearby/internal/crypto/openssl_util.h"
#include "internal/crypto/nearby_base.h"
#include "internal/crypto/openssl_util.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/evp.h"
#include "third_party/openssl/rand.h"
#include <openssl/evp.h>
#include <openssl/rand.h>
namespace crypto {
+1 -1
View File
@@ -20,7 +20,7 @@
#include <memory>
#include <string>
#include "third_party/nearby/internal/crypto/crypto_export.h"
#include "internal/crypto/crypto_export.h"
namespace crypto {
+2 -2
View File
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "third_party/nearby/internal/crypto/symmetric_key.h"
#include "internal/crypto/symmetric_key.h"
#include <memory>
#include <string>
#include "gtest/gtest.h"
#include "absl/strings/ascii.h"
#include "third_party/nearby/internal/crypto/nearby_base.h"
#include "internal/crypto/nearby_base.h"
TEST(SymmetricKeyTest, GenerateRandomKey) {
std::unique_ptr<crypto::SymmetricKey> key(
@@ -19,7 +19,7 @@
#include "absl/strings/string_view.h"
#include "internal/platform/byte_array.h"
#include "src/include/openssl/digest.h"
#include <openssl/digest.h>
namespace location {
namespace nearby {
@@ -20,9 +20,9 @@
#include "absl/strings/string_view.h"
#include "internal/platform/byte_array.h"
#if defined NEARBY_WINDOWS_DLL
#include "third_party/openssl/boringssl/src/include/openssl/digest.h"
#include <openssl/boringssl/src/include/openssl/digest.h>
#else
#include "src/include/openssl/digest.h"
#include <openssl/digest.h>
#endif
// Function implementations for platform/api/crypto.h.
+3 -3
View File
@@ -22,9 +22,9 @@
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "internal/platform/logging.h"
#include "third_party/openssl/cipher.h" // NOLINT
#include "third_party/openssl/crypto.h"
#include "third_party/openssl/evp.h" // NOLINT
#include <openssl/cipher.h> // NOLINT
#include <openssl/crypto.h>
#include <openssl/evp.h> // NOLINT
#include "third_party/tink/cc/subtle/hkdf.h"
#include "third_party/tink/cc/subtle/random.h"