|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2017 Red Hat, Inc.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* Author: Nikos Mavrogiannopoulos
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* The GnuTLS is free software; you can redistribute it and/or
|
|
Packit Service |
4684c1 |
* modify it under the terms of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* as published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
4684c1 |
* the License, or (at your option) any later version.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This library is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
* Lesser General Public License for more details.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#ifndef GNUTLS_LIB_SECRETS_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_LIB_SECRETS_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include "gnutls_int.h"
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _tls13_init_secret(gnutls_session_t session, const uint8_t *psk, size_t psk_size);
|
|
Packit Service |
4684c1 |
int _tls13_update_secret(gnutls_session_t session, const uint8_t *key, size_t key_size);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _tls13_init_secret2(const mac_entry_st *prf,
|
|
Packit Service |
4684c1 |
const uint8_t *psk, size_t psk_size,
|
|
Packit Service |
4684c1 |
void *out);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _tls13_derive_secret(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
const char *label, unsigned label_size,
|
|
Packit Service |
4684c1 |
const uint8_t *msg, size_t msg_size,
|
|
Packit Service |
4684c1 |
const uint8_t secret[MAX_HASH_SIZE],
|
|
Packit Service |
4684c1 |
void *out /* of enough length to hold PRF MAC */);
|
|
Packit Service |
4684c1 |
int _tls13_derive_secret2(const mac_entry_st *prf,
|
|
Packit Service |
4684c1 |
const char *label, unsigned label_size,
|
|
Packit Service |
4684c1 |
const uint8_t *tbh, size_t tbh_size,
|
|
Packit Service |
4684c1 |
const uint8_t secret[MAX_CIPHER_KEY_SIZE],
|
|
Packit Service |
4684c1 |
void *out);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _tls13_expand_secret(gnutls_session_t session,
|
|
Packit Service |
4684c1 |
const char *label, unsigned label_size,
|
|
Packit Service |
4684c1 |
const uint8_t *msg, size_t msg_size,
|
|
Packit Service |
4684c1 |
const uint8_t secret[MAX_HASH_SIZE],
|
|
Packit Service |
4684c1 |
unsigned out_size,
|
|
Packit Service |
4684c1 |
void *out);
|
|
Packit Service |
4684c1 |
int _tls13_expand_secret2(const mac_entry_st *prf,
|
|
Packit Service |
4684c1 |
const char *label, unsigned label_size,
|
|
Packit Service |
4684c1 |
const uint8_t *msg, size_t msg_size,
|
|
Packit Service |
4684c1 |
const uint8_t secret[MAX_CIPHER_KEY_SIZE],
|
|
Packit Service |
4684c1 |
unsigned out_size, void *out);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_LIB_SECRETS_H */
|