Manual:D2i X509 ALGOR(3)
d2i_X509_ALGOR, i2d_X509_ALGOR - AlgorithmIdentifier functions.
#include <openssl/x509.h> X509_ALGOR *d2i_X509_ALGOR(X509_ALGOR **a, unsigned char **pp, long length); int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp);
These functions decode and encode an X509_ALGOR structure which is equivalent to the AlgorithmIdentifier structure.
Othewise these behave in a similar way to d2i_X509() and i2d_X509() described in the d2i_X509(3) manual page.