From bc3d98469f140812539bb7ba30f04b68b16d7f1c Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 26 Nov 2012 16:12:02 +0100 Subject: [PATCH] Fixed multiple DN size --- library/ssl_srv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 1e5002a03..3756f582f 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -753,7 +753,7 @@ static int ssl_write_certificate_request( ssl_context *ssl ) p += 2; crt = ssl->ca_chain; - total_dn_size = 2; + total_dn_size = 0; while( crt != NULL ) { if( p - buf > 4096 ) @@ -767,7 +767,7 @@ static int ssl_write_certificate_request( ssl_context *ssl ) SSL_DEBUG_BUF( 3, "requested DN", p, dn_size ); - total_dn_size += dn_size; + total_dn_size += 2 + dn_size; crt = crt->next; }