Skip to content

Commit

Permalink
Add missing creating of md_ctx in openssl_digest
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Jul 17, 2016
1 parent 444adff commit 329f74a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5816,6 +5816,7 @@ PHP_FUNCTION(openssl_digest)
siglen = EVP_MD_size(mdtype);
sigbuf = zend_string_alloc(siglen, 0);

md_ctx = EVP_MD_CTX_create();
if (EVP_DigestInit(md_ctx, mdtype) &&
EVP_DigestUpdate(md_ctx, (unsigned char *)data, data_len) &&
EVP_DigestFinal (md_ctx, (unsigned char *)ZSTR_VAL(sigbuf), &siglen)) {
Expand Down

0 comments on commit 329f74a

Please sign in to comment.