"Fossies" - the Fresh Open Source Software Archive

Member "ircd-hybrid-8.2.26/include/tls_gnutls.h" (31 May 2019, 1808 Bytes) of package /linux/privat/ircd-hybrid-8.2.26.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "tls_gnutls.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 8.2.24_vs_8.2.25.

    1 /*
    2  *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
    3  *
    4  *  Copyright (c) 2015 Attila Molnar <attilamolnar@hush.com>
    5  *  Copyright (c) 2015 Adam <Adam@anope.org>
    6  *  Copyright (c) 2015-2019 ircd-hybrid development team
    7  *
    8  *  This program is free software; you can redistribute it and/or modify
    9  *  it under the terms of the GNU General Public License as published by
   10  *  the Free Software Foundation; either version 2 of the License, or
   11  *  (at your option) any later version.
   12  *
   13  *  This program is distributed in the hope that it will be useful,
   14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16  *  GNU General Public License for more details.
   17  *
   18  *  You should have received a copy of the GNU General Public License
   19  *  along with this program; if not, write to the Free Software
   20  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
   21  *  USA
   22  */
   23 
   24 /*! \file tls_gnutls.h
   25  * \brief GnuTLS-specific TLS types
   26  * \version $Id: tls_gnutls.h 8751 2019-01-01 11:06:50Z michael $
   27  */
   28 
   29 
   30 #ifndef INCLUDED_tls_gnutls_h
   31 #define INCLUDED_tls_gnutls_h
   32 
   33 #if defined(HAVE_LIBGNUTLS) && !defined(HAVE_LIBCRYPTO)
   34 
   35 #define HAVE_TLS
   36 #define HAVE_TLS_GNUTLS
   37 
   38 #include <gnutls/gnutls.h>
   39 #include <gnutls/x509.h>
   40 
   41 enum { TLS_GNUTLS_MAX_HASH_SIZE = 64 };
   42 
   43 typedef gnutls_digest_algorithm_t tls_md_t;
   44 typedef struct gnutls_context * tls_context_t;
   45 
   46 struct gnutls_context
   47 {
   48   gnutls_certificate_credentials_t x509_cred;
   49   gnutls_priority_t priorities;
   50   gnutls_dh_params_t dh_params;
   51   unsigned int refs;
   52 };
   53 
   54 typedef struct
   55 {
   56   gnutls_session_t session;
   57   tls_context_t context;
   58 } tls_data_t;
   59 
   60 #endif  /* defined(HAVE_LIBGNUTLS) && !defined(HAVE_LIBCRYPTO) */
   61 #endif  /* INCLUDED_tls_openssl_h */