From 4a20959d2e3c90e9d66897c0b4032c785672d815 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 13 Feb 2014 16:38:32 +1100 Subject: - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}] Add compat code for older OpenSSL versions that don't have EVP_MD_CTX_copy_ex. --- openbsd-compat/openssl-compat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'openbsd-compat/openssl-compat.c') diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 60eac4b17..885c121f2 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.c,v 1.16 2014/01/17 07:00:41 dtucker Exp $ */ +/* $Id: openssl-compat.c,v 1.17 2014/02/13 05:38:33 dtucker Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -96,6 +96,14 @@ ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt) } #endif +#ifndef HAVE_EVP_MD_CTX_COPY_EX +int +EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) +{ + return EVP_MD_CTX_copy(out, in); +} +#endif + #ifndef HAVE_BN_IS_PRIME_EX int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, void *cb) -- cgit v1.2.3