I have a server which has its own cert and a client who is trying to have the server generate a new cert for him (and sign it ofc). The client has given the server his public key and the server is supposed to create a cert and sign it. In PHP, how do I have the server create the cert with only the clients public key? openssl_csr_new seems to want the private key.
Thanks!
you can do this with the latest SVN of phpseclib, a pure PHP X.509 parser. eg.
You’ll need your private key and the subjects public key. In this example, I’m getting the issuing DN from a X.509 previously signed by with your private key but you might want to call setDN() instead?