2 * Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc.
4 * Author: Simon Josefsson
6 * This file is part of GnuTLS-EXTRA.
8 * GnuTLS-extra is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version.
13 * GnuTLS-extra is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
27 #include <gnutls_extensions.h>
29 #define IA_PEER_ENABLE (1 << 1)
30 #define IA_PEER_ALLOW_SKIP (1 << 2)
31 #define IA_ENABLE (1 << 3)
32 #define IA_ALLOW_SKIP (1 << 4)
34 extern extension_entry_st ext_mod_ia
;
39 /* For TLS/IA. XXX: Move to IA credential? */
40 opaque inner_secret
[GNUTLS_MASTER_SIZE
];
44 _gnutls_ia_derive_inner_secret (gnutls_session_t session
)
46 extension_priv_data_t epriv
;
51 _gnutls_ext_get_session_data (session
, GNUTLS_EXTENSION_INNER_APPLICATION
,
59 memcpy (priv
->inner_secret
,
60 session
->security_parameters
.master_secret
, GNUTLS_MASTER_SIZE
);