Skip to content
Permalink
Browse files
PCM: API test PrivateClickMeasurement.ValidBlindedSecret is failing o…
…n platforms with RSABSSA

https://bugs.webkit.org/show_bug.cgi?id=227777
<rdar://80291822>

Reviewed by Kate Cheney.

* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
   The test was looking for the value of JSON key "source_secret_token"
   which should be "source_unlinkable_token". This patch fixes that and
   renames the local variable accordingly.


Canonical link: https://commits.webkit.org/239492@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
johnwilander committed Jul 8, 2021
1 parent a23b74f commit d43a2165568510c11d4b1a96684722971970543d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
@@ -1,3 +1,17 @@
2021-07-07 John Wilander <wilander@apple.com>

PCM: API test PrivateClickMeasurement.ValidBlindedSecret is failing on platforms with RSABSSA
https://bugs.webkit.org/show_bug.cgi?id=227777
<rdar://80291822>

Reviewed by Kate Cheney.

* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:
(TestWebKitAPI::TEST):
The test was looking for the value of JSON key "source_secret_token"
which should be "source_unlinkable_token". This patch fixes that and
renames the local variable accordingly.

2021-07-07 Ling Ho <lingho@apple.com>

Remove proxy server setting from Buildbot configuration
@@ -77,15 +77,15 @@

// Continue the test.
EXPECT_TRUE(pcm.calculateAndUpdateSourceUnlinkableToken(base64URLEncodeToString(nsSpkiData.bytes, nsSpkiData.length)));
auto sourceSecretToken = pcm.tokenSignatureJSON();
EXPECT_EQ(sourceSecretToken->asObject()->size(), 4ul);
EXPECT_STREQ(sourceSecretToken->getString("source_engagement_type"_s).utf8().data(), "click");
EXPECT_STREQ(sourceSecretToken->getString("source_nonce"_s).utf8().data(), "ABCDEFabcdef0123456789");
EXPECT_FALSE(sourceSecretToken->getString("source_secret_token"_s).isEmpty());
EXPECT_EQ(sourceSecretToken->getInteger("version"_s), 2);
auto sourceUnlinkableToken = pcm.tokenSignatureJSON();
EXPECT_EQ(sourceUnlinkableToken->asObject()->size(), 4ul);
EXPECT_STREQ(sourceUnlinkableToken->getString("source_engagement_type"_s).utf8().data(), "click");
EXPECT_STREQ(sourceUnlinkableToken->getString("source_nonce"_s).utf8().data(), "ABCDEFabcdef0123456789");
EXPECT_FALSE(sourceUnlinkableToken->getString("source_unlinkable_token"_s).isEmpty());
EXPECT_EQ(sourceUnlinkableToken->getInteger("version"_s), 2);

// Generate the signature.
auto blindedMessage = base64URLDecode(sourceSecretToken->getString("source_secret_token"_s));
auto blindedMessage = base64URLDecode(sourceUnlinkableToken->getString("source_unlinkable_token"_s));

auto blindedSignature = adoptNS([[NSMutableData alloc] initWithLength:modulusNBytes]);
ccrsabssa_sign_blinded_message(ciphersuite, rsaPrivateKey, blindedMessage->data(), blindedMessage->size(), static_cast<uint8_t *>([blindedSignature mutableBytes]), [blindedSignature length], rng);

0 comments on commit d43a216

Please sign in to comment.