I am building an application and I am planning on using OpenSSL for securing data transfers.
I am planning on only having the client validate the server\'s certificate.
I am confused on how I should secure the server's certificate.
You don't have to secure the server's certificate. It's a public document
I would like to encrypt the server's certificate containing the private key
The server's certificate does not contain the private key.
but I do not want to use any hard coded keys for this encryption.
You don't need to do any encryption. The only server asset you need to protect is its private key, which is entirely distinct from its certificate. In the case of OpenSSL it can even be a different file.