ASN1\_BIT\_STRING\_NEW(3ossl) OpenSSL ASN1\_BIT\_STRING\_NEW(3ossl)

# [NAME](#NAME)

ASN1\_BIT\_STRING\_new, ASN1\_BIT\_STRING\_free - ASN1\_BIT\_STRING allocation functions

# [SYNOPSIS](#SYNOPSIS)

```
 #include <openssl/asn1.h>
 ASN1_BIT_STRING *ASN1_BIT_STRING_new(void);
 void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a);
```

# [DESCRIPTION](#DESCRIPTION)

**ASN1\_BIT\_STRING\_new()** returns an allocated **ASN1\_BIT\_STRING** structure.

**ASN1\_BIT\_STRING\_free()** frees up a single **ASN1\_BIT\_STRING** object. If the argument is NULL, nothing is done.

**ASN1\_BIT\_STRING** structure representing the ASN.1 BIT\_STRING type.

# [RETURN VALUES](#RETURN_VALUES)

**ASN1\_BIT\_STRING\_new()** return a valid **ASN1\_BIT\_STRING** structure or NULL if an error occurred.

**ASN1\_BIT\_STRING\_free()** does not return a value.

# [SEE ALSO](#SEE_ALSO)

[**ERR\_get\_error**(3)](/man/os/openssl-4.0/ERR_get_error.3)

# [COPYRIGHT](#COPYRIGHT)

Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at &lt;https://www.openssl.org/source/license.html&gt;.

2026-09-29 4.0.3

---

Document: ASN1_BIT_STRING_free(3ossl) from openssl-4.0 4.0.3-r0 (Chainguard OS)
