adium/adium

SHA1 is deprecated, switch to CC_SHA1.
ARC
2012-04-30, Frank Dowsett
83faeadfec19
Parents 29c0924caedb
Children 8b28ca8ca7d5
SHA1 is deprecated, switch to CC_SHA1.
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvContactManagerRendezvous.m Mon Apr 30 18:59:40 2012 -0400
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvContactManagerRendezvous.m Mon Apr 30 19:34:32 2012 -0400
@@ -40,7 +40,7 @@
#import "AWEzvSupportRoutines.h"
#import <dns_sd.h>
-#import <openssl/sha.h>
+#import <CommonCrypto/CommonDigest.h>
/* One of the stupidest things I've ever met. Doing DNS lookups using the standard
* functions does not for mDNS records work unless you're in BIND 8 compatibility
@@ -331,7 +331,7 @@
- (void)setImageData:(NSData *)JPEGData
{
DNSServiceErrorType error;
- SHA_CTX ctx;
+ CC_SHA1_CTX ctx;
unsigned char digest[20];
if (avDNSReference == NULL) {
@@ -382,9 +382,9 @@
if (error == kDNSServiceErr_NoError) {
// Let's create the hash
- SHA1_Init(&ctx);
- SHA1_Update(&ctx, [JPEGData bytes], (unsigned long)[JPEGData length]);
- SHA1_Final(digest, &ctx);
+ CC_SHA1_Init(&ctx);
+ CC_SHA1_Update(&ctx, [JPEGData bytes], (CC_LONG)[JPEGData length]);
+ CC_SHA1_Final(digest, &ctx);
imagehash = [NSData dataWithBytes:digest length:20];
AILogWithSignature(@"Will update with hash %@; length is %u", imagehash, [JPEGData length]);
[self updatePHSH];