ASN1 function declarations

Viktor Dukhovni openssl-users at dukhovni.org
Tue Nov 22 23:10:11 UTC 2022


On Tue, Nov 22, 2022 at 11:09:07AM -0600, Nico Williams wrote:

> Also, the prototype for i2d_PUBKEY() does not appear in any header,
> public or private, but i2d_PUBKEY() _is_ documented -- is this a bug?

The d2i_* and i2d_* functions are mostly generated by macros that
declare all or some of the functions for a given ASN1 type:

    openssl/x509.h:DECLARE_ASN1_ENCODE_FUNCTIONS_only(EVP_PKEY, PUBKEY)
    openssl/x509.h:DECLARE_ASN1_FUNCTIONS(X509)

This can admittedly be a bit annoying when searching the right header is
more convenient that finding the right manpage, but search engines are
pretty good these days, and the openssl.org website has a doc index:

    https://www.openssl.org/docs/manpages.html
    https://www.openssl.org/docs/man3.0/man3/
    ...

-- 
    Viktor.


More information about the openssl-users mailing list