diff options
| author | Peter Jones <pjones@redhat.com> | 2021-08-04 13:24:11 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-09-07 17:05:04 -0400 |
| commit | e13ac7386ea425c9222e05a2f9879d5af5cb91f6 (patch) | |
| tree | b4a9ee9785709a1ac74f1d8c3f431b481e8e960f /Cryptlib/Hash | |
| parent | 0837d010a6ee140ff3cc770aadc89fbb015a7ca2 (diff) | |
| download | efi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.tar.gz efi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.zip | |
Make CopyMem() work with EFI's declaration
EFI_BOOT_SERVICES includes CopyMem() and SetMem() functions which are
marked EFIAPI, and in the case of CopyMem() does not mark the source
argument as CONST.
This patch makes all our invocations work with that, so (once gnu-efi's
implementation is fixed to match) we can use the existing implementation
as the implementation in a mock EFI_BOOT_SERVICES.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/Hash')
| -rw-r--r-- | Cryptlib/Hash/CryptMd5.c | 2 | ||||
| -rw-r--r-- | Cryptlib/Hash/CryptSha1.c | 2 | ||||
| -rw-r--r-- | Cryptlib/Hash/CryptSha256.c | 2 | ||||
| -rw-r--r-- | Cryptlib/Hash/CryptSha512.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/Cryptlib/Hash/CryptMd5.c b/Cryptlib/Hash/CryptMd5.c index ccf6ad00..b389f0e1 100644 --- a/Cryptlib/Hash/CryptMd5.c +++ b/Cryptlib/Hash/CryptMd5.c @@ -93,7 +93,7 @@ Md5Duplicate ( return FALSE;
}
- CopyMem (NewMd5Context, Md5Context, sizeof (MD5_CTX));
+ CopyMem (NewMd5Context, (void *)Md5Context, sizeof (MD5_CTX));
return TRUE;
}
diff --git a/Cryptlib/Hash/CryptSha1.c b/Cryptlib/Hash/CryptSha1.c index 42cfd08a..3e67a805 100644 --- a/Cryptlib/Hash/CryptSha1.c +++ b/Cryptlib/Hash/CryptSha1.c @@ -92,7 +92,7 @@ Sha1Duplicate ( return FALSE;
}
- CopyMem (NewSha1Context, Sha1Context, sizeof (SHA_CTX));
+ CopyMem (NewSha1Context, (void *)Sha1Context, sizeof (SHA_CTX));
return TRUE;
}
diff --git a/Cryptlib/Hash/CryptSha256.c b/Cryptlib/Hash/CryptSha256.c index 06ecb2e9..05bc6b0a 100644 --- a/Cryptlib/Hash/CryptSha256.c +++ b/Cryptlib/Hash/CryptSha256.c @@ -91,7 +91,7 @@ Sha256Duplicate ( return FALSE;
}
- CopyMem (NewSha256Context, Sha256Context, sizeof (SHA256_CTX));
+ CopyMem (NewSha256Context, (void *)Sha256Context, sizeof (SHA256_CTX));
return TRUE;
}
diff --git a/Cryptlib/Hash/CryptSha512.c b/Cryptlib/Hash/CryptSha512.c index 3ce372a0..16063b23 100644 --- a/Cryptlib/Hash/CryptSha512.c +++ b/Cryptlib/Hash/CryptSha512.c @@ -93,7 +93,7 @@ Sha384Duplicate ( return FALSE;
}
- CopyMem (NewSha384Context, Sha384Context, sizeof (SHA512_CTX));
+ CopyMem (NewSha384Context, (void *)Sha384Context, sizeof (SHA512_CTX));
return TRUE;
}
@@ -308,7 +308,7 @@ Sha512Duplicate ( return FALSE;
}
- CopyMem (NewSha512Context, Sha512Context, sizeof (SHA512_CTX));
+ CopyMem (NewSha512Context, (void *)Sha512Context, sizeof (SHA512_CTX));
return TRUE;
}
|
