diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-11-10 21:37:13 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-11-10 21:37:13 +0000 |
commit | 7d28c069875e58a0a6640684a379fe6d2aaf69b6 (patch) | |
tree | a2a01fdffbf4495fccd17a16f442d128e0bfe0cf /lib/gnutls_global.c | |
parent | d4b8f2c7eea4246a6e2d1dee4118f0bd8ebd20e6 (diff) | |
download | gnutls-7d28c069875e58a0a6640684a379fe6d2aaf69b6.tar.gz |
several fixes.
Including:
- max_record_header extension.
- resume handshake sending wrong ssl version
- Non blocking IO (not ready yet)
Diffstat (limited to 'lib/gnutls_global.c')
-rw-r--r-- | lib/gnutls_global.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 207a624e7c..4adb3081bb 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -23,22 +23,6 @@ #include <x509_asn1.h> #include <gnutls_dh.h> -#ifdef USE_SIGNALS - -# ifdef HAVE_SIGNAL_H -# include <signal.h> -# endif - -# ifndef SIGFUNC -# define SIGFUNC - typedef void Sigfunc(int); -# endif -static Sigfunc *Signal( int signo, Sigfunc *func); - -static Sigfunc *old_sig_handler; - -#endif - /* created by asn1c */ extern const static_asn pkcs1_asn1_tab[]; @@ -93,10 +77,6 @@ static void dlog( const char* str) { * You must call gnutls_global_deinit() when gnutls usage is no longer needed * Returns zero on success. * - * If signals are supported in your system, this function sets SIGPIPE, - * to SIG_IGN. The old signal handler will be restored when calling - * gnutls_global_deinit(). - * **/ int gnutls_global_init() { @@ -105,11 +85,6 @@ int gnutls_global_init() /* for gcrypt in order to be able to allocate memory */ gcry_set_allocation_handler(gnutls_malloc, secure_malloc, _gnutls_is_secure_memory, gnutls_realloc, gnutls_free); - /* we need this */ -#ifdef USE_SIGNALS - old_sig_handler = Signal( SIGPIPE, SIG_IGN); -#endif - /* set default recv/send functions */ gnutls_global_set_log_func( dlog); @@ -147,10 +122,6 @@ int gnutls_global_init() void gnutls_global_deinit() { - /* restore signal handler */ -#ifdef USE_SIGNALS - Signal( SIGPIPE, old_sig_handler); -#endif asn1_delete_structure( PKCS1_ASN); asn1_delete_structure( PKIX1_ASN); @@ -158,45 +129,6 @@ void gnutls_global_deinit() { } -#ifdef USE_SIGNALS - -/* This is an emulation of the signal() function, using the - * POSIX sigaction() (if present). - */ -static Sigfunc * - Signal(int signo, Sigfunc * func) -{ -#ifdef HAVE_SIGACTION - - struct sigaction act, oact; - - act.sa_handler = func; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - if (signo == SIGALRM) { -#ifdef SA_INTERRUPT - act.sa_flags |= SA_INTERRUPT; /* SunOs 4.x */ -#endif - } else { -#ifdef SA_RESTART - act.sa_flags |= SA_RESTART; /* SVR4, 4.4BSD */ -#endif - } - - if (sigaction(signo, &act, &oact) < 0) - return (SIG_ERR); - return (oact.sa_handler); - -#else /* ifdef HAVE_SIGACTION */ -#ifdef HAVE_SIGNAL - return signal(signo, func); -#else - return (Sigfunc *) 0; /* Do nothing */ -#endif /* HAVE_SIGNAL */ -#endif /* HAVE_SIGACTION */ -} -#endif /* USE_SIGNALS */ - /* These functions should be elsewere. Kept here for * historical reasons. |