aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/file_id.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-27 14:30:58 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-27 14:30:58 +0000
commite919fdd63b4550a3261422ffde3c8d631007f75b (patch)
treeadb0d1b3b2db96e01a9dbecd5e0f0e9cd015b275 /src/common/mac/file_id.cc
parentSwitch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a FILE*... (diff)
downloadbreakpad-e919fdd63b4550a3261422ffde3c8d631007f75b.tar.xz
Wean Mac Breakpad off of its OpenSSL libcrypto dependency.
This libcrypto dependency sucks. Linking against OpenSSL is sort of broken in certain Mac OS X SDKs. libcrypto was only being used to provide an MD5 implementation. Breakpad already has its own MD5 implementation, so just use that instead. To be perfectly honest, on modern systems, nothing should be making MD5 hashes of modules anyway, because everything has an embedded LC_UUID. The project file changes just remove libcrypto and add md5.c as needed. A bonus (and untested) fix for on_demand_symbol_supplier.mm is included to account for changes in r794. Review URL: http://breakpad.appspot.com/296001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@819 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac/file_id.cc')
-rw-r--r--src/common/mac/file_id.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc
index ebb8c40e..50502e4c 100644
--- a/src/common/mac/file_id.cc
+++ b/src/common/mac/file_id.cc
@@ -53,19 +53,19 @@ bool FileID::FileIdentifier(unsigned char identifier[16]) {
if (fd == -1)
return false;
- MD5_CTX md5;
- MD5_Init(&md5);
+ MD5Context md5;
+ MD5Init(&md5);
// Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but
// doesn't seem to be an unreasonable size for the stack.
unsigned char buffer[4096 * 2];
size_t buffer_size = sizeof(buffer);
while ((buffer_size = read(fd, buffer, buffer_size) > 0)) {
- MD5_Update(&md5, buffer, buffer_size);
+ MD5Update(&md5, buffer, buffer_size);
}
close(fd);
- MD5_Final(identifier, &md5);
+ MD5Final(identifier, &md5);
return true;
}