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

# libressl-d2i\_AUTHORITY\_KEYID(3)

decode and encode X.509 authority key identifiers

## NAME

**d2i\_AUTHORITY\_KEYID**, **i2d\_AUTHORITY\_KEYID** – decode and encode X.509 authority key identifiers

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

*AUTHORITY\_KEYID* *\**\

**d2i\_AUTHORITY\_KEYID**(*AUTHORITY\_KEYID \*\*val\_out*, *const unsigned char \*\*der\_in*, *long length*);

*int*\

**i2d\_AUTHORITY\_KEYID**(*AUTHORITY\_KEYID \*val\_in*, *unsigned char \*\*der\_out*);

## DESCRIPTION

**d2i\_AUTHORITY\_KEYID**() and **i2d\_AUTHORITY\_KEYID**() decode and encode an ASN.1 *AuthorityKeyIdentifier* structure  defined in RFC 5280 section 4.2.1.1. For details about the semantics, examples, caveats, and bugs, see ASN1\_item\_d2i(3).

## RETURN VALUES

**d2i\_AUTHORITY\_KEYID**() returns an *AUTHORITY\_KEYID* object or NULL if an error occurs.

**i2d\_AUTHORITY\_KEYID**() returns the number of bytes successfully encoded or a negative value if an error occurs.

## SEE ALSO

ASN1\_item\_d2i(3), AUTHORITY\_KEYID\_new(3), X509\_EXTENSION\_new(3)

## STANDARDS

RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile:

- section 4.2.1.1: Certificate Extensions: Authority Key Identifier

- section 5.2.1: CRL Extensions: Authority Key Identifier

## HISTORY

**d2i\_AUTHORITY\_KEYID**() and **i2d\_AUTHORITY\_KEYID**() first appeared in OpenSSL 0.9.2b and have been available since OpenBSD 2.6.
