I am generating a private key with tomcat keystore. After the certificate request is generated and submitted, the server certificate seems to have signature SHA256RSA algorithm and eventually gives a "cannot establish chain from reply error". The root and intermediate certificates are all SHA1RSA. While generating the key pair and certificate request it has been specified as SHA1RSA to be the signature algorithm.
Could anyone assist as in how to generate the server certificate with SHA256RSA?
Here are the steps I followed (broken into multiple lines for readability):
keytool -genkey -dname "CN=xxxx, OU=Servers, O=xx, C=US" \
-alias tomcat -keyalg RSA -sigalg SHA1withRSA -keysize 2048 \
-keypass xxx -keystore tomcat2k.keystore
keytool -certreq -v -alias tomcat -keyalg RSA -sigalg SHA1withRSA \
-keysize 2048 -keypass xxx -file certreq.csr -keystore tomcat2k.keystore
Certificates received: Root, Intermediate (Both SHA1RSA), and Sever(SHA256RSA) Root.
Intermediate gets imported. Server Certificate fails to establish the chain.