---
name: "libressl-X509_SIG_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-X509_SIG_new"
---

# libressl-X509\_SIG\_new(3)

PKCS#7 digest information

## NAME

**X509\_SIG\_new**, **X509\_SIG\_free** – PKCS#7 digest information

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*X509\_SIG* *\**\

**X509\_SIG\_new**(*void*);

*void*\

**X509\_SIG\_free**(*X509\_SIG \*sig*);

## DESCRIPTION

**X509\_SIG\_new**() allocates and initializes an empty *X509\_SIG* object, representing an ASN.1 *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.

**X509\_SIG\_free**() frees *sig*.

## RETURN VALUES

**X509\_SIG\_new**() returns the new *X509\_SIG* object or NULL if an error occurs.

## SEE ALSO

d2i\_X509\_SIG(3), PEM\_read\_PKCS8(3), RSA\_sign(3), X509\_new(3), X509\_SIG\_get0(3)

## STANDARDS

RFC 2315: PKCS #7: Cryptographic Message Syntax, section 9: Signed-data content type

RFC 8017: PKCS #1: RSA Cryptography Specifications, section 9: Encoding Methods for Signatures

## HISTORY

**X509\_SIG\_new**() and **X509\_SIG\_free**() appeared in SSLeay 0.4 or earlier and have been available since OpenBSD 2.4.
