Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
libssh.13787
0001-libcrypto-Use-a-pointer-for-EVP_MD_CTX.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-libcrypto-Use-a-pointer-for-EVP_MD_CTX.patch of Package libssh.13787
From 607c671f67de2443e39ef571122c0c0e0d150e3a Mon Sep 17 00:00:00 2001 From: Jakub Jelen <jjelen@redhat.com> Date: Sat, 5 Nov 2016 16:52:41 +0100 Subject: [PATCH] libcrypto: Use a pointer for EVP_MD_CTX This is for OpenSSL 1.1.0 support. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> --- src/libcrypto.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libcrypto.c b/src/libcrypto.c index 64c92eaa..622b4470 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -135,18 +135,19 @@ static const EVP_MD *nid_to_evpmd(int nid) void evp(int nid, unsigned char *digest, int len, unsigned char *hash, unsigned int *hlen) { const EVP_MD *evp_md = nid_to_evpmd(nid); - EVP_MD_CTX md; + EVP_MD_CTX *md = EVP_MD_CTX_new(); - EVP_DigestInit(&md, evp_md); - EVP_DigestUpdate(&md, digest, len); - EVP_DigestFinal(&md, hash, hlen); + EVP_DigestInit(md, evp_md); + EVP_DigestUpdate(md, digest, len); + EVP_DigestFinal(md, hash, hlen); + EVP_MD_CTX_free(md); } EVPCTX evp_init(int nid) { const EVP_MD *evp_md = nid_to_evpmd(nid); - EVPCTX ctx = malloc(sizeof(EVP_MD_CTX)); + EVPCTX ctx = EVP_MD_CTX_new(); if (ctx == NULL) { return NULL; } -- 2.13.5
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor