diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-16 12:52:39 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-16 12:52:39 +0000 |
commit | 89995165ab9f086b284fb9745ac8934646e30675 (patch) | |
tree | e3798483911640c002df5358298c58c4d22ab604 /net/quic/crypto/common_cert_set.cc | |
parent | 89572fe97def48ebb0aa2afc5822a36a55b98735 (diff) | |
download | chromium_src-89995165ab9f086b284fb9745ac8934646e30675.zip chromium_src-89995165ab9f086b284fb9745ac8934646e30675.tar.gz chromium_src-89995165ab9f086b284fb9745ac8934646e30675.tar.bz2 |
Land Recent QUIC changes.
Stop versioning non crypto parameters by SCFG. This enables the server
to send different values for these parameters for same SCFG.
As a consequence the server sends the negotiated (authoritative) values
of these parameters in SHLO.
Merge internal change: 45655201
QUIC: make several magic values configurable.
This is half a change. The other half needs to alter server and so
I'll put it in a different CL.
This makes four magic values from the server handshake into parameters
of the server config. A future CL will be able to have the server set
them from it's SSL config protobuf.
Merge internal change: 45622443
QUIC: don't request a proof if the client doesn't have a ProofVerifier.
In order to support cert-less operation, this change alters the client
to not request a proof from the server if it doesn't have a
ProofVerifier configured. Without a ProofVerifier, the client will
simply do opportunistic encryption.
Merge internal change: 45614800
* Stop processing if the current packet closed the connection.
* Close the connection if invalid RST packet received (consistent with
current behavior) -- UDP provides simple CRC.
Merge internal change: 45612040
Don't call ConnectionClose on ConnectionCloseFrame if visitor asked to
stop after processing ack frame.
Merge internal change: 45606025
Don't further process revived packet if visitor refuses the packet header.
Merge internal change: 45530388
Fix coding style nits.
Use "*sets" instead of "set" for arguments or variables of the
CommonCertSets type.
Merge internal change: 45523282
Added enum for write packet error.
Handling failed writes due to errors other than EAGAIN/EWOULDBLOCK I
don't know if this happens for us but might as well handle it.
Merge internal change: 45522400
Tear down the connection when there is a decompression error.
Merge internal change: 45521857
Bugfix infinite wait
Merge internal change: 45509285
Replaced number 3 with kSpdyVersion3.
Will work akalin to define and use SpdyMajorVersion enum and use it
everywhere.
This is a partial merge of internal change: 45485205
Removing an obselete TODO
Merge internal change: 45471987
Move QuicConfig out of QuicCryptoStream. The motivation behind this
change is to be able to select different values for QuicConfig
depending upon SNI (after we receive CHLO).
Merge internal change: 45434264
Limiting the number of FEC groups to 2
Merge internal change: 45425759
Closing connection on out of bounds packet.
Merge internal change: 45413532
Miscellaneous cleanup: add 'const', remove unneeded headers, and make
random minor fixes.
Document the CommonCertSets methods better.
Merge internal change: 45380570
Move FindMutualTag from CryptoUtils to QuicUtils. We will also use
this in version negotiation
Merge internal change: 45337156
Replacing CHECK-fails on address migration with graceful shutdown.
Added GetAddressFamily utility method. Added check for IPV4 in
WritePacket method QuicSocketUtils to copy the IPV4 self_address.
Merge internal change: 45306947
QUIC - Negotiate max open streams.
Added QuicClientSessionPeer to access QuicConfig in QuicClientSession.
Merge internal change: 45233402
Allow retransmitting packets that are retransmissions when we get trucated acks.
Merge internal change: 45233252
Reduce connection timeout till crypto handshake is finished to 1min.
Merge internal change: 45232483
R=rch@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15074007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/crypto/common_cert_set.cc')
-rw-r--r-- | net/quic/crypto/common_cert_set.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc index 78aa927..ee1ac67 100644 --- a/net/quic/crypto/common_cert_set.cc +++ b/net/quic/crypto/common_cert_set.cc @@ -53,17 +53,17 @@ StringPiece CommonCertSetsQUIC::GetCommonHashes() const { } StringPiece CommonCertSetsQUIC::GetCert(uint64 hash, uint32 index) const { + StringPiece cert; for (size_t i = 0; i < arraysize(kSets); i++) { if (kSets[i].hash == hash) { - if (index >= kSets[i].num_certs) { - return StringPiece(); + if (index < kSets[i].num_certs) { + cert.set(kSets[i].certs[index], kSets[i].lens[index]); } - return StringPiece(reinterpret_cast<const char*>(kSets[i].certs[index]), - kSets[i].lens[index]); + break; } } - return StringPiece(); + return cert; } // Compare returns a value less than, equal to or greater than zero if |a| is @@ -110,11 +110,7 @@ bool CommonCertSetsQUIC::MatchCert(StringPiece cert, // Binary search for a matching certificate. size_t min = 0; size_t max = kSets[j].num_certs - 1; - for (;;) { - if (max < min) { - break; - } - + while (max >= min) { size_t mid = min + ((max - min) / 2); int n = Compare(cert, kSets[j].certs[mid], kSets[j].lens[mid]); if (n < 0) { |