| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "remoting/protocol/pairing_client_authenticator.h" | 5 #include "remoting/protocol/pairing_client_authenticator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
| 10 #include "remoting/base/rsa_key_pair.h" | 10 #include "remoting/base/rsa_key_pair.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 message->AddElement(pairing_tag); | 55 message->AddElement(pairing_tag); |
| 56 sent_client_id_ = true; | 56 sent_client_id_ = true; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 void PairingClientAuthenticator::OnPinFetched( | 60 void PairingClientAuthenticator::OnPinFetched( |
| 61 State initial_state, | 61 State initial_state, |
| 62 const SetAuthenticatorCallback& callback, | 62 const SetAuthenticatorCallback& callback, |
| 63 const std::string& pin) { | 63 const std::string& pin) { |
| 64 callback.Run(V2Authenticator::CreateForClient( | 64 callback.Run(V2Authenticator::CreateForClient( |
| 65 AuthenticationMethod::ApplyHashFunction( | 65 ApplySharedSecretHashFunction(HashFunction::HMAC_SHA256, |
| 66 AuthenticationMethod::HMAC_SHA256, | 66 authentication_tag_, pin), |
| 67 authentication_tag_, pin), | |
| 68 initial_state)); | 67 initial_state)); |
| 69 } | 68 } |
| 70 | 69 |
| 71 } // namespace protocol | 70 } // namespace protocol |
| 72 } // namespace remoting | 71 } // namespace remoting |
| OLD | NEW |