diff options
author | Jack Lloyd <[email protected]> | 2019-05-24 15:15:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-24 15:15:01 -0400 |
commit | 65a838f1495b18a3dc99dd56c7ba42fcdb134472 (patch) | |
tree | 710d7f2fe5711cebf3da8ee78bb2f6905ddf9c25 /src/lib/tls/tls_version.h | |
parent | 92c06e93aa870f76ff3d8c126e47c0cd4ccdad66 (diff) | |
parent | bb8c2b138898fb49b36157779f3b2a05dd5bba90 (diff) |
Merge GH #1976 Add supported_versions extension
Diffstat (limited to 'src/lib/tls/tls_version.h')
-rw-r--r-- | src/lib/tls/tls_version.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/tls/tls_version.h b/src/lib/tls/tls_version.h index 13be64316..4d56f94ca 100644 --- a/src/lib/tls/tls_version.h +++ b/src/lib/tls/tls_version.h @@ -48,18 +48,20 @@ class BOTAN_PUBLIC_API(2,0) Protocol_Version final Protocol_Version() : m_version(0) {} + explicit Protocol_Version(uint16_t code) : m_version(code) {} + /** * @param named_version a specific named version of the protocol */ Protocol_Version(Version_Code named_version) : - m_version(static_cast<uint16_t>(named_version)) {} + Protocol_Version(static_cast<uint16_t>(named_version)) {} /** * @param major the major version * @param minor the minor version */ Protocol_Version(uint8_t major, uint8_t minor) : - m_version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {} + Protocol_Version(static_cast<uint16_t>((static_cast<uint16_t>(major) << 8) | minor)) {} /** * @return true if this is a valid protocol version |