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