diff --git a/library/x509write.c b/library/x509write.c index c57e56a0b..aed66240e 100644 --- a/library/x509write.c +++ b/library/x509write.c @@ -102,6 +102,9 @@ static int x509write_string_to_names( asn1_named_data **head, char *name ) return( POLARSSL_ERR_X509WRITE_MALLOC_FAILED ); } + while( c < end && *(c + 1) == ' ' ) + c++; + s = c + 1; in_tag = 1; }