1.\" $OpenBSD: X509_SIG_new.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ 2.\" 3.\" Copyright (c) 2016 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: March 27 2018 $ 18.Dt X509_SIG_NEW 3 19.Os 20.Sh NAME 21.Nm X509_SIG_new , 22.Nm X509_SIG_free 23.Nd PKCS#7 digest information 24.Sh SYNOPSIS 25.In openssl/x509.h 26.Ft X509_SIG * 27.Fn X509_SIG_new void 28.Ft void 29.Fn X509_SIG_free "X509_SIG *sig" 30.Sh DESCRIPTION 31.Fn X509_SIG_new 32allocates and initializes an empty 33.Vt X509_SIG 34object, representing an ASN.1 35.Vt DigestInfo 36structure defined in RFC 2315 section 9.4 37and equivalently in RFC 8017 section 9.2. 38It can hold a message digest together with information about 39the algorithm used. 40.Pp 41.Fn X509_SIG_free 42frees 43.Fa sig . 44.Sh RETURN VALUES 45.Fn X509_SIG_new 46returns the new 47.Vt X509_SIG 48object or 49.Dv NULL 50if an error occurs. 51.Sh SEE ALSO 52.Xr d2i_X509_SIG 3 , 53.Xr PEM_read_PKCS8 3 , 54.Xr RSA_sign 3 , 55.Xr X509_new 3 56.Sh STANDARDS 57RFC 2315: PKCS #7: Cryptographic Message Syntax, 58section 9: Signed-data content type 59.Pp 60RFC 8017: PKCS #1: RSA Cryptography Specifications, 61section 9: Encoding Methods for Signatures 62.Sh HISTORY 63.Fn X509_SIG_new 64and 65.Fn X509_SIG_free 66appeared in SSLeay 0.4 or earlier and have been available since 67.Ox 2.4 . 68