1. Changes for s_client.c to make it return non-zero exit code in case
[openssl.git] / engines / ccgost / gost_md.c
index 294a624d7d5dc67bbe73119df52a51d221f2d85a..417e10887bc29c8a5fdc7c1501fb350c1372c1d3 100644 (file)
@@ -59,9 +59,11 @@ int gost_digest_final(EVP_MD_CTX *ctx,unsigned char *md)
 
 int gost_digest_copy(EVP_MD_CTX *to,const EVP_MD_CTX *from) 
        {
-       if (to->md_data && from->md_data) 
-       memcpy(to->md_data,from->md_data,sizeof(struct ossl_gost_digest_ctx));
-
+       struct ossl_gost_digest_ctx *md_ctx=to->md_data;
+       if (to->md_data && from->md_data) {
+               memcpy(to->md_data,from->md_data,sizeof(struct ossl_gost_digest_ctx));
+               md_ctx->dctx.cipher_ctx=&(md_ctx->cctx);
+       }
        return 1;
        }