gnutls_state.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
00003  *
00004  * Author: Nikos Mavrogiannopoulos
00005  *
00006  * This file is part of GNUTLS.
00007  *
00008  * The GNUTLS library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00021  * USA
00022  *
00023  */
00024 
00025 #ifndef GNUTLS_STATE_H
00026 # define GNUTLS_STATE_H
00027 
00028 #include <gnutls_int.h>
00029 
00030 void MHD__gnutls_session_cert_type_set (MHD_gtls_session_t session,
00031                                         enum MHD_GNUTLS_CertificateType);
00032 enum MHD_GNUTLS_KeyExchangeAlgorithm MHD_gnutls_kx_get (MHD_gtls_session_t
00033                                                         session);
00034 enum MHD_GNUTLS_CipherAlgorithm MHD_gnutls_cipher_get (MHD_gtls_session_t
00035                                                        session);
00036 enum MHD_GNUTLS_CertificateType
00037 MHD_gnutls_certificate_type_get (MHD_gtls_session_t);
00038 
00039 #include <gnutls_auth_int.h>
00040 
00041 #define CHECK_AUTH(auth, ret) if (MHD_gtls_auth_get_type(session) != auth) { \
00042         MHD_gnutls_assert(); \
00043         return ret; \
00044         }
00045 
00046 #endif
00047 
00048 int MHD_gtls_session_cert_type_supported (MHD_gtls_session_t,
00049                                           enum MHD_GNUTLS_CertificateType);
00050 
00051 int MHD_gtls_dh_set_secret_bits (MHD_gtls_session_t session, unsigned bits);
00052 
00053 int MHD_gtls_dh_set_peer_public (MHD_gtls_session_t session, mpi_t public);
00054 int MHD_gtls_dh_set_group (MHD_gtls_session_t session, mpi_t gen,
00055                            mpi_t prime);
00056 
00057 int MHD_gtls_dh_get_allowed_prime_bits (MHD_gtls_session_t session);
00058 void MHD_gtls_handshake_internal_state_clear (MHD_gtls_session_t);
00059 
00060 int MHD_gtls_rsa_export_set_pubkey (MHD_gtls_session_t session,
00061                                     mpi_t exponent, mpi_t modulus);
00062 
00063 int MHD_gtls_session_is_resumable (MHD_gtls_session_t session);
00064 int MHD_gtls_session_is_export (MHD_gtls_session_t session);
00065 
00066 int MHD_gtls_openpgp_send_fingerprint (MHD_gtls_session_t session);
00067 
00068 int MHD_gtls_PRF (MHD_gtls_session_t session,
00069                   const opaque * secret, int secret_size,
00070                   const char *label, int label_size,
00071                   const opaque * seed, int seed_size,
00072                   int total_bytes, void *ret);
00073 
00074 int MHD__gnutls_init (MHD_gtls_session_t * session,
00075                       MHD_gnutls_connection_end_t con_end);
00076 
00077 #define DEFAULT_CERT_TYPE MHD_GNUTLS_CRT_X509

Generated on Fri Feb 27 18:31:59 2009 for GNU libmicrohttpd by  doxygen 1.5.7.1