blob: 7a7f4fa01cd62d7aa50c224753546f642453ecab [file] [log] [blame]
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +02001/**
2 * \file pk.h
3 *
4 * \brief Public Key abstraction layer: wrapper functions
5 *
Manuel Pégourié-Gonnarda658a402015-01-23 09:45:19 +00006 * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +02007 *
Manuel Pégourié-Gonnardfe446432015-03-06 13:17:10 +00008 * This file is part of mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +02009 *
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020010 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25#ifndef POLARSSL_PK_WRAP_H
26#define POLARSSL_PK_WRAP_H
27
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020028#if !defined(POLARSSL_CONFIG_FILE)
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020029#include "config.h"
Manuel Pégourié-Gonnardcef4ad22014-04-29 12:39:06 +020030#else
31#include POLARSSL_CONFIG_FILE
32#endif
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020033
34#include "pk.h"
35
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +020036#if defined(POLARSSL_PK_RSA_ALT_SUPPORT)
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +020037/* Container for RSA-alt */
38typedef struct
39{
40 void *key;
41 pk_rsa_alt_decrypt_func decrypt_func;
42 pk_rsa_alt_sign_func sign_func;
43 pk_rsa_alt_key_len_func key_len_func;
44} rsa_alt_context;
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +020045#endif
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +020046
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020047#if defined(POLARSSL_RSA_C)
48extern const pk_info_t rsa_info;
49#endif
50
51#if defined(POLARSSL_ECP_C)
52extern const pk_info_t eckey_info;
Manuel Pégourié-Gonnard835eb592013-08-12 18:51:26 +020053extern const pk_info_t eckeydh_info;
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020054#endif
55
56#if defined(POLARSSL_ECDSA_C)
57extern const pk_info_t ecdsa_info;
58#endif
59
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +020060#if defined(POLARSSL_PK_RSA_ALT_SUPPORT)
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +020061extern const pk_info_t rsa_alt_info;
Manuel Pégourié-Gonnard348bcb32015-03-31 14:01:33 +020062#endif
Manuel Pégourié-Gonnard12c1ff02013-08-21 12:28:31 +020063
Manuel Pégourié-Gonnardd73b3c12013-08-12 17:06:05 +020064#endif /* POLARSSL_PK_WRAP_H */