So I have my own CA for self-signing SSL certs, but I lost my root certificate. I have a few dependent certs that list the subject info of my root cert. I have my CA's private key and the password to unlock it. Given how public-key crypto works, it seems like it should be possible to re-create my root certificate from the key, but my google-foo and the manpage for openssl have failed me.
If you have stored the private key as PEM file you have a file which looks like this:
-----BEGIN RSA PRIVATE KEY----- base64 encoded data -----END RSA PRIVATE KEY-----
This file actually contains both the public and private key and the public key could be extracted by running
openssl pkey -pubout -in key.pem
To create a new CA based on this key just follow the usual instructions. The only difference is that you don't create a new key but use your existing one.
When creating the new CA make sure that you use exactly the the information as you did in the original certificate. They must match the issuer information in the already generated certificates. If they don't this new CA is not even considered as a possible issuer of the leaf certificate. But once these information match validation should be successful because still the same key was signed to use the certificate.