PR: 2736
Reported by: Remi Gacogne <rgacogne-bugs@coredump.fr> Preserve unused bits value in non-canonicalised ASN1_STRING structures by using ASN1_STRING_copy which preseves flags.
This commit is contained in:
parent
468d58e712
commit
2f31308b17
@ -399,8 +399,7 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
|
|||||||
/* If type not in bitmask just copy string across */
|
/* If type not in bitmask just copy string across */
|
||||||
if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON))
|
if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON))
|
||||||
{
|
{
|
||||||
out->type = in->type;
|
if (!ASN1_STRING_copy(out, in))
|
||||||
if (!ASN1_STRING_set(out, in->data, in->length))
|
|
||||||
return 0;
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user