Created attachment 198088 [details] Fix OpenSSL 1.1.x build sysutils/ori: Fix OpenSSL build PR: 231931 Submitted by: Nathan <ndowens@yahoo.com>
+- EVP_MD_CTX ctx; ++ EVP_MD_CTX *ctx = NULL; + + assert(x509 != NULL && key != NULL); + +- EVP_VerifyInit(&ctx, EVP_sha256()); +- EVP_VerifyUpdate(&ctx, blob.data(), blob.size()); +- err = EVP_VerifyFinal(&ctx, (const unsigned char *)digest.data(), ++ EVP_VerifyInit(ctx, EVP_sha256()); ++ EVP_VerifyUpdate(ctx, blob.data(), blob.size()); ++ err = EVP_VerifyFinal(ctx, (const unsigned char *)digest.data(), + digest.length(), key); No. No memory was allocated here prior to calling EVP_VerifyInit().
Created attachment 198111 [details] OpenSSL 1.1 LLD fix sysutils/ori: Fix OpenSSL build PR: 231931 Submitted by: Nathan <ndowens@yahoo.com>
Created attachment 198112 [details] Fix OpenSSL 1.1.x build Missed one EVP_MD_CTX_new
Created attachment 198113 [details] V2 Not sure if this one or the other is the correct way to do this, so I added this one as well. I suspect this one is probably the correct way?
(In reply to Nathan from comment #4) V2 looks ok to me at a quick glance (I have not looked at the first version).
Adding upstream issue
I've made a few fixes to my upstream repository and plan to cut a new release and update the port this week. Sorry for the delay. I guess I'm not able to change the assignee?
(In reply to Ali Mashtizadeh from comment #7) Does attachment 198113 [details] resolve the issue correctly/completely? If so, it can be committed in lieu of upstream commits/merges/releases
(In reply to Kubilay Kocak from comment #8) I see a few bugs in the latest patch still. It was not freeing the structures that it allocated, and while the EVP_MD case was fixed to use 'new' to allocate a context, the cipher case was still just using 'ctx = NULL' with 'init' which is still wrong and needs to use 'new'. I also can't tell if from the phab URL this is supposed to be fixed upstream instead, but the phab review shows that the updated version from upstream is also broken.
This port expired because it depends on python27 and will be removed soon.