ASN1_STRING_length_set

Set the reported content length of an ASN.1 string without resizing its buffer (deprecated).

Synopsis

Declared in <openssl/asn1.h>

[[deprecated]]
void
ASN1_STRING_length_set(
    ASN1_STRING* x,
    int n);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Description

Prefer ASN1_STRING_set() or ASN1_STRING_set0(), which keep length and data consistent.

Parameters

NameDescription
xString whose length field is updated.
nNew length in bytes; the caller must ensure the data buffer is large enough.