Perhaps it would help noting the version of OpenSSL you are using and maybe you are using an too old version of OpenSSL.