This question already has an answer here:
I have calculated n, e, d, p, q values of an RSA key. Now, how can I generate a private key file (pem or der) with openssl command line tools?
I was thinking about
openssl asn1parse -genconf asn1.cnf -noout -out asn1.der
but I cannot understand how to build the conf file.
The OpenSSL manpage for asn_generate_nconf comes with an example cnf for generating the private_key ASN.1 sequence that should work with your cmdline:
As an alternative rsatool.py can generate the base64 encoded ASN.1
privkey.pem
or plain asn.1 der sequence with a simple cmdlineor for output in ASN.1 der: