00001 /* 00002 * Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation 00003 * 00004 * Author: Nikos Mavrogiannopoulos 00005 * 00006 * This file is part of GNUTLS. 00007 * 00008 * The GNUTLS library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00021 * USA 00022 * 00023 */ 00024 00025 /* This file contains code for RSA temporary keys. These keys are 00026 * only used in export cipher suites. 00027 */ 00028 00029 #include <gnutls_int.h> 00030 #include <gnutls_errors.h> 00031 #include <gnutls_datum.h> 00032 #include <gnutls_rsa_export.h> 00033 #include "debug.h" 00034 /* x509 */ 00035 #include "x509.h" 00036 #include "privkey.h" 00037 00038 /* returns e and m, depends on the requested bits. 00039 * We only support limited key sizes. 00040 */ 00041 const mpi_t * 00042 MHD__gnutls_rsa_params_to_mpi (MHD_gtls_rsa_params_t rsa_params) 00043 { 00044 if (rsa_params == NULL) 00045 { 00046 return NULL; 00047 } 00048 return rsa_params->params; 00049 } 00050 00051 00059 void 00060 MHD__gnutls_rsa_params_deinit (MHD_gtls_rsa_params_t rsa_params) 00061 { 00062 MHD_gnutls_x509_privkey_deinit (rsa_params); 00063 }