* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * */
+ *
+ */
+
+/* This file contains the Anonymous Diffie Hellman key exchange part of
+ * the anonymous authentication. The functions here are used in the
+ * handshake.
+ */
#include "gnutls_int.h"
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * */
+ *
+ */
+
+/* The certificate authentication functions which are needed in the handshake,
+ * and are common to RSA and DHE key exchange, are in this file.
+ */
#include <gnutls_int.h>
#include "gnutls_auth_int.h"
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * */
+ *
+ */
+/* This file contains everything for the Ephemeral Diffie Hellman (DHE)
+ * key exchange. This is used in the handshake procedure of the certificate
+ * authentication.
+ */
#include "gnutls_int.h"
#include "gnutls_auth_int.h"
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * */
+ *
+ */
+
+/* This file contains the RSA key exchange part of the certificate
+ * authentication.
+ */
#include "gnutls_int.h"
#include "gnutls_auth_int.h"
*
*/
+/* This file contains the code the Certificate Type TLS extension.
+ * This extension is currently gnutls specific.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_num.h"
*
*/
+/* This file contains the code for the Max Record Size TLS extension.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_num.h"
*
*/
-#include <gnutls_int.h>
-#include <gnutls_errors.h>
-#include <gnutls_num.h>
-#include <gnutls_record.h>
-#include <gnutls_buffers.h>
-#include <gnutls_datum.h>
-
/* This is the only file that uses the berkeley sockets API.
*
* Also holds all the buffering code used in gnutls.
*
*/
+#include <gnutls_int.h>
+#include <gnutls_errors.h>
+#include <gnutls_num.h>
+#include <gnutls_record.h>
+#include <gnutls_buffers.h>
+#include <gnutls_datum.h>
+
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
*
*/
+/* Some of the stuff needed for Certificate authentication is contained
+ * in this file.
+ */
+
#include <gnutls_int.h>
#include <gnutls_errors.h>
#include <auth_cert.h>
*
*/
+/* Some high level functions to be used in the record encryption are
+ * included here.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_compress.h"
*
*/
+/* This file contains the functions which convert the TLS plaintext
+ * packet to TLS compressed packet.
+ */
+
#include "gnutls_int.h"
#include "gnutls_compress.h"
#include "gnutls_errors.h"
*
*/
+/* Functions that are supposed to run after the handshake procedure is
+ * finished. These functions activate the established security parameters.
+ */
+
#include <gnutls_int.h>
#include <gnutls_constate.h>
#include <gnutls_errors.h>
*
*/
+/* contains functions that make it easier to
+ * write vectors of <size|data>. The destination size
+ * should be preallocated (datum.size+(bits/8))
+ */
+
#include <gnutls_int.h>
#include <gnutls_num.h>
#include <gnutls_datum.h>
#include <gnutls_errors.h>
-/* contains functions that make it easier to
- * write vectors of <size|data>. The destination size
- * should be preallocated (datum.size+(bits/8))
- */
void _gnutls_write_datum16( opaque* dest, gnutls_datum dat) {
_gnutls_write_uint16( dat.size, dest);
*
*/
-/* This file contains functions that manipulate a database
+/* This file contains functions that manipulate a database backend
* for resumed sessions.
*/
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_session.h"
#include "debug.h"
#include <gnutls_session_pack.h>
-#define GNUTLS_DBNAME state->gnutls_internals.db_name
-
/**
* gnutls_db_set_retrieve_function - Sets the function that will be used to get data
* @state: is a &GNUTLS_STATE structure.
gnutls_datum key = { session_id, session_id_size };
int ret;
- if (GNUTLS_DBNAME==NULL && _gnutls_db_func_is_ok(state)!=0) {
+ if (_gnutls_db_func_is_ok(state)!=0) {
gnutls_assert();
return GNUTLS_E_INVALID_SESSION;
}
return GNUTLS_E_INVALID_SESSION;
}
- if (GNUTLS_DBNAME==NULL && _gnutls_db_func_is_ok(state)!=0) {
+ if (_gnutls_db_func_is_ok(state)!=0) {
return GNUTLS_E_DB_ERROR;
}
{
int ret = 0;
- if (GNUTLS_DBNAME==NULL && _gnutls_db_func_is_ok(state)!=0) {
+ if (_gnutls_db_func_is_ok(state)!=0) {
return GNUTLS_E_DB_ERROR;
}
*
*/
+/* Functions that relate to the TLS hello extension parsing.
+ * Hello extensions are packets appended in the TLS hello packet, and
+ * allow for extra functionality.
+ */
+
#include "gnutls_int.h"
#include "gnutls_extensions.h"
#include "gnutls_errors.h"
*
*/
+/* Functions that relate to the TLS handshake procedure.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_dh.h"
*
*/
-#include <gnutls_int.h>
-#include <gnutls_hash_int.h>
-#include <gnutls_errors.h>
-
/* This file handles all the internal functions that cope with hashes
- * and hmacs. Currently it uses the functions provided by
+ * and HMACs. Currently it uses the functions provided by
* the gcrypt library that this can be easily changed.
*/
+#include <gnutls_int.h>
+#include <gnutls_hash_int.h>
+#include <gnutls_errors.h>
+
GNUTLS_HASH_HANDLE _gnutls_hash_init(MACAlgorithm algorithm)
{
GNUTLS_MAC_HANDLE ret;
*/
int have_peeked_data;
- /* gdbm */
- char* db_name;
int expire_time; /* after expire_time seconds this session will expire */
struct MOD_AUTH_STRUCT_INT* auth_struct; /* used in handshake packets and KX algorithms */
int v2_hello; /* 0 if the client hello is v3+.
*
*/
+/* This file contains functions which are wrappers for the key exchange
+ * part of TLS. They are called by the handshake functions (gnutls_handshake)
+ */
+
#include "gnutls_int.h"
#include "gnutls_handshake.h"
#include "gnutls_kx.h"
return 0;
}
+/* here we generate the TLS Master secret.
+ */
#define PREMASTER state->gnutls_key->key
static int generate_normal_master( GNUTLS_STATE state) {
int ret = 0;
*
*/
+/* Here lie everything that has to do with large numbers, libgcrypt and
+ * other stuff that didn't fit anywhere else.
+ */
+
#include <gnutls_int.h>
#include <libtasn1.h>
#include <gnutls_errors.h>
*
*/
+/* This file contains the functions needed for 64 bit integer support in
+ * TLS, and functions which ease the access to TLS vectors (data of given size).
+ */
+
#include <gnutls_int.h>
#include <gnutls_num.h>
#include <gnutls_errors.h>
*
*/
-/* This file contains function for RSA/DSA etc.
+/* This file contains the functions needed for RSA/DSA public key
+ * encryption and signatures.
*/
#include <gnutls_int.h>
*
*/
+/* Here lies the code of the gnutls_*_set_priority() functions.
+ */
+
#include "gnutls_int.h"
#include "gnutls_algorithms.h"
#include "gnutls_errors.h"
*
*/
+/* This file contains functions needed to read DSA or RSA private keys
+ * from files, or memory.
+ */
#include <gnutls_int.h>
#include <gnutls_errors.h>
*
*/
+/* Functions to return random bytes.
+ */
+
#include <gnutls_int.h>
#include <gnutls_random.h>
#include <gnutls_errors.h>
*
*/
+/* Functions that are record layer specific, are included in this file.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "debug.h"
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
+
+/* Contains functions that are supposed to pack and unpack session data,
+ * before and after they are sent to the database backend.
+ */
+
#include <gnutls_int.h>
#include <auth_srp.h>
#include <auth_anon.h>
*
*/
+/* Functions to manipulate the state (gnutls_int.h), and some other stuff
+ * are included here.
+ */
+
#include <gnutls_int.h>
#include <gnutls_errors.h>
#include <gnutls_auth_int.h>
state->gnutls_key = NULL;
}
- _gnutls_free(state->gnutls_internals.db_name);
-
memset( state, 0, sizeof(struct GNUTLS_STATE_INT));
gnutls_free(state);
void gnutls_dh_set_prime_bits( GNUTLS_STATE state, int bits);
void _gnutls_handshake_internal_state_clear( GNUTLS_STATE);
+int _gnutls_session_is_resumable( GNUTLS_STATE state);
+
int _gnutls_openpgp_send_fingerprint( GNUTLS_STATE state);
int _gnutls_PRF( const opaque * secret, int secret_size, const uint8 * label, int label_size, opaque * seed, int seed_size, int total_bytes, void* ret);
*
*/
+/* This file was intended to contains functions to be exported in the
+ * API and did not fit elsewhere.
+ */
+
#include <gnutls_int.h>
#include <auth_srp.h>
#include <auth_anon.h>
*
*/
+/* Functions to parse the SSLv2.0 hello message.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_dh.h"
*
*/
+/* Functions that relate to base64 encoding and decoding.
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include <gnutls_datum.h>
*
*/
+/* Functions that relate to the X.509 extension parsing.
+ */
+
#include <gnutls_int.h>
#include <libtasn1.h>
#include <gnutls_num.h>
*
*/
+/* Functions that relate to X.509 certificate signature checking.
+ */
+
#include <gnutls_int.h>
#include <gnutls_errors.h>
#include <x509_b64.h>
*
*/
+/* All functions which relate to X.509 certificate verification stuff are
+ * included here
+ */
+
#include "gnutls_int.h"
#include "gnutls_errors.h"
#include "gnutls_cert.h"
*/
+/* This file has the required functions to convert an X.509 DER certificate
+ * to XML format.
+ */
+
#include <int.h>
#include <errors.h>
#include <structure.h>
&structure);
ret = _gnutls_x509_expand_extensions( &structure, name);
-//asn1_print_structure( stdout, structure, name, ASN1_PRINT_ALL);
-//return 0;
-////
p = root;
while (p) {