diff options
author | Jack Lloyd <[email protected]> | 2015-11-13 16:59:00 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-11-13 16:59:00 -0500 |
commit | f4656160185f30d0d451e4fc53a091fc26d8ea0e (patch) | |
tree | 4fd451329ccd31df668ed478fa130fdc6057c1e0 /src/lib/tls/tls_reader.h | |
parent | 81edfc8221b9da94ac1a453e78bf57a5a739b4ce (diff) |
Fix bug causing TLS client to sometimes reject DHE server kex
Re-encoding the server key exchange meant that any leading zeros
in the values for DHE (or SRP) would be stripped out. This would
cause the signature check to fail.
Diffstat (limited to 'src/lib/tls/tls_reader.h')
-rw-r--r-- | src/lib/tls/tls_reader.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/tls/tls_reader.h b/src/lib/tls/tls_reader.h index c2aef3163..63a59625f 100644 --- a/src/lib/tls/tls_reader.h +++ b/src/lib/tls/tls_reader.h @@ -34,6 +34,8 @@ class TLS_Data_Reader throw decode_error("Extra bytes at end of message"); } + size_t read_so_far() const { return m_offset; } + size_t remaining_bytes() const { return m_buf.size() - m_offset; } bool has_remaining() const { return (remaining_bytes() > 0); } |