X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=libeap%2Fsrc%2Fcrypto%2Fcrypto_internal-rsa.c;h=dc7f350af057aa6630c76d0a1d82f1a15190e192;hb=4f319dde67a76fe0aaf33f6d2788968012584ada;hp=205042cf36311a8fd93d83d8e92c5e728ed6c8d4;hpb=49c65b803b43e159e38f6a16505bad54de153916;p=mech_eap.git diff --git a/libeap/src/crypto/crypto_internal-rsa.c b/libeap/src/crypto/crypto_internal-rsa.c index 205042c..dc7f350 100644 --- a/libeap/src/crypto/crypto_internal-rsa.c +++ b/libeap/src/crypto/crypto_internal-rsa.c @@ -2,14 +2,8 @@ * Crypto wrapper for internal crypto implementation - RSA parts * Copyright (c) 2006-2009, Jouni Malinen * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Alternatively, this software may be distributed under the terms of BSD - * license. - * - * See README and COPYING for more details. + * This software may be distributed under the terms of the BSD license. + * See README for more details. */ #include "includes.h" @@ -17,7 +11,6 @@ #include "common.h" #include "crypto.h" #include "tls/rsa.h" -#include "tls/bignum.h" #include "tls/pkcs1.h" #include "tls/pkcs8.h" @@ -33,6 +26,15 @@ struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len) } +struct crypto_public_key * +crypto_public_key_import_parts(const u8 *n, size_t n_len, + const u8 *e, size_t e_len) +{ + return (struct crypto_public_key *) + crypto_rsa_import_public_key_parts(n, n_len, e, e_len); +} + + struct crypto_private_key * crypto_private_key_import(const u8 *key, size_t len, const char *passwd)