aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/cert_req.cpp
diff options
context:
space:
mode:
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;
}