mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-06 12:30:31 +00:00
See ChangeLog
Monotone-Parent: ec4781f04b708ab2a5944c8097cb08a1e608213e Monotone-Revision: b7ca5a591c7686be57e44bf98aae0c7b148afa20 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-08-03T14:49:28
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#import <GDLAccess/EOAdaptorContext.h>
|
||||
#import <GDLAccess/EOAttribute.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
@@ -139,6 +141,16 @@
|
||||
{
|
||||
return [plainPassword isEqualToString: encryptedPassword];
|
||||
}
|
||||
else if ([_userPasswordAlgorithm caseInsensitiveCompare: @"crypt"] == NSOrderedSame)
|
||||
{
|
||||
NSString *s;
|
||||
char *buf;
|
||||
|
||||
buf = (char *)crypt([plainPassword UTF8String], [encryptedPassword UTF8String]);
|
||||
s = [NSString stringWithUTF8String: buf];
|
||||
|
||||
return [s isEqualToString: encryptedPassword];
|
||||
}
|
||||
else if ([_userPasswordAlgorithm caseInsensitiveCompare: @"md5"] == NSOrderedSame)
|
||||
{
|
||||
NSString *s;
|
||||
|
||||
Reference in New Issue
Block a user