Hello, > Some news about the crash. > On Windows this code will work: > EVP_MD_CTX Hash; > EVP_DigestInit_ex(&Hash,EVP_sha256(),NULL); > On Linux it be this to work: > EVP_MD_CTX Hash; > EVP_MD_CTX_init(&Hash); > EVP_DigestInit_ex(&Hash,EVP_sha256(),NULL); > Why must I call EVP_MD_CTX_init(&Hash) only under Linux???
$ man EVP_MD_CTX_init .. .. EVP_MD_CTX_init() initializes digest contet ctx. .. .. EVP_DigestInit_ex() sets up digest context ctx to use a digest type from ENGINE impl. ctx must be initialized before calling this function .... .. .. In other words you should initialize context on windows too. EVP_MD_CTX_init() only initialize memory used by context to zero, so on Windows you have luck and this chunk of memory is already zero (depends on compiler, options ...) on linux you have random data and crash. Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]