Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1423)

Unified Diff: net/ssl/ssl_private_key_test_util.h

Issue 2566273008: Use SecKeyCreateSignature on macOS 10.12 and later. (Closed)
Patch Set: rsleevi comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ssl/ssl_platform_key_win.cc ('k') | net/ssl/ssl_private_key_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_private_key_test_util.h
diff --git a/net/ssl/ssl_private_key_test_util.h b/net/ssl/ssl_private_key_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff922f7cad54ce4df3fe5d475e1ec9c10c70a0c5
--- /dev/null
+++ b/net/ssl/ssl_private_key_test_util.h
@@ -0,0 +1,24 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_
+#define NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_
+
+#include <string>
+
+#include "net/ssl/ssl_private_key.h"
+
+namespace net {
+
+const char* SSLPrivateKeyTypeToString(SSLPrivateKey::Type type);
+
+// Tests that |key| matches the private key serialized in |pkcs8|. It checks the
+// reported type and key size are correct, and then it tests all advertised
+// signature algorithms align with |pkcs8|. It does not test unadvertised
+// algorithms, so the caller must check this list is as expected.
+void TestSSLPrivateKeyMatches(SSLPrivateKey* key, const std::string& pkcs8);
+
+} // namespace net
+
+#endif // NET_SSL_SSL_PRIVATE_KEY_TEST_UTIL_H_
« no previous file with comments | « net/ssl/ssl_platform_key_win.cc ('k') | net/ssl/ssl_private_key_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698