aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/cert_req.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-23 17:41:12 +0000
committerlloyd <[email protected]>2012-01-23 17:41:12 +0000
commita12a50cc0eaf5113d2f0687f4c1d4be5ff820838 (patch)
treec800f3271e84e28e751c6ab30abdee21fc1b1acb /src/tls/cert_req.cpp
parenta445f7f4a1089fc034c35c500e1572eb9518f44f (diff)
Make the version number a proper class, makes many things much easier
for such a minor change.
Diffstat (limited to 'src/tls/cert_req.cpp')
-rw-r--r--src/tls/cert_req.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tls/cert_req.cpp b/src/tls/cert_req.cpp
index d5a73f64e..3f70c306b 100644
--- a/src/tls/cert_req.cpp
+++ b/src/tls/cert_req.cpp
@@ -13,8 +13,6 @@
#include <botan/loadstor.h>
#include <botan/secqueue.h>
-#include <stdio.h>
-
namespace Botan {
namespace TLS {
@@ -26,7 +24,7 @@ Certificate_Req::Certificate_Req(Record_Writer& writer,
Handshake_Hash& hash,
const Policy& policy,
const std::vector<X509_Certificate>& ca_certs,
- Version_Code version)
+ Protocol_Version version)
{
for(size_t i = 0; i != ca_certs.size(); ++i)
names.push_back(ca_certs[i].subject_dn());
@@ -34,7 +32,7 @@ Certificate_Req::Certificate_Req(Record_Writer& writer,
cert_types.push_back(RSA_CERT);
cert_types.push_back(DSS_CERT);
- if(version >= TLS_V12)
+ if(version >= Protocol_Version::TLS_V12)
{
std::vector<std::string> hashes = policy.allowed_hashes();
std::vector<std::string> sigs = policy.allowed_signature_methods();
@@ -51,7 +49,7 @@ Certificate_Req::Certificate_Req(Record_Writer& writer,
* Deserialize a Certificate Request message
*/
Certificate_Req::Certificate_Req(const MemoryRegion<byte>& buf,
- Version_Code version)
+ Protocol_Version version)
{
if(buf.size() < 4)
throw Decoding_Error("Certificate_Req: Bad certificate request");
@@ -60,7 +58,7 @@ Certificate_Req::Certificate_Req(const MemoryRegion<byte>& buf,
cert_types = reader.get_range_vector<byte>(1, 1, 255);
- if(version >= TLS_V12)
+ if(version >= Protocol_Version::TLS_V12)
{
std::vector<byte> sig_hash_algs = reader.get_range_vector<byte>(2, 2, 65534);