From 627ec355d8126b4dc564019bf09495aa1da301c7 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 20 Oct 2000 00:36:45 +0000 Subject: [PATCH] Fix for bug (?) in assembly language routines for SHA1. This causes MASM to complain and not produce valid debug info. Hopefully this wont break anything else... Also fix typo in e_rd.c --- CHANGES | 6 ++++++ crypto/evp/e_rd.c | 4 ++-- crypto/sha/asm/sha1-586.pl | 12 +++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 0d09b71ddb..c39eb584ff 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,12 @@ Changes between 0.9.6 and 0.9.7 [xx XXX 2000] + *) Fix for SHA1 assembly problem with MASM: it produces + warnings about corrupt line number information when assembling + with debugging information. This is caused by the overlapping + of two sections. + [Bernd Matthes , Steve Henson] + *) Fix typo in get_cert_by_subject() in by_dir.c [Jean-Marc Desperrier ] diff --git a/crypto/evp/e_rd.c b/crypto/evp/e_rd.c index e51d9bc1ec..78122edc7a 100644 --- a/crypto/evp/e_rd.c +++ b/crypto/evp/e_rd.c @@ -55,8 +55,8 @@ static EVP_CIPHER rd_cipher[3][3]; -static anSizes[]={16,24,32}; -static anNIDs[3][3]= +static int anSizes[]={16,24,32}; +static int anNIDs[3][3]= { { NID_rijndael_ecb_k128_b128,NID_rijndael_ecb_k192_b128,NID_rijndael_ecb_k256_b128 }, { NID_rijndael_ecb_k128_b192,NID_rijndael_ecb_k192_b192,NID_rijndael_ecb_k256_b192 }, diff --git a/crypto/sha/asm/sha1-586.pl b/crypto/sha/asm/sha1-586.pl index 09df993ecd..fe51fd0794 100644 --- a/crypto/sha/asm/sha1-586.pl +++ b/crypto/sha/asm/sha1-586.pl @@ -317,7 +317,7 @@ sub BODY_60_79 sub sha1_block_host { - local($name)=@_; + local($name, $sclabel)=@_; &function_begin_B($name,""); @@ -352,7 +352,7 @@ sub sha1_block_host &mov(&swtmp($i+0),$A); &mov(&swtmp($i+1),$B); } - &jmp(&label("shortcut")); + &jmp($sclabel); &function_end_B($name); } @@ -529,10 +529,12 @@ sub sha1_block_data &pop("esi"); &ret(); - # it has to reside within sha1_block_asm_host_order body - # because it calls &jmp(&label("shortcut")); - &sha1_block_host("sha1_block_asm_host_order"); + # keep a note of shortcut label so it can be used outside + # block. + my $sclabel = &label("shortcut"); &function_end_B($name); + # Putting this here avoids problems with MASM in debugging mode + &sha1_block_host("sha1_block_asm_host_order", $sclabel); } -- 2.25.1