---
name: "libressl-ASN1_NULL_new"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-ASN1_NULL_new"
---

# libressl-ASN1\_NULL\_new(3)

ASN.1 NULL value

## NAME

**ASN1\_NULL\_new**, **ASN1\_NULL\_free** – ASN.1 NULL value

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/asn1.h\>**

*ASN1\_NULL* *\**\

**ASN1\_NULL\_new**(*void*);

*void*\

**ASN1\_NULL\_free**(*ASN1\_NULL \*val\_in*);

## DESCRIPTION

**ASN1\_NULL\_new**() returns a specific invalid pointer that represents the ASN.1 NULL value, which is the only possible value of the ASN.1 NULL type. That pointer is different from a NULL pointer. Dereferencing it almost certainly results in a segmentation fault. This function does not allocate memory and cannot fail.

**ASN1\_NULL\_free**() has no effect whatsoever. In particular, it ignores the *val\_in* argument and does not free any memory. In normal use, application programs only pass the invalid pointer obtained from **ASN1\_NULL\_new**() to this function. But even if a valid pointer is passed, that pointer does not become invalid.

The ASN.1 NULL type is also represented by the V\_ASN1\_NULL type identifier constant.

## SEE ALSO

ASN1\_item\_new(3), d2i\_ASN1\_NULL(3)

## STANDARDS

ITU-T Recommendation X.208, also known as ISO/IEC 8824-1: Specification of Abstract Syntax Notation One (ASN.1), section 19: Notation for the null type

## HISTORY

**ASN1\_NULL\_new**() and **ASN1\_NULL\_free**() first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.
