To generate a Certificate Sign Request with SHA256 hashing algorithm and 4096 bits encryption key with openssl:
openssl genrsa -out example.com.key 4096
openssl req -new -sha256 -key example.com.key -out example.com.csr
Or all in one:
openssl req -nodes -newkey rsa:4096 -sha256 -keyout example.com.key -out example.com.csr