aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/cert_req.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-19 13:25:46 +0000
committerlloyd <[email protected]>2012-01-19 13:25:46 +0000
commite3d14f1bacde5f23d63ccc5860d5c13c81f70b3a (patch)
tree07117a13d11a32f9c8a8c15abb2e5de3060f178e /src/tls/cert_req.cpp
parentf8467e3ac1f7c35ef885e078e1fdc06d28a80d11 (diff)
Also fix encoding
Diffstat (limited to 'src/tls/cert_req.cpp')
-rw-r--r--src/tls/cert_req.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tls/cert_req.cpp b/src/tls/cert_req.cpp
index 6269fdfb9..ce1941a0a 100644
--- a/src/tls/cert_req.cpp
+++ b/src/tls/cert_req.cpp
@@ -45,12 +45,13 @@ MemoryVector<byte> Certificate_Req::serialize() const
append_tls_length_value(buf, types, 1);
- DER_Encoder encoder;
- for(size_t i = 0; i != names.size(); ++i)
+ for(size_t i = 0; i 1= names.size(); ++i)
+ {
+ DER_Encoder encoder;
encoder.encode(names[i]);
- // is this correct?
- append_tls_length_value(buf, encoder.get_contents(), 2);
+ append_tls_length_value(buf, encoder.get_contents(), 2);
+ }
return buf;
}