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

Unified Diff: net/quic/test_tools/crypto_test_utils_nss.cc

Issue 320663002: Change the prototype of ChannelIDSource::GetChannelIDKey() to allow an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unrelated changes Created 6 years, 6 months 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/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/crypto_test_utils_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils_nss.cc
===================================================================
--- net/quic/test_tools/crypto_test_utils_nss.cc (revision 275522)
+++ net/quic/test_tools/crypto_test_utils_nss.cc (working copy)
@@ -31,7 +31,7 @@
// ChannelIDKey implementation.
virtual bool Sign(StringPiece signed_data,
- string* out_signature) OVERRIDE {
+ string* out_signature) const OVERRIDE {
unsigned char hash_buf[SHA256_LENGTH];
SECItem hash_item = { siBuffer, hash_buf, sizeof(hash_buf) };
@@ -71,13 +71,13 @@
return true;
}
- virtual string SerializeKey() OVERRIDE {
- static const unsigned int kExpectedKeyLength = 65;
+ virtual string SerializeKey() const OVERRIDE {
+ const SECKEYPublicKey* public_key = ecdsa_keypair_->public_key();
- const SECKEYPublicKey* public_key = ecdsa_keypair_->public_key();
// public_key->u.ec.publicValue is an ANSI X9.62 public key which, for
// a P-256 key, is 0x04 (meaning uncompressed) followed by the x and y field
// elements as 32-byte, big-endian numbers.
+ static const unsigned int kExpectedKeyLength = 65;
const unsigned char* const data = public_key->u.ec.publicValue.data;
const unsigned int len = public_key->u.ec.publicValue.len;
@@ -101,11 +101,12 @@
// ChannelIDSource implementation.
- virtual bool GetChannelIDKey(
+ virtual QuicAsyncStatus GetChannelIDKey(
const string& hostname,
- scoped_ptr<ChannelIDKey>* channel_id_key) OVERRIDE {
+ scoped_ptr<ChannelIDKey>* channel_id_key,
+ ChannelIDSourceCallback* /*callback*/) OVERRIDE {
channel_id_key->reset(new TestChannelIDKey(HostnameToKey(hostname)));
- return true;
+ return QUIC_SUCCESS;
}
private:
@@ -125,7 +126,6 @@
return keypair;
}
-
HostnameToKeyMap hostname_to_key_;
};
« no previous file with comments | « net/quic/test_tools/crypto_test_utils.cc ('k') | net/quic/test_tools/crypto_test_utils_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698