diff options
Diffstat (limited to 'net/quic/quic_crypto_server_stream.cc')
-rw-r--r-- | net/quic/quic_crypto_server_stream.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc index 6b74cc2..6f49864 100644 --- a/net/quic/quic_crypto_server_stream.cc +++ b/net/quic/quic_crypto_server_stream.cc @@ -109,6 +109,17 @@ bool QuicCryptoServerStream::GetBase64SHA256ClientChannelID( base::Base64Encode(string( reinterpret_cast<const char*>(digest), sizeof(digest)), output); + // Remove padding. + size_t len = output->size(); + if (len >= 2) { + if ((*output)[len - 1] == '=') { + len--; + if ((*output)[len - 1] == '=') { + len--; + } + output->resize(len); + } + } return true; } |