D2I_PROXY_POLICY(3)

NAME
d2i_PROXY_POLICY, i2d_PROXY_POLICY, d2i_PROXY_CERT_INFO_EXTENSION, i2d_PROXY_CERT_INFO_EXTENSION - decode and encode X.509 proxy certificate extensions

SYNOPSIS
#include <openssl/x509v3.h>
PROXY_POLICY *
d2i_PROXY_POLICY(PROXY_POLICY **val_out, const unsigned char **der_in, long length);
int
i2d_PROXY_POLICY(PROXY_POLICY *val_in, unsigned char **der_out);
PROXY_CERT_INFO_EXTENSION *
d2i_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION **val_out, const unsigned char **der_in, long length);
int
i2d_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION *val_in, unsigned char **der_out);

DESCRIPTION
These functions encode and decode X.509 extensions that decide whether a certificate is a proxy certificate, and which policies apply to it. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3).

d2i_PROXY_POLICY() and i2d_PROXY_POLICY() decode and encode an ASN.1 ProxyPolicy structure defined in RFC 3820 section 3.8.

d2i_PROXY_CERT_INFO_EXTENSION() and i2d_PROXY_CERT_INFO_EXTENSION() decode and encode an ASN.1 ProxyCertInfo structure defined in RFC 3820 section 3.8.

RETURN VALUES
d2i_PROXY_POLICY() and d2i_PROXY_CERT_INFO_EXTENSION() return a PROXY_POLICY or PROXY_CERT_INFO_EXTENSION object, respectively, or NULL if an error occurs.

i2d_PROXY_POLICY() and i2d_PROXY_CERT_INFO_EXTENSION() return the number of bytes successfully encoded or a negative value if an error occurs.

SEE ALSO
ASN1_item_d2i(3), PROXY_POLICY_new(3), X509_EXTENSION_new(3)

STANDARDS
RFC 3820: Internet X.509 Public Key Infrastructure (PKI) Proxy Certificate Profile

HISTORY
These functions first appeared in OpenSSL 0.9.7g and have been available since OpenBSD 3.8.