Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 1 | /** |
| 2 | * \file pk.h |
| 3 | * |
| 4 | * \brief Public Key abstraction layer: wrapper functions |
| 5 | * |
| 6 | * Copyright (C) 2006-2013, Brainspark B.V. |
| 7 | * |
| 8 | * This file is part of PolarSSL (http://www.polarssl.org) |
| 9 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
| 10 | * |
| 11 | * All rights reserved. |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License along |
| 24 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 25 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 26 | */ |
| 27 | |
| 28 | #ifndef POLARSSL_PK_WRAP_H |
| 29 | #define POLARSSL_PK_WRAP_H |
| 30 | |
| 31 | #include "config.h" |
| 32 | |
| 33 | #include "pk.h" |
| 34 | |
Manuel Pégourié-Gonnard | 12c1ff0 | 2013-08-21 12:28:31 +0200 | [diff] [blame^] | 35 | /* Container for RSA-alt */ |
| 36 | typedef struct |
| 37 | { |
| 38 | void *key; |
| 39 | pk_rsa_alt_decrypt_func decrypt_func; |
| 40 | pk_rsa_alt_sign_func sign_func; |
| 41 | pk_rsa_alt_key_len_func key_len_func; |
| 42 | } rsa_alt_context; |
| 43 | |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 44 | #if defined(POLARSSL_RSA_C) |
| 45 | extern const pk_info_t rsa_info; |
| 46 | #endif |
| 47 | |
| 48 | #if defined(POLARSSL_ECP_C) |
| 49 | extern const pk_info_t eckey_info; |
Manuel Pégourié-Gonnard | 835eb59 | 2013-08-12 18:51:26 +0200 | [diff] [blame] | 50 | extern const pk_info_t eckeydh_info; |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 51 | #endif |
| 52 | |
| 53 | #if defined(POLARSSL_ECDSA_C) |
| 54 | extern const pk_info_t ecdsa_info; |
| 55 | #endif |
| 56 | |
Manuel Pégourié-Gonnard | 12c1ff0 | 2013-08-21 12:28:31 +0200 | [diff] [blame^] | 57 | extern const pk_info_t rsa_alt_info; |
| 58 | |
Manuel Pégourié-Gonnard | d73b3c1 | 2013-08-12 17:06:05 +0200 | [diff] [blame] | 59 | #endif /* POLARSSL_PK_WRAP_H */ |