OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/browser/api/cast_channel/cast_auth_util.h" | 5 #include "extensions/browser/api/cast_channel/cast_auth_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" | 10 #include "extensions/browser/api/cast_channel/cast_auth_ica.h" |
11 #include "extensions/common/api/cast_channel/cast_channel.pb.h" | 11 #include "extensions/common/api/cast_channel/cast_channel.pb.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 namespace core_api { | 15 namespace api { |
16 namespace cast_channel { | 16 namespace cast_channel { |
17 namespace { | 17 namespace { |
18 | 18 |
19 const unsigned char kIntermediateCertificate[] = { | 19 const unsigned char kIntermediateCertificate[] = { |
20 0x30, 0x82, 0x03, 0x87, 0x30, 0x82, 0x02, 0x6f, 0xa0, 0x03, | 20 0x30, 0x82, 0x03, 0x87, 0x30, 0x82, 0x02, 0x6f, 0xa0, 0x03, |
21 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, | 21 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, |
22 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, | 22 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, |
23 0x00, 0x30, 0x7c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, | 23 0x00, 0x30, 0x7c, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, |
24 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, | 24 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, |
25 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0a, 0x43, 0x61, 0x6c, | 25 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0a, 0x43, 0x61, 0x6c, |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 MangleString(&peer_cert); | 405 MangleString(&peer_cert); |
406 AuthResult result = VerifyCredentials( | 406 AuthResult result = VerifyCredentials( |
407 auth_response, peer_cert); | 407 auth_response, peer_cert); |
408 EXPECT_FALSE(result.success()); | 408 EXPECT_FALSE(result.success()); |
409 EXPECT_EQ(AuthResult::ERROR_SIGNED_BLOBS_MISMATCH, | 409 EXPECT_EQ(AuthResult::ERROR_SIGNED_BLOBS_MISMATCH, |
410 result.error_type); | 410 result.error_type); |
411 } | 411 } |
412 | 412 |
413 } // namespace | 413 } // namespace |
414 } // namespace cast_channel | 414 } // namespace cast_channel |
415 } // namespace core_api | 415 } // namespace api |
416 } // namespace extensions | 416 } // namespace extensions |
OLD | NEW |