Style fixes, build fix with OpenSSL disabled.
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
#include "CertificatePrivate.h"
|
#include "CertificatePrivate.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OPENSSL_ENABLED
|
||||||
|
|
||||||
|
|
||||||
static time_t parse_ASN1(ASN1_GENERALIZEDTIME *asn1)
|
static time_t parse_ASN1(ASN1_GENERALIZEDTIME *asn1)
|
||||||
{
|
{
|
||||||
// Get the raw string data out of the ASN1 container. It looks like this:
|
// Get the raw string data out of the ASN1 container. It looks like this:
|
||||||
@@ -103,3 +106,52 @@ BCertificate::Private::Private(X509* data)
|
|||||||
: fX509(data)
|
: fX509(data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
BCertificate::BCertificate(Private* data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BCertificate::~BCertificate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BString
|
||||||
|
BCertificate::String()
|
||||||
|
{
|
||||||
|
return BString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bigtime_t
|
||||||
|
BCertificate::StartDate()
|
||||||
|
{
|
||||||
|
return B_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bigtime_t
|
||||||
|
BCertificate::ExpirationDate()
|
||||||
|
{
|
||||||
|
return B_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BString
|
||||||
|
BCertificate::Issuer()
|
||||||
|
{
|
||||||
|
return BString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BString
|
||||||
|
BCertificate::Subject()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ status_t
|
|||||||
BFileRequest::_ProtocolLoop()
|
BFileRequest::_ProtocolLoop()
|
||||||
{
|
{
|
||||||
BNode node(fUrl.Path().String());
|
BNode node(fUrl.Path().String());
|
||||||
if (node.IsSymLink())
|
if (node.IsSymLink()) {
|
||||||
{
|
|
||||||
// Traverse the symlink and start over
|
// Traverse the symlink and start over
|
||||||
BEntry entry(fUrl.Path().String(), true);
|
BEntry entry(fUrl.Path().String(), true);
|
||||||
node = BNode(&entry);
|
node = BNode(&entry);
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
if [ FIsBuildFeatureEnabled openssl ] {
|
if [ FIsBuildFeatureEnabled openssl ] {
|
||||||
SubDirC++Flags -DOPENSSL_ENABLED ;
|
SubDirC++Flags -DOPENSSL_ENABLED ;
|
||||||
UseBuildFeatureHeaders openssl ;
|
UseBuildFeatureHeaders openssl ;
|
||||||
sslSources = SSL.cpp Certificate.cpp ;
|
sslSources = SSL.cpp ;
|
||||||
md5Sources = ;
|
md5Sources = ;
|
||||||
Includes [ FGristFiles $(sslSources) SecureSocket.cpp
|
Includes [ FGristFiles $(sslSources) SecureSocket.cpp
|
||||||
HttpAuthentication.cpp ]
|
HttpAuthentication.cpp Certificate.cpp ]
|
||||||
: [ BuildFeatureAttribute openssl : headers ] ;
|
: [ BuildFeatureAttribute openssl : headers ] ;
|
||||||
# Dependency needed to trigger downloading/unzipping the package before
|
# Dependency needed to trigger downloading/unzipping the package before
|
||||||
# compiling the files.
|
# compiling the files.
|
||||||
@@ -37,6 +37,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
NetDebug.cpp
|
NetDebug.cpp
|
||||||
|
|
||||||
$(sslSources)
|
$(sslSources)
|
||||||
|
Certificate.cpp
|
||||||
|
|
||||||
NetworkAddress.cpp
|
NetworkAddress.cpp
|
||||||
NetworkAddressResolver.cpp
|
NetworkAddressResolver.cpp
|
||||||
|
|||||||
@@ -174,8 +174,7 @@ BSecureSocket::Connect(const BNetworkAddress& peer, bigtime_t timeout)
|
|||||||
TRACE("SSLConnection can't connect\n");
|
TRACE("SSLConnection can't connect\n");
|
||||||
BSocket::Disconnect();
|
BSocket::Disconnect();
|
||||||
|
|
||||||
switch(SSL_get_error(fPrivate->fSSL, sslStatus))
|
switch (SSL_get_error(fPrivate->fSSL, sslStatus)) {
|
||||||
{
|
|
||||||
case SSL_ERROR_NONE:
|
case SSL_ERROR_NONE:
|
||||||
// Shouldn't happen...
|
// Shouldn't happen...
|
||||||
return B_NO_ERROR;
|
return B_NO_ERROR;
|
||||||
|
|||||||
Reference in New Issue
Block a user