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 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ |
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ErrorType error_type, | 51 ErrorType error_type, |
52 int nss_error_code); | 52 int nss_error_code); |
53 }; | 53 }; |
54 | 54 |
55 // Authenticates the given |challenge_reply|: | 55 // Authenticates the given |challenge_reply|: |
56 // 1. Signature contained in the reply is valid. | 56 // 1. Signature contained in the reply is valid. |
57 // 2. Certficate used to sign is rooted to a trusted CA. | 57 // 2. Certficate used to sign is rooted to a trusted CA. |
58 AuthResult AuthenticateChallengeReply(const CastMessage& challenge_reply, | 58 AuthResult AuthenticateChallengeReply(const CastMessage& challenge_reply, |
59 const std::string& peer_cert); | 59 const std::string& peer_cert); |
60 | 60 |
| 61 // Sets trusted certificate authorities. |
| 62 bool SetTrustedCertificateAuthorities(const std::string& signature, |
| 63 const std::string& keys); |
| 64 |
61 } // namespace cast_channel | 65 } // namespace cast_channel |
62 } // namespace core_api | 66 } // namespace core_api |
63 } // namespace extensions | 67 } // namespace extensions |
64 | 68 |
65 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ | 69 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_AUTH_UTIL_H_ |
OLD | NEW |