ssl_private_key_test_util.h 759 B

12345678910111213141516171819202122
  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
  3. // found in the LICENSE file.
  4. #ifndef NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_
  5. #define NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_
  6. #include <string>
  7. namespace net {
  8. class SSLPrivateKey;
  9. // Tests that |key| matches the private key serialized in |pkcs8|. It checks the
  10. // reported type and key size are correct, and then it tests all advertised
  11. // signature algorithms align with |pkcs8|. It does not test unadvertised
  12. // algorithms, so the caller must check this list is as expected.
  13. void TestSSLPrivateKeyMatches(SSLPrivateKey* key, const std::string& pkcs8);
  14. } // namespace net
  15. #endif // NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_