Commit Graph
115 Commits
Author SHA1 Message Date
Anay Wadhera e0674d435e Implement signing/verification of PresenceAuthenticationFrames
PiperOrigin-RevId: 540029386
2023-06-13 11:53:15 -07:00
hai007 5aeceb2034 Update path to LDT dependency
PiperOrigin-RevId: 539811031
2023-06-12 17:58:12 -07:00
Anthony Rueda 72b249474d Extend local and shared credential protos to included duplicated metadata_encryption_key and metadata_encryption_key_tag for all protocol version
PiperOrigin-RevId: 538612138
2023-06-07 15:43:30 -07:00
Hai Shang fe1e14a02e internal clean up.
PiperOrigin-RevId: 538009138
2023-06-05 16:17:36 -07:00
Anay Wadhera 1b7142da77 Plumb CredentialManager::UpdateRemotePublicCredentials and CredentialManager::GetPublicCredentials through to PresenceService
PiperOrigin-RevId: 534136547
2023-05-22 11:52:06 -07:00
Anay Wadhera 0e1170c52e remove obsolete todo
PiperOrigin-RevId: 532176213
2023-05-15 11:39:30 -07:00
Anay Wadhera 9dff873424 Convert LDT Rust to a normal define
PiperOrigin-RevId: 531318262
2023-05-11 15:09:04 -07:00
Anay Wadhera 813a07116e Update action bits to match spec
PiperOrigin-RevId: 531266917
2023-05-11 11:56:26 -07:00
Anay Wadhera 7825f2c67a update LDT rust header include path
PiperOrigin-RevId: 531261461
2023-05-11 11:36:34 -07:00
Janusz Sobczak 0200a92978 Separate TX and Action fields.
PiperOrigin-RevId: 529767591
2023-05-05 11:21:59 -07:00
Anay Wadhera f21b1e7089 internal change
PiperOrigin-RevId: 529179617
2023-05-03 13:32:34 -07:00
Anay Wadhera 21d2efbccd Create PresenceDeviceProvider
PiperOrigin-RevId: 528913199
2023-05-02 16:02:36 -07:00
Anay Wadhera fa54c26fcd Plumb CredentialManager::SetLocalDeviceMetadata through to PresenceService
PiperOrigin-RevId: 527257552
2023-04-26 07:16:26 -07:00
Crisrael Lucero 6ee8d32b2e Change proto include header
PiperOrigin-RevId: 526146014
2023-04-21 15:05:28 -07:00
Anay Wadhera 7f227a5205 CredentialManager: Allow saving/getting device metadata blobs
PiperOrigin-RevId: 525518359
2023-04-19 12:22:19 -07:00
Crisrael Lucero b10a2a24ca Modernize emplace_back in unit tests
PiperOrigin-RevId: 524973507
2023-04-17 16:02:03 -07:00
Suet-Fei Li 31f3f53000 Fix crypto include path for Chromium.
PiperOrigin-RevId: 524452486
2023-04-14 20:56:29 -07:00
Hai Shang 97fe0be263 scan_manager clean up.
PiperOrigin-RevId: 523538897
2023-04-11 16:39:55 -07:00
Anay Wadhera 18db653e62 Fixup LDT ABI after import
PiperOrigin-RevId: 523454176
2023-04-11 11:17:00 -07:00
Hai Shang 574b88d7ef add unit test for NP v0 advertisement parsing
PiperOrigin-RevId: 523153029
2023-04-10 10:41:05 -07:00
Hai Shang f0d95d9f58 internal cleanup
PiperOrigin-RevId: 522528325
2023-04-06 22:41:18 -07:00
Hai Shang c312442f3d internal clean up
PiperOrigin-RevId: 521555239
2023-04-03 14:00:22 -07:00
Hai Shang 47b7a04939 minor clean up
PiperOrigin-RevId: 520734787
2023-03-30 13:56:57 -07:00
Nick Bourdakos 14e7832be0 Internal change
PiperOrigin-RevId: 520638739
2023-03-30 12:34:53 -07:00
Nick Bourdakos 39df20d821 Internal change
PiperOrigin-RevId: 518186148
2023-03-20 23:51:16 -07:00
Anay Wadhera b0e5b059d9 Internal upgrade
PiperOrigin-RevId: 513590478
2023-03-02 11:20:57 -08:00
Janusz Sobczak bb0ccf9156 Verify LDT with test data from android tests
PiperOrigin-RevId: 513093397
2023-02-28 18:12:03 -08:00
Janusz Sobczak 4f21a570e4 Add ParseAndroidSharedCredential test
PiperOrigin-RevId: 509588875
2023-02-14 11:31:37 -08:00
Suet-Fei Li 00f86cde7b Do not build Rust for Windows & Android platforms.
PiperOrigin-RevId: 509133994
2023-02-12 23:07:20 -08:00
Janusz Sobczak da723cfaa6 Remove usages of Metadata::device_id
PiperOrigin-RevId: 508465243
2023-02-09 13:48:17 -08:00
Anay Wadhera dc8b1ef7ee Expose internal/platform windows implementation to presence and add bcrypt.lib for resolving bcrypt symbols in absl
PiperOrigin-RevId: 507834078
2023-02-07 11:13:38 -08:00
Janusz Sobczak 5f4144cd0b Update SharedCredential definition
PiperOrigin-RevId: 507568902
2023-02-06 13:33:23 -08:00
Anay Wadhera 16af6a7e6b Allow tests to be runnable on Windows
PiperOrigin-RevId: 506364864
2023-02-01 10:59:01 -08:00
Janusz Sobczak 2746a4aa2f Fix field sizes in credentials
authenticity_key must be 32 bytes. metadata_encryption_key must be 14 bytes.

PiperOrigin-RevId: 505183908
2023-01-27 12:34:51 -08:00
Janusz Sobczak 94e70d0ddd Store consumed salts in private credentials
PiperOrigin-RevId: 505167378
2023-01-27 11:30:54 -08:00
Janusz Sobczak eb282a64da Set credential start&end times
PiperOrigin-RevId: 504880260
2023-01-26 10:33:22 -08:00
Anay Wadhera c58b45eb50 Rename PublicCredential to SharedCredential and PrivateCredential to LocalCredential
PiperOrigin-RevId: 503221477
2023-01-24 12:09:21 -08:00
Anay Wadhera 43ec97b13b Add missing die_if_null.h include
PiperOrigin-RevId: 503504149
2023-01-20 12:55:38 -08:00
Janusz Sobczak a29be214a3 Migrate to absl::AnyInvocable in NP.
Replaces a bunch of std::function uses with absl::AnyInvocable.

PiperOrigin-RevId: 502960326
2023-01-18 13:16:29 -08:00
Janusz Sobczak ca547df4d7 Subscribe for public credentials update
Nearby Presence scanning sessions may be very long. We need a way to notify the scanner that new credentials were added during scanning.
`SubscribeForPublicCredentials()` allows us to subscribe for such updates.

PiperOrigin-RevId: 502699345
2023-01-17 15:07:14 -08:00
Anay Wadhera 44fb63f498 Use CredentialSelector for GenerateCredentials()
PiperOrigin-RevId: 501951868
2023-01-13 15:23:35 -08:00
Janusz Sobczak 0e2111afc2 Collapse success&failure callbacks into one
Instead of two callbacks:
- void on_success(Result result)
- void on_failure(Status status)
use just one callback:
void on_result(StatusOr<Result> result)

PiperOrigin-RevId: 501912034
2023-01-13 12:28:47 -08:00
Anay Wadhera 7667420e2b Use CredentialSelector for GenerateCredentials()
PiperOrigin-RevId: 501622339
2023-01-12 11:36:37 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
Anay Wadhera 7afea00649 Internal change
PiperOrigin-RevId: 499997190
2023-01-06 02:49:53 -08:00
Janusz Sobczak e64f9859e1 Replace BleOperationStatus with absl::Status
PiperOrigin-RevId: 497191477
2022-12-22 10:20:15 -08:00
Janusz Sobczak 0d14b885ea Use absl::Status instead of custom status
PiperOrigin-RevId: 497054898
2022-12-21 19:11:55 -08:00
Janusz Sobczak b3f8534226 Use Rand instead of absl::Random
Use Nearby's common Rand() util instead of absl::Random

PiperOrigin-RevId: 495386054
2022-12-14 12:30:56 -08:00
Anay Wadhera 228e52e979 Refactor broadcasting code into BroadcastManager
PiperOrigin-RevId: 495021310
2022-12-13 07:57:04 -08:00
Janusz Sobczak 337e1f41b0 Clarify CredentialStorage interface.
SaveCredentials does not to return the credentials that it has just saved. Returning a status will do.
Improved documentation.

PiperOrigin-RevId: 494280108
2022-12-09 15:41:12 -08:00