-/* $Cambridge: exim/src/src/pdkim/rsa.h,v 1.1.2.1 2009/02/24 13:13:47 tom Exp $ */
/**
* \file rsa.h
*
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+
+/* $Cambridge: exim/src/src/pdkim/rsa.h,v 1.1.2.4 2009/04/09 07:49:11 tom Exp $ */
+
#ifndef POLARSSL_RSA_H
#define POLARSSL_RSA_H
"\x02\x1A\x05\x00\x04\x14"
#define ASN1_HASH_SHA256 \
- "\x30\x21\x30\x09" \
- "\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x02" \
- "\x05\x00\x04\x20"
-
+ "\x30\x31\x30\x0d\x06\x09\x60\x86\x48" \
+ "\x01\x65\x03\x04\x02\x01\x05\x00\x04" \
+ "\x20"
/**
* \brief RSA context structure
*/
void rsa_free( rsa_context *ctx );
+int rsa_parse_public_key( rsa_context *rsa, unsigned char *buf, int buflen );
+
int rsa_parse_key( rsa_context *rsa, unsigned char *buf, int buflen,
unsigned char *pwd, int pwdlen );