| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "net/cert/internal/signature_algorithm.h" | 5 #include "net/cert/internal/signature_algorithm.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/numerics/safe_math.h" | 9 #include "base/numerics/safe_math.h" |
| 8 #include "net/der/input.h" | 10 #include "net/der/input.h" |
| 9 #include "net/der/parse_values.h" | 11 #include "net/der/parse_values.h" |
| 10 #include "net/der/parser.h" | 12 #include "net/der/parser.h" |
| 11 | 13 |
| 12 namespace net { | 14 namespace net { |
| 13 | 15 |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 // From RFC 5912: | 18 // From RFC 5912: |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 const RsaPssParameters* SignatureAlgorithm::ParamsForRsaPss() const { | 612 const RsaPssParameters* SignatureAlgorithm::ParamsForRsaPss() const { |
| 611 if (algorithm_ == SignatureAlgorithmId::RsaPss) | 613 if (algorithm_ == SignatureAlgorithmId::RsaPss) |
| 612 return static_cast<RsaPssParameters*>(params_.get()); | 614 return static_cast<RsaPssParameters*>(params_.get()); |
| 613 return nullptr; | 615 return nullptr; |
| 614 } | 616 } |
| 615 | 617 |
| 616 SignatureAlgorithm::SignatureAlgorithm( | 618 SignatureAlgorithm::SignatureAlgorithm( |
| 617 SignatureAlgorithmId algorithm, | 619 SignatureAlgorithmId algorithm, |
| 618 DigestAlgorithm digest, | 620 DigestAlgorithm digest, |
| 619 scoped_ptr<SignatureAlgorithmParameters> params) | 621 scoped_ptr<SignatureAlgorithmParameters> params) |
| 620 : algorithm_(algorithm), digest_(digest), params_(params.Pass()) { | 622 : algorithm_(algorithm), digest_(digest), params_(std::move(params)) {} |
| 621 } | |
| 622 | 623 |
| 623 } // namespace net | 624 } // namespace net |
| OLD | NEW |