--- a/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m Sun Jun 23 13:32:14 2013 +0200
+++ b/Plugins/Purple Service/AIPurpleCertificateTrustWarningAlert.m Tue Jun 25 21:41:03 2013 +0200
@@ -26,8 +26,6 @@
//#define ALWAYS_SHOW_TRUST_WARNING
-static NSMutableDictionary *acceptedCertificates = nil;
@interface AIPurpleCertificateTrustWarningAlert ()
- (id)initWithAccount:(AIAccount*)account
hostname:(NSString*)hostname
@@ -80,8 +78,6 @@
if((self = [super init])) {
- if(!acceptedCertificates)
- acceptedCertificates = [[NSMutableDictionary alloc] init];
query_cert_cb = _query_cert_cb;
@@ -111,23 +107,6 @@
err = SecCertificateGetData((SecCertificateRef)CFArrayGetValueAtIndex(certificates, 0), &data);
- // Did we ask the user to confirm this certificate before?
- // Note that this information is not stored on the disk, which is on purpose.
- NSUInteger oldCertHash = [[acceptedCertificates objectForKey:hostname] unsignedIntegerValue];
- NSData *certData = [[NSData alloc] initWithBytesNoCopy:data.Data length:data.Length freeWhenDone:NO];
- NSUInteger newCertHash = [certData hash];
- if (oldCertHash == newCertHash) {
- query_cert_cb(true, userdata);
err = SecPolicySearchCreate(CSSM_CERT_X_509v3, &CSSMOID_APPLE_TP_SSL, NULL, &searchRef);
@@ -166,8 +145,6 @@
@@ -285,7 +262,7 @@
didEndSelector:@selector(certificateTrustSheetDidEnd:returnCode:contextInfo:)
@@ -299,17 +276,6 @@
NSWindow *parentWindow = (NSWindow *)contextInfo;
query_cert_cb(didTrustCerficate, userdata);
- /* If the user confirmed this cert, we store this information until the app is closed so the user doesn't have to re-confirm it every time
- * (doing otherwise might be particularily annoying on auto-reconnect)
- if (didTrustCerficate) {
- OSStatus err = SecCertificateGetData((SecCertificateRef)CFArrayGetValueAtIndex(certificates, 0), &certdata);
- [acceptedCertificates setObject:[NSNumber numberWithUnsignedInteger:[[NSData dataWithBytes:certdata.Data length:certdata.Length] hash]]