mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
cleanups for SSL/TLS support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35596 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2539f6207c
commit
46ef4c971e
6 changed files with 50 additions and 9 deletions
|
@ -8,6 +8,11 @@
|
|||
using GNUTLS.
|
||||
* Source/NSFileHandle.m: Some ssl/tls restructuring, use GNUTLS if
|
||||
available.
|
||||
* configure.ac: Don't build SSL bundle if isupport is built-in.
|
||||
* GNUmakefile: ditto
|
||||
* base.make.in: ditto ... plus fix to define setting to show whether
|
||||
ICU is avaiable.
|
||||
* configure: regenerate
|
||||
|
||||
2012-09-23 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
|
|
|
@ -65,9 +65,11 @@ include ./Version
|
|||
# The list of subproject directories
|
||||
#
|
||||
SUBPROJECTS = Source
|
||||
ifeq ($(GNUSTEP_BASE_HAVE_GNUTLS), 0)
|
||||
ifneq ($(GNUSTEP_TARGET_OS), mingw32)
|
||||
SUBPROJECTS += SSL
|
||||
endif
|
||||
endif
|
||||
SUBPROJECTS += Tools NSTimeZones Resources Tests
|
||||
|
||||
-include Makefile.preamble
|
||||
|
|
|
@ -45,6 +45,13 @@
|
|||
#import "GSSocketStream.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
||||
/* Perhaps thse should be elsewhere ... maybe in a new file along with
|
||||
* the gnutls infrastructure.
|
||||
*/
|
||||
NSString * const GSTLSCertificateFileKey = @"GSTLSCertificateFileKey";
|
||||
NSString * const GSTLSPrivateKeyFileKey = @"GSTLSPrivateKeyFile";
|
||||
NSString * const GSTLSPrivateKeyPasswordKey = @"GSTLSPrivateKeyPassword";
|
||||
|
||||
#ifndef SHUT_RD
|
||||
# ifdef SD_RECEIVE
|
||||
# define SHUT_RD SD_RECEIVE
|
||||
|
@ -490,10 +497,6 @@ _verify_certificate_callback (gnutls_session_t session)
|
|||
return 0;
|
||||
}
|
||||
|
||||
NSString * const GSTLSCertificateFileKey = @"GSTLSCertificateFileKey";
|
||||
NSString * const GSTLSPrivateKeyFileKey = @"GSTLSPrivateKeyFile";
|
||||
NSString * const GSTLSPrivateKeyPasswordKey = @"GSTLSPrivateKeyPassword";
|
||||
|
||||
/* This class is used to ensure that the GNUTLS system is initialised
|
||||
* and thread-safe.
|
||||
*/
|
||||
|
|
19
base.make.in
19
base.make.in
|
@ -62,11 +62,28 @@ ifeq ($(BASE_MAKE_LOADED),)
|
|||
# string as UTF-8
|
||||
AUXILIARY_OBJCFLAGS += @GS_EXEC_CHARSET@
|
||||
|
||||
|
||||
# Now we have definitions to show whether important dependencies have
|
||||
# been met ... if thse are 0 then some core functi0nailyt is missing.
|
||||
|
||||
# Has GNUTLS been found (for TLS/SSL support throughout)?
|
||||
GNUSTEP_BASE_HAVE_GNUTLS=@HAVE_GNUTLS@
|
||||
|
||||
# Has libxml2 been found (for NSXMLNode and related classes)?
|
||||
GNUSTEP_BASE_HAVE_LIBXML=@HAVE_LIBXML@
|
||||
|
||||
# Has ICU been found (for NSCalendar, NSLocale, and other locale related)?
|
||||
GNUSTEP_BASE_HAVE_ICU=@HAVE_ICU@
|
||||
|
||||
|
||||
# The next two are a special case ... we should have either one defined
|
||||
# for netservices. FIXME ... shouldn't these be combined?
|
||||
|
||||
# Has MDNS been found (one of two options for NSNetServices)?
|
||||
GNUSTEP_BASE_HAVE_MDNS=@HAVE_MDNS@
|
||||
|
||||
# Has Avahi been found (one of two options for NSNetServices)?
|
||||
GNUSTEP_BASE_HAVE_AVAHI=@HAVE_AVAHI@
|
||||
GNUSTEP_BASE_HAVE_UCI=@HAVE_UCI@
|
||||
|
||||
# If we determined that the Objective-C runtime does not support
|
||||
# native Objective-C exceptions, turn them off. This overrides
|
||||
|
|
11
configure
vendored
11
configure
vendored
|
@ -24838,8 +24838,8 @@ $as_echo "$as_me: WARNING: Missing support for thread-safe operation in GNUTLS.
|
|||
$as_echo "no" >&6; }
|
||||
echo
|
||||
echo "You do not appear to have usable libgnutls headers/library."
|
||||
echo "Building without them will disable SSL/TLS/HTTPS in NSStream"
|
||||
echo "and NSURLConnection."
|
||||
echo "Building without them will disable SSL/TLS/HTTPS in NSStream,"
|
||||
echo "NSFileHandle, NSURLHandle and NSURLConnection."
|
||||
echo "If you really want to build gnustep-base without TLS support,"
|
||||
echo "add --disable-tls to the configure arguments."
|
||||
{ { $as_echo "$as_me:$LINENO: error: Missing support for TLS functionality." >&5
|
||||
|
@ -26836,6 +26836,11 @@ fi
|
|||
|
||||
|
||||
|
||||
# If there's no TLS support ... try to get some limited functionality
|
||||
# by using OpenSSL instead.
|
||||
|
||||
if test "$HAVE_TLS" = "0"; then
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Configure flags from sub-configure runs, so they show up in our
|
||||
# help file.
|
||||
|
@ -26847,6 +26852,7 @@ else
|
|||
enable_openssl=yes
|
||||
fi
|
||||
|
||||
HAVE_GNUTLS=0
|
||||
|
||||
# Check whether --with-openssl-include was given.
|
||||
if test "${with_openssl_include+set}" = set; then
|
||||
|
@ -26868,6 +26874,7 @@ fi
|
|||
|
||||
subdirs="$subdirs SSL"
|
||||
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Record the version
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -3064,8 +3064,8 @@ if test $enable_tls = yes; then
|
|||
AC_MSG_RESULT(no)
|
||||
echo
|
||||
echo "You do not appear to have usable libgnutls headers/library."
|
||||
echo "Building without them will disable SSL/TLS/HTTPS in NSStream"
|
||||
echo "and NSURLConnection."
|
||||
echo "Building without them will disable SSL/TLS/HTTPS in NSStream,"
|
||||
echo "NSFileHandle, NSURLHandle and NSURLConnection."
|
||||
echo "If you really want to build gnustep-base without TLS support,"
|
||||
echo "add --disable-tls to the configure arguments."
|
||||
AC_MSG_ERROR([Missing support for TLS functionality.])
|
||||
|
@ -3360,6 +3360,11 @@ fi
|
|||
|
||||
AC_SUBST(GNUSTEP_INSTALL_GDOMAP_AS_SETUID)
|
||||
|
||||
# If there's no TLS support ... try to get some limited functionality
|
||||
# by using OpenSSL instead.
|
||||
|
||||
if test "$HAVE_TLS" = "0"; then
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Configure flags from sub-configure runs, so they show up in our
|
||||
# help file.
|
||||
|
@ -3367,6 +3372,7 @@ AC_SUBST(GNUSTEP_INSTALL_GDOMAP_AS_SETUID)
|
|||
AC_ARG_ENABLE(openssl,
|
||||
[ --disable-openssl Disable support for openssl in URL classes],,
|
||||
enable_openssl=yes)
|
||||
HAVE_GNUTLS=0
|
||||
AC_ARG_WITH(openssl-include,
|
||||
[ --with-openssl-include=PATH include path for openssl headers],
|
||||
openssl_incdir="$withval", openssl_incdir="no")
|
||||
|
@ -3375,6 +3381,7 @@ AC_ARG_WITH(openssl-library,
|
|||
openssl_libdir="$withval", openssl_libdir="no")
|
||||
|
||||
AC_CONFIG_SUBDIRS(SSL)
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Record the version
|
||||
|
|
Loading…
Reference in a new issue