You need to have a valid openssl.cnf installed for this function to operate correctly. See the notes under the installation section for more information.