The default digest algorithm is SHA-1, per the OpenSSL documentation.
The "default" algorithm used for signing is determined by the type of key present in the x509 certificate you pass in for the signkey
parameter. Generally speaking, this is going to be an RSA key, but it can also be a DSA key.