aboutsummaryrefslogtreecommitdiff
path: root/cast
diff options
context:
space:
mode:
Diffstat (limited to 'cast')
-rw-r--r--cast/common/certificate/cast_cert_validator.h2
-rw-r--r--cast/common/channel/proto/cast_channel.proto2
-rw-r--r--cast/receiver/channel/device_auth_namespace_handler.cc2
-rw-r--r--cast/receiver/channel/device_auth_namespace_handler_unittest.cc4
-rw-r--r--cast/sender/channel/cast_auth_util.cc4
-rw-r--r--cast/sender/channel/cast_auth_util.h2
-rw-r--r--cast/sender/channel/cast_auth_util_unittest.cc6
-rw-r--r--cast/streaming/BUILD.gn2
-rw-r--r--cast/streaming/answer_messages.cc4
9 files changed, 14 insertions, 14 deletions
diff --git a/cast/common/certificate/cast_cert_validator.h b/cast/common/certificate/cast_cert_validator.h
index 36f5eeff..e39632c4 100644
--- a/cast/common/certificate/cast_cert_validator.h
+++ b/cast/common/certificate/cast_cert_validator.h
@@ -70,7 +70,7 @@ class CertVerificationContext {
OSP_DISALLOW_COPY_AND_ASSIGN(CertVerificationContext);
};
-// Verifies a cast device certficate given a chain of DER-encoded certificates.
+// Verifies a cast device certificate given a chain of DER-encoded certificates.
//
// Inputs:
//
diff --git a/cast/common/channel/proto/cast_channel.proto b/cast/common/channel/proto/cast_channel.proto
index 968acf5c..3714e360 100644
--- a/cast/common/channel/proto/cast_channel.proto
+++ b/cast/common/channel/proto/cast_channel.proto
@@ -92,7 +92,7 @@ message AuthChallenge {
message AuthResponse {
required bytes signature = 1;
required bytes client_auth_certificate = 2;
- repeated bytes intermediate_certificates = 3;
+ repeated bytes intermediate_certificate = 3;
optional SignatureAlgorithm signature_algorithm = 4
[default = RSASSA_PKCS1v15];
optional bytes sender_nonce = 5;
diff --git a/cast/receiver/channel/device_auth_namespace_handler.cc b/cast/receiver/channel/device_auth_namespace_handler.cc
index 84fa217a..a12a5b6c 100644
--- a/cast/receiver/channel/device_auth_namespace_handler.cc
+++ b/cast/receiver/channel/device_auth_namespace_handler.cc
@@ -95,7 +95,7 @@ void DeviceAuthNamespaceHandler::OnMessage(VirtualConnectionRouter* router,
auth_response->set_client_auth_certificate(device_creds.certs[0]);
for (auto it = device_creds.certs.begin() + 1; it != device_creds.certs.end();
++it) {
- auth_response->add_intermediate_certificates(*it);
+ auth_response->add_intermediate_certificate(*it);
}
auth_response->set_signature_algorithm(RSASSA_PKCS1v15);
auth_response->set_hash_algorithm(hash_alg);
diff --git a/cast/receiver/channel/device_auth_namespace_handler_unittest.cc b/cast/receiver/channel/device_auth_namespace_handler_unittest.cc
index 13d8104d..e3eb022d 100644
--- a/cast/receiver/channel/device_auth_namespace_handler_unittest.cc
+++ b/cast/receiver/channel/device_auth_namespace_handler_unittest.cc
@@ -108,8 +108,8 @@ TEST_F(DeviceAuthNamespaceHandlerTest, AuthResponse) {
auth_response.hash_algorithm());
EXPECT_EQ(expected_auth_response.crl(), auth_response.crl());
EXPECT_THAT(
- auth_response.intermediate_certificates(),
- ElementsAreArray(expected_auth_response.intermediate_certificates()));
+ auth_response.intermediate_certificate(),
+ ElementsAreArray(expected_auth_response.intermediate_certificate()));
}
TEST_F(DeviceAuthNamespaceHandlerTest, BadNonce) {
diff --git a/cast/sender/channel/cast_auth_util.cc b/cast/sender/channel/cast_auth_util.cc
index 44a75b98..5201aa11 100644
--- a/cast/sender/channel/cast_auth_util.cc
+++ b/cast/sender/channel/cast_auth_util.cc
@@ -343,8 +343,8 @@ ErrorOr<CastDeviceCertPolicy> VerifyCredentialsImpl(
std::vector<std::string> cert_chain;
cert_chain.push_back(response.client_auth_certificate());
cert_chain.insert(cert_chain.end(),
- response.intermediate_certificates().begin(),
- response.intermediate_certificates().end());
+ response.intermediate_certificate().begin(),
+ response.intermediate_certificate().end());
// Parse the CRL.
std::unique_ptr<certificate::CastCRL> crl;
diff --git a/cast/sender/channel/cast_auth_util.h b/cast/sender/channel/cast_auth_util.h
index b3ea452f..df6299d3 100644
--- a/cast/sender/channel/cast_auth_util.h
+++ b/cast/sender/channel/cast_auth_util.h
@@ -55,7 +55,7 @@ class AuthContext {
// Authenticates the given |challenge_reply|:
// 1. Signature contained in the reply is valid.
-// 2. Certficate used to sign is rooted to a trusted CA.
+// 2. certificate used to sign is rooted to a trusted CA.
ErrorOr<CastDeviceCertPolicy> AuthenticateChallengeReply(
const CastMessage& challenge_reply,
X509* peer_cert,
diff --git a/cast/sender/channel/cast_auth_util_unittest.cc b/cast/sender/channel/cast_auth_util_unittest.cc
index a4b341e2..5dec424d 100644
--- a/cast/sender/channel/cast_auth_util_unittest.cc
+++ b/cast/sender/channel/cast_auth_util_unittest.cc
@@ -125,7 +125,7 @@ class CastAuthUtilTest : public testing::Test {
response.set_client_auth_certificate(chain[0]);
for (size_t i = 1; i < chain.size(); ++i) {
- response.add_intermediate_certificates(chain[i]);
+ response.add_intermediate_certificate(chain[i]);
}
response.set_hash_algorithm(digest_algorithm);
@@ -170,7 +170,7 @@ TEST_F(CastAuthUtilTest, VerifySuccess) {
TEST_F(CastAuthUtilTest, VerifyBadCA) {
std::string signed_data;
AuthResponse auth_response = CreateAuthResponse(&signed_data, SHA256);
- MangleString(auth_response.mutable_intermediate_certificates(0));
+ MangleString(auth_response.mutable_intermediate_certificate(0));
ErrorOr<CastDeviceCertPolicy> result =
VerifyCredentials(auth_response, signed_data);
EXPECT_FALSE(result);
@@ -357,7 +357,7 @@ ErrorOr<CastDeviceCertPolicy> TestVerifyRevocation(
if (certificate_chain.size() > 0) {
response.set_client_auth_certificate(certificate_chain[0]);
for (size_t i = 1; i < certificate_chain.size(); ++i) {
- response.add_intermediate_certificates(certificate_chain[i]);
+ response.add_intermediate_certificate(certificate_chain[i]);
}
}
diff --git a/cast/streaming/BUILD.gn b/cast/streaming/BUILD.gn
index 99070083..4ed74af0 100644
--- a/cast/streaming/BUILD.gn
+++ b/cast/streaming/BUILD.gn
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import("//build_overrides/build.gni")
-import("//testing/libfuzzer/fuzzer_test.gni")
+import("../../testing/libfuzzer/fuzzer_test.gni")
source_set("common") {
sources = [
diff --git a/cast/streaming/answer_messages.cc b/cast/streaming/answer_messages.cc
index 5311071a..111c6082 100644
--- a/cast/streaming/answer_messages.cc
+++ b/cast/streaming/answer_messages.cc
@@ -68,7 +68,7 @@ ErrorOr<Json::Value> AudioConstraints::ToJson() const {
root["maxChannels"] = max_channels;
root["minBitRate"] = min_bit_rate;
root["maxBitRate"] = max_bit_rate;
- root["maxDelay"] = max_delay.count();
+ root["maxDelay"] = Json::Value::Int64(max_delay.count());
return root;
}
@@ -113,7 +113,7 @@ ErrorOr<Json::Value> VideoConstraints::ToJson() const {
root["maxDimensions"] = error_or_max_dim.value();
root["minBitRate"] = min_bit_rate;
root["maxBitRate"] = max_bit_rate;
- root["maxDelay"] = max_delay.count();
+ root["maxDelay"] = Json::Value::Int64(max_delay.count());
return root;
}