| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ | 5 #ifndef NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ |
| 6 #define NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ | 6 #define NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/ssl/ssl_private_key.h" | |
| 11 | |
| 12 namespace net { | 10 namespace net { |
| 13 | 11 |
| 14 const char* SSLPrivateKeyTypeToString(SSLPrivateKey::Type type); | 12 class SSLPrivateKey; |
| 15 | 13 |
| 16 // Tests that |key| matches the private key serialized in |pkcs8|. It checks the | 14 // Tests that |key| matches the private key serialized in |pkcs8|. It checks the |
| 17 // reported type and key size are correct, and then it tests all advertised | 15 // reported type and key size are correct, and then it tests all advertised |
| 18 // signature algorithms align with |pkcs8|. It does not test unadvertised | 16 // signature algorithms align with |pkcs8|. It does not test unadvertised |
| 19 // algorithms, so the caller must check this list is as expected. | 17 // algorithms, so the caller must check this list is as expected. |
| 20 void TestSSLPrivateKeyMatches(SSLPrivateKey* key, const std::string& pkcs8); | 18 void TestSSLPrivateKeyMatches(SSLPrivateKey* key, const std::string& pkcs8); |
| 21 | 19 |
| 22 } // namespace net | 20 } // namespace net |
| 23 | 21 |
| 24 #endif // NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ | 22 #endif // NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_ |
| OLD | NEW |