1.\" $OpenBSD: ASN1_NULL_new.3,v 1.3 2021/12/09 18:42:35 schwarze Exp $ 2.\" 3.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: December 9 2021 $ 18.Dt ASN1_NULL_NEW 3 19.Os 20.Sh NAME 21.Nm ASN1_NULL_new , 22.Nm ASN1_NULL_free 23.Nd ASN.1 NULL value 24.Sh SYNOPSIS 25.In openssl/asn1.h 26.Ft ASN1_NULL * 27.Fn ASN1_NULL_new void 28.Ft void 29.Fn ASN1_NULL_free "ASN1_NULL *val_in" 30.Sh DESCRIPTION 31.Fn ASN1_NULL_new 32returns a specific invalid pointer that represents the ASN.1 NULL value, 33which is the only possible value of the ASN.1 NULL type. 34That pointer is different from a 35.Dv NULL 36pointer. 37Dereferencing it almost certainly results in a segmentation fault. 38This function does not allocate memory and cannot fail. 39.Pp 40.Fn ASN1_NULL_free 41has no effect whatsoever. 42In particular, it ignores the 43.Fa val_in 44argument and does not free any memory. 45In normal use, application programs only pass the invalid pointer 46obtained from 47.Fn ASN1_NULL_new 48to this function. 49But even if a valid pointer is passed, that pointer does not become invalid. 50.Pp 51The ASN.1 NULL type is also represented by the 52.Dv V_ASN1_NULL 53type identifier constant. 54.Sh SEE ALSO 55.Xr ASN1_item_new 3 , 56.Xr d2i_ASN1_NULL 3 57.Sh STANDARDS 58ITU-T Recommendation X.208, also known as ISO/IEC 8824-1: 59Specification of Abstract Syntax Notation One (ASN.1), 60section 19: Notation for the null type 61.Sh HISTORY 62.Fn ASN1_NULL_new 63and 64.Fn ASN1_NULL_free 65first appeared in OpenSSL 0.9.5 and have been available since 66.Ox 2.7 . 67