aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_ui.c
blob: 1963ce084f157d525b670f88dd153fd45ffe100c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
 *
 * Author: Nikos Mavrogiannopoulos
 *
 * This file is part of GNUTLS.
 *
 * The GNUTLS library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 * USA
 *
 */

/* This file contains certificate authentication functions to be exported in the
 * API and did not fit elsewhere.
 */

#include <gnutls_int.h>
#include <auth_cert.h>
#include <gnutls_errors.h>
#include <gnutls_auth_int.h>
#include <gnutls_state.h>
#include <gnutls_datum.h>

/* ANON & DHE */

/**
 * MHD__gnutls_dh_set_prime_bits - Used to set the bits for a DH ciphersuite
 * @session: is a #MHD_gtls_session_t structure.
 * @bits: is the number of bits
 *
 * This function sets the number of bits, for use in an
 * Diffie Hellman key exchange. This is used both in DH ephemeral and
 * DH anonymous cipher suites. This will set the
 * minimum size of the prime that will be used for the handshake.
 *
 * In the client side it sets the minimum accepted number of bits.
 * If a server sends a prime with less bits than that
 * GNUTLS_E_DH_PRIME_UNACCEPTABLE will be returned by the
 * handshake.
 *
 **/
void
MHD__gnutls_dh_set_prime_bits (MHD_gtls_session_t session, unsigned int bits)
{
  session->internals.dh_prime_bits = bits;
}