---
name: "libressl-X509_ocspid_print"
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_ocspid_print"
---

# libressl-X509\_ocspid\_print(3)

pretty-print hashes of subject name and public key

## NAME

**X509\_ocspid\_print** – pretty-print hashes of subject name and public key

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*int*\

**X509\_ocspid\_print**(*BIO \*bio*, *X509 \*issuer*);

## DESCRIPTION

**X509\_ocspid\_print**() produces human-readable output to *bio* containing hexadecimal representations of SHA-1 hashes of the DER-encoded forms of the subject name and the public key of the *issuer* certificate, as these hashes appear in OCSP requests.

## RETURN VALUES

**X509\_ocspid\_print**() returns 1 for success or 0 for failure.

## EXAMPLES

This function is used by the **-ocspid** flag of the [openssl(1)](/openssl/1.md) **x509** command.

## SEE ALSO

EVP\_sha1(3), i2d\_X509\_NAME(3), OCSP\_cert\_to\_id(3), OCSP\_REQUEST\_new(3), X509\_get\_pubkey(3), X509\_get\_subject\_name(3)

## HISTORY

**X509\_ocspid\_print**() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.2.
