Is it possible to receive a certificate request (CSR) and convert it to a self-signed X509 Certificate without having access to the private key that signed the CSR? I want to do the following: receive CSR from a client and translate it directly to a self-signed X509 Certificate as if it was the client to self-sign it (it is redudant I know but it is for a project). Basically I want to copy a CSR to a X509 certificate without signing the certificate. I would want to do this for example openssl or golang (for the purpose of this question openssl is enough).
By definition, a self-signed certificate is the certificate that uses private key associated with the public key in the certificate to sign itself. Public key in the certificate is used to verify the signature of the same certificate. As the result:
convert it to a self-signed X509 Certificate without having access to the private key that signed the CSR?
Let clients to generate their own self-signed certificates on their own. It is another story if you have a CA and can access CA private key to sign CSR and issue the signed certificate, but it is not your case.
Bottom line: when I hear about clients and self-signed certificates, I smell a poor and flawed design. Even for private use, I always recommend to use standard CA software to issue centralized certificates, perform validation, maintain revocation and much more.