Function ASN1_STRING_dup is not copy variable "flags".
This flag is very important for ASN1_BIT_STRING type.
As result, final zeros in ASN1_BIT_STRING would lost in
ASN1_STRING_dup, when this flag was set to
ASN1_STRING_FLAG_BITS_LEFT.
Possible patch:
ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)
{
ASN1_STRING *ret;
....
ret->flags=str->flags;
^^^^^^^^^^^^^^^^^^^^^^ !!!
return(ret);
}
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]