1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
.\" $OpenBSD: X509_SIG_new.3,v 1.3 2018/03/21 03:16:08 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 21 2018 $
.Dt X509_SIG_NEW 3
.Os
.Sh NAME
.Nm X509_SIG_new ,
.Nm X509_SIG_free
.Nd PKCS#7 digest information
.Sh SYNOPSIS
.In openssl/x509.h
.Ft X509_SIG *
.Fn X509_SIG_new void
.Ft void
.Fn X509_SIG_free "X509_SIG *sig"
.Sh DESCRIPTION
.Fn X509_SIG_new
allocates and initializes an empty
.Vt X509_SIG
object, representing an ASN.1
.Vt DigestInfo
structure defined in RFC 2315 section 9.4
and equivalently in RFC 8017 section 9.2.
It can hold a message digest together with information about
the algorithm used.
.Pp
.Fn X509_SIG_free
frees
.Fa sig .
.Sh RETURN VALUES
.Fn X509_SIG_new
returns the new
.Vt X509_SIG
object or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr d2i_X509_SIG 3 ,
.Xr PEM_read_PKCS8 3 ,
.Xr RSA_sign 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 2315: PKCS #7: Cryptographic Message Syntax,
section 9: Signed-data content type
.Pp
RFC 8017: PKCS #1: RSA Cryptography Specifications,
section 9: Encoding Methods for Signatures
.Sh HISTORY
.Fn X509_SIG_new
and
.Fn X509_SIG_free
appeared before SSLeay 0.8 and have been available since
.Ox 2.4 .
|