Dear Dr.Pala,
You can take a look at
https://github.com/gost-engine/engine/blob/master/gost_eng.c
and use OBJ_create (https://www.openssl.org/docs/man3.0/man3/OBJ_create.html)
to register new NIDs.
If you want just PKI/CMS, it would be enough.
I should notice that ENGINE interface is deprecated
Dear OpenSSL,
I have a question for the community. Specifically, I am changing the
implementation that we are working on for Composite Crypto from directly
patching the OpenSSL library with a new method, we want to add it
dynamically - this makes it easier to use Composite Crypto with existing