POP3: Remove direct usage of OpenSSL.
It already uses BSecureSocket without checking for USE_SSL, so just assume we have SSL no matter what.
This commit is contained in:
parent
954b54ba8d
commit
92bfd0e09e
@ -42,18 +42,14 @@ POP3ConfigView::POP3ConfigView(const BMailProtocolSettings& settings)
|
||||
| B_MAIL_PROTOCOL_HAS_HOSTNAME
|
||||
| B_MAIL_PROTOCOL_CAN_LEAVE_MAIL_ON_SERVER
|
||||
| B_MAIL_PROTOCOL_PARTIAL_DOWNLOAD
|
||||
#if USE_SSL
|
||||
| B_MAIL_PROTOCOL_HAS_FLAVORS
|
||||
#endif
|
||||
)
|
||||
{
|
||||
AddAuthMethod(B_TRANSLATE("Plain text"));
|
||||
AddAuthMethod(B_TRANSLATE("APOP"));
|
||||
|
||||
#if USE_SSL
|
||||
AddFlavor(B_TRANSLATE("No encryption"));
|
||||
AddFlavor(B_TRANSLATE("SSL"));
|
||||
#endif
|
||||
|
||||
SetTo(settings);
|
||||
|
||||
|
@ -9,32 +9,14 @@ UsePrivateHeaders mail shared ;
|
||||
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) headers os add-ons mail_daemon ] ;
|
||||
|
||||
local sources =
|
||||
AddResources POP3 : POP3.rdef ;
|
||||
|
||||
Addon POP3 :
|
||||
ConfigView.cpp
|
||||
MessageIO.cpp
|
||||
POP3.cpp
|
||||
md5c.c
|
||||
;
|
||||
|
||||
# use OpenSSL, if enabled
|
||||
if [ FIsBuildFeatureEnabled openssl ] {
|
||||
SubDirC++Flags -DUSE_SSL ;
|
||||
UseBuildFeatureHeaders openssl ;
|
||||
Includes [ FGristFiles $(sources) ]
|
||||
: [ BuildFeatureAttribute openssl : headers ] ;
|
||||
# Dependency needed to trigger downloading/unzipping the package before
|
||||
# compiling the files.
|
||||
SetupFeatureObjectsDir ssl ;
|
||||
} else {
|
||||
SetupFeatureObjectsDir no-ssl ;
|
||||
}
|
||||
|
||||
AddResources POP3 : POP3.rdef ;
|
||||
|
||||
Addon POP3
|
||||
: $(sources)
|
||||
: be libbnetapi.so libmail.so localestub
|
||||
[ BuildFeatureAttribute openssl : libraries ]
|
||||
[ TargetLibstdc++ ] [ TargetLibsupc++ ]
|
||||
$(TARGET_NETWORK_LIBS)
|
||||
;
|
||||
|
@ -22,11 +22,7 @@
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#if USE_SSL
|
||||
#include <openssl/md5.h>
|
||||
#else
|
||||
#include "md5.h"
|
||||
#endif
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
@ -814,15 +810,11 @@ POP3Protocol::MD5Digest(unsigned char* in, char* asciiDigest)
|
||||
{
|
||||
unsigned char digest[16];
|
||||
|
||||
#ifdef USE_SSL
|
||||
MD5(in, ::strlen((char*)in), digest);
|
||||
#else
|
||||
MD5_CTX context;
|
||||
|
||||
MD5Init(&context);
|
||||
MD5Update(&context, in, ::strlen((char*)in));
|
||||
MD5Final(digest, &context);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
sprintf(asciiDigest + 2 * i, "%02x", digest[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user